[Libreoffice-commits] core.git: helpcontent2 sw/source

Julien Nabet serval2412 at yahoo.fr
Thu Jun 13 12:05:01 PDT 2013


 helpcontent2                            |    2 +-
 sw/source/core/unocore/unoobj.cxx       |    6 ++----
 sw/source/filter/html/htmltabw.cxx      |    3 +--
 sw/source/ui/lingu/olmenu.cxx           |    6 ++----
 sw/source/ui/vba/vbaparagraphformat.cxx |    3 +--
 5 files changed, 7 insertions(+), 13 deletions(-)

New commits:
commit 5614804a664ac8da5769c06f7139357ce9a6100c
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Thu Jun 13 21:04:23 2013 +0200

    cppcheck: fix a bunch of reassignments
    
    Change-Id: I4dfea342905d38a47dfac91bc4a4875c9338f5d5

diff --git a/helpcontent2 b/helpcontent2
index 50f2902..da1f6d1 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 50f2902dc9d125c6ab5b379d5389364bb7bdf09c
+Subproject commit da1f6d1195f1bd42bd4abbea49416bede5f6b069
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index caa4567..e03ad27 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -1581,12 +1581,11 @@ throw (uno::RuntimeException)
 
     SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
 
-    sal_Bool bRet = sal_False;
     SwUnoCursorHelper::SelectPam(rUnoCursor, Expand);
     // if we're at the para start then we wont move
     // but bRet is also true if GoSentence failed but
     // the start of the sentence is reached
-    bRet = SwUnoCursorHelper::IsStartOfPara(rUnoCursor)
+    sal_Bool bRet = SwUnoCursorHelper::IsStartOfPara(rUnoCursor)
         || rUnoCursor.GoSentence(SwCursor::START_SENT)
         || SwUnoCursorHelper::IsStartOfPara(rUnoCursor);
     if (CURSOR_META == m_pImpl->m_eType)
@@ -1605,13 +1604,12 @@ SwXTextCursor::gotoEndOfSentence(sal_Bool Expand) throw (uno::RuntimeException)
 
     SwUnoCrsr & rUnoCursor( m_pImpl->GetCursorOrThrow() );
 
-    sal_Bool bRet = sal_False;
     SwUnoCursorHelper::SelectPam(rUnoCursor, Expand);
     // bRet is true if GoSentence() succeeded or if the
     // MovePara() succeeded while the end of the para is
     // not reached already
     sal_Bool bAlreadyParaEnd = SwUnoCursorHelper::IsEndOfPara(rUnoCursor);
-    bRet = !bAlreadyParaEnd
+    sal_Bool bRet = !bAlreadyParaEnd
             &&  (rUnoCursor.GoSentence(SwCursor::END_SENT)
                  || rUnoCursor.MovePara(fnParaCurr, fnParaEnd));
     if (CURSOR_META == m_pImpl->m_eType)
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 263c90b..3438ab3 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -171,11 +171,10 @@ sal_Bool SwHTMLWrtTable::HasTabBackground( const SwTableLine& rLine,
     OSL_ENSURE( bTop || bBottom || bLeft || bRight,
             "HasTabBackground: darf nicht aufgerufen werden" );
 
-    sal_Bool bRet = sal_False;
     const SvxBrushItem& rBrushItem = rLine.GetFrmFmt()->GetBackground();
     /// The table line has a background, if its background color is not "no fill"/
     /// "auto fill" or it has a background graphic.
-    bRet = rBrushItem.GetColor() != COL_TRANSPARENT ||
+    sal_Bool bRet = rBrushItem.GetColor() != COL_TRANSPARENT ||
            rBrushItem.GetGraphicLink() || rBrushItem.GetGraphic();
 
     if( !bRet )
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index a444910..e640794 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -436,9 +436,8 @@ SwSpellPopup::SwSpellPopup(
 
     // get keyboard language
     String aKeyboardLang;
-    LanguageType nLang = LANGUAGE_DONTKNOW;
     SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
-    nLang = rEditWin.GetInputLanguage();
+    LanguageType nLang = rEditWin.GetInputLanguage();
     if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
         aKeyboardLang = aLanguageTable.GetString( nLang );
 
@@ -591,9 +590,8 @@ aInfo16( SW_RES(IMG_INFO_16) )
 
     // get keyboard language
     String aKeyboardLang;
-    LanguageType nLang = LANGUAGE_DONTKNOW;
     SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
-    nLang = rEditWin.GetInputLanguage();
+    LanguageType nLang = rEditWin.GetInputLanguage();
     if (nLang != LANGUAGE_DONTKNOW && nLang != LANGUAGE_SYSTEM)
         aKeyboardLang = aLanguageTable.GetString( nLang );
 
diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx
index df635ec..5f42c69 100644
--- a/sw/source/ui/vba/vbaparagraphformat.cxx
+++ b/sw/source/ui/vba/vbaparagraphformat.cxx
@@ -302,14 +302,13 @@ void SAL_CALL SwVbaParagraphFormat::setTabStops( const uno::Any& /*_tabstops*/ )
 
 uno::Any SAL_CALL SwVbaParagraphFormat::getWidowControl() throw (uno::RuntimeException)
 {
-    sal_Bool bWidow = sal_False;
     sal_Int8 nWidow = 0;
     mxParaProps->getPropertyValue( OUString("ParaWidows") ) >>= nWidow;
     sal_Int8 nOrphan = 0;
     mxParaProps->getPropertyValue( OUString("ParaOrphans") ) >>= nOrphan;
     // if the amount of single lines on one page > 1 and the same of start and end of the paragraph,
     // true is retured.
-    bWidow = ( nWidow > 1 && nOrphan == nWidow );
+    sal_Bool bWidow = ( nWidow > 1 && nOrphan == nWidow );
     return uno::makeAny( bWidow );
 }
 


More information about the Libreoffice-commits mailing list