filter/source/graphicfilter/icgm/class4.cxx | 10 ++++------ sfx2/source/view/viewfrm.cxx | 6 ++---- svtools/source/control/ctrlbox.cxx | 3 +-- vcl/source/app/svapp.cxx | 8 +++----- 4 files changed, 10 insertions(+), 17 deletions(-)
New commits: commit 9fb9b057d65b07fcd037b31505561c5b3fe9939c Author: Julien Nabet <[email protected]> Date: Fri Sep 27 23:32:53 2013 +0200 cppcheck: avoid possible division by 0 Change-Id: I8ff8e72d0d25168da374d752a18210cf764ed311 diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx index 8899d73..71ccf32 100644 --- a/filter/source/graphicfilter/icgm/class4.cxx +++ b/filter/source/graphicfilter/icgm/class4.cxx @@ -371,11 +371,10 @@ void CGM::ImplDoClass4() double fG = 2.0 * ( fA * ( aEndingPoint.Y - aIntermediatePoint.Y ) - fB * ( aEndingPoint.X - aIntermediatePoint.X ) ); - aCenterPoint.X = ( fD * fE - fB * fF ) / fG; - aCenterPoint.Y = ( fA * fF - fC * fE ) / fG; - if ( fG != 0 ) { + aCenterPoint.X = ( fD * fE - fB * fF ) / fG; + aCenterPoint.Y = ( fA * fF - fC * fE ) / fG; double fStartAngle = ImplGetOrientation( aCenterPoint, aStartingPoint ); double fInterAngle = ImplGetOrientation( aCenterPoint, aIntermediatePoint ); double fEndAngle = ImplGetOrientation( aCenterPoint, aEndingPoint ); @@ -445,11 +444,10 @@ void CGM::ImplDoClass4() double fG = 2.0 * ( fA * ( aEndingPoint.Y - aIntermediatePoint.Y ) - fB * ( aEndingPoint.X - aIntermediatePoint.X ) ); - aCenterPoint.X = ( fD * fE - fB * fF ) / fG; - aCenterPoint.Y = ( fA * fF - fC * fE ) / fG; - if ( fG != 0 ) { + aCenterPoint.X = ( fD * fE - fB * fF ) / fG; + aCenterPoint.Y = ( fA * fF - fC * fE ) / fG; double fStartAngle = ImplGetOrientation( aCenterPoint, aStartingPoint ); double fInterAngle = ImplGetOrientation( aCenterPoint, aIntermediatePoint ); double fEndAngle = ImplGetOrientation( aCenterPoint, aEndingPoint ); commit 32095947489f10898c87a22162abdfdeaabda8fe Author: Julien Nabet <[email protected]> Date: Fri Sep 27 23:23:56 2013 +0200 cppcheck: redundantAssignment Change-Id: I16ced23894e461e7953ed4978ca0d4cf7f40f5e8 diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 8855dcd..32513d4 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -930,11 +930,10 @@ sal_uInt16 LineListBox::GetEntryStyle( sal_uInt16 nPos ) const sal_Bool LineListBox::UpdatePaintLineColor( void ) { - sal_Bool bRet = sal_True; const StyleSettings& rSettings = GetSettings().GetStyleSettings(); Color aNewCol( rSettings.GetWindowColor().IsDark()? rSettings.GetLabelTextColor() : aColor ); - bRet = aNewCol != maPaintCol; + sal_Bool bRet = aNewCol != maPaintCol; if( bRet ) maPaintCol = aNewCol; commit ed0b3988db9fc3ec33e25e617b638841d787b10f Author: Julien Nabet <[email protected]> Date: Fri Sep 27 23:21:12 2013 +0200 cppcheck: redundantAssignment Change-Id: Ife6a840c606b1c8673d814491cea3c4dad796c4e diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index c7c65fb..b96de57 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1614,14 +1614,13 @@ void Application::AddToRecentDocumentList(const OUString& rFileUrl, const OUStri bool InitAccessBridge( bool bShowCancel, bool &rCancelled ) { - bool bRet = true; - // Disable Java bridge on UNIX #if defined UNX (void) bShowCancel; // unused (void) rCancelled; // unused + return true; #else - bRet = ImplInitAccessBridge( bShowCancel, rCancelled ); + bool bRet = ImplInitAccessBridge( bShowCancel, rCancelled ); if( !bRet && bShowCancel && !rCancelled ) { @@ -1632,9 +1631,8 @@ bool InitAccessBridge( bool bShowCancel, bool &rCancelled ) aSettings.SetMiscSettings( aMisc ); Application::SetSettings( aSettings ); } -#endif // !UNX - return bRet; +#endif // !UNX } // MT: AppEvent was in oldsv.cxx, but is still needed... commit bf5db198e19898fbae2f27c3a9f84c2e7f24e00f Author: Julien Nabet <[email protected]> Date: Fri Sep 27 23:18:21 2013 +0200 cppcheck: redundantAssignment Change-Id: I43ae91f0b91479fb279b0efbeb0cb4195e7b083a diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 4c38e00..141406e 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -3085,9 +3085,8 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq ) return; Reference < XFrame > xFrame = GetFrame().GetTopFrame().GetFrameInterface(); Reference < XFrame > xBeamer( xFrame->findFrame( "_beamer", FrameSearchFlag::CHILDREN ) ); - sal_Bool bShow = sal_False; sal_Bool bHasChild = xBeamer.is(); - bShow = pShowItem ? pShowItem->GetValue() : !bHasChild; + sal_Bool bShow = pShowItem ? pShowItem->GetValue() : !bHasChild; if ( pShowItem ) { if( bShow == bHasChild ) @@ -3127,9 +3126,8 @@ void SfxViewFrame::ChildWindowExecute( SfxRequest &rReq ) return; } - sal_Bool bShow = sal_False; sal_Bool bHasChild = HasChildWindow(nSID); - bShow = pShowItem ? pShowItem->GetValue() : !bHasChild; + sal_Bool bShow = pShowItem ? pShowItem->GetValue() : !bHasChild; // Perform action. if ( !pShowItem || bShow != bHasChild ) _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
