From 2eb991561c3ca6751bfe3bd674de28d7677e993d Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 29 Nov 2016 17:18:20 +0100 Subject: Rewrite some (trivial) assignments inside if/while conditions: sw Change-Id: I288c5125a1316828df74f73aeaac85392638ffd8 --- sw/source/ui/fldui/fldedt.cxx | 3 ++- sw/source/ui/fldui/javaedit.cxx | 3 ++- sw/source/ui/misc/srtdlg.cxx | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'sw/source/ui') diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index 09cf8a99b6a9..c310348ccfdf 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -143,7 +143,8 @@ void SwFieldEditDlg::Init() rMgr.GoPrev(); m_pNextBT->Enable(bMove); - if( ( bMove = rMgr.GoPrev() ) ) + bMove = rMgr.GoPrev(); + if( bMove ) rMgr.GoNext(); m_pPrevBT->Enable( bMove ); diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index 4c8d82e3c90b..137ceb7ee552 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -154,7 +154,8 @@ void SwJavaEditDialog::CheckTravel() if( bNext ) pMgr->GoPrev(); - if( ( bPrev = pMgr->GoPrev() ) ) + bPrev = pMgr->GoPrev(); + if( bPrev ) pMgr->GoNext(); bTravel |= bNext || bPrev; diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 5c781853a02b..aeaff222cdf4 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -358,7 +358,8 @@ void SwSortDlg::Apply() { SwWait aWait( *rSh.GetView().GetDocShell(), true ); rSh.StartAllAction(); - if( (bRet = rSh.Sort( aOptions ))) + bRet = rSh.Sort( aOptions ); + if( bRet ) rSh.SetModified(); rSh.EndAllAction(); } -- cgit