summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-16 14:06:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-16 15:05:58 +0100
commitc8907b19dc04a57b74cfc14dc641ac41177e2142 (patch)
treeabd7d18e2faa6f995144d40a72e06a04eae034ac /sw/source/uibase
parent11300c48d4350c2f6748a1ca04b919cfae338d41 (diff)
loplugin:buriedassign in sw
Change-Id: If2adf22a0ac3e030fca1b4ecd0173cac58f0f21e Reviewed-on: https://gerrit.libreoffice.org/63470 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/docsh2.cxx12
-rw-r--r--sw/source/uibase/app/docstyle.cxx6
-rw-r--r--sw/source/uibase/config/viewopt.cxx5
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx10
-rw-r--r--sw/source/uibase/wrtsh/move.cxx3
5 files changed, 27 insertions, 9 deletions
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 45c287eab510..68fe77ff8a9f 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -637,10 +637,14 @@ void SwDocShell::Execute(SfxRequest& rReq)
if( !aFileName.isEmpty() )
{
SwgReaderOption aOpt;
- aOpt.SetTextFormats( bText = bool(nFlags & SfxTemplateFlags::LOAD_TEXT_STYLES ));
- aOpt.SetFrameFormats( bFrame = bool(nFlags & SfxTemplateFlags::LOAD_FRAME_STYLES));
- aOpt.SetPageDescs( bPage = bool(nFlags & SfxTemplateFlags::LOAD_PAGE_STYLES ));
- aOpt.SetNumRules( bNum = bool(nFlags & SfxTemplateFlags::LOAD_NUM_STYLES ));
+ bText = bool(nFlags & SfxTemplateFlags::LOAD_TEXT_STYLES );
+ aOpt.SetTextFormats(bText);
+ bFrame = bool(nFlags & SfxTemplateFlags::LOAD_FRAME_STYLES);
+ aOpt.SetFrameFormats(bFrame);
+ bPage = bool(nFlags & SfxTemplateFlags::LOAD_PAGE_STYLES );
+ aOpt.SetPageDescs(bPage);
+ bNum = bool(nFlags & SfxTemplateFlags::LOAD_NUM_STYLES );
+ aOpt.SetNumRules(bNum);
//different meaning between SFX_MERGE_STYLES and aOpt.SetMerge!
bMerge = bool(nFlags & SfxTemplateFlags::MERGE_STYLES);
aOpt.SetMerge( !bMerge );
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 7bd4c97ac1cf..9a094d2068ed 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -2923,8 +2923,10 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
while( *pPoolIds )
{
if( !bIsSearchUsed || rDoc.getIDocumentStylePoolAccess().IsPoolTextCollUsed( *pPoolIds ) )
- aLst.Append( cPARA,
- s = SwStyleNameMapper::GetUIName( *pPoolIds, s ));
+ {
+ s = SwStyleNameMapper::GetUIName( *pPoolIds, s );
+ aLst.Append( cPARA, s);
+ }
++pPoolIds;
}
}
diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx
index 9db2f39a0134..970816c3e3ce 100644
--- a/sw/source/uibase/config/viewopt.cxx
+++ b/sw/source/uibase/config/viewopt.cxx
@@ -326,7 +326,10 @@ bool SwViewOption::IsAutoCompleteWords()
void SwViewOption::SetOnlineSpell(bool b)
{
- b ? (m_nCoreOptions |= ViewOptFlags1::OnlineSpell ) : ( m_nCoreOptions &= ~ViewOptFlags1::OnlineSpell);
+ if (b)
+ m_nCoreOptions |= ViewOptFlags1::OnlineSpell;
+ else
+ m_nCoreOptions &= ~ViewOptFlags1::OnlineSpell;
}
AuthorCharAttr::AuthorCharAttr() :
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 4d03ac063bf4..33497fafbef4 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1278,7 +1278,15 @@ bool SwTransferable::PasteData( TransferableDataHelper& rData,
SwTransferable *pTrans=nullptr, *pTunneledTrans=GetSwTransferable( rData );
// check for private drop
- bool bPrivateDrop(pPt && (bPasteSelection ? nullptr != (pTrans = pMod->m_pXSelection) : nullptr != (pTrans = pMod->m_pDragDrop)));
+ bool bPrivateDrop(pPt);
+ if (bPrivateDrop)
+ {
+ if (bPasteSelection)
+ pTrans = pMod->m_pXSelection;
+ else
+ pTrans = pMod->m_pDragDrop;
+ bPrivateDrop = nullptr != pTrans;
+ }
bool bNeedToSelectBeforePaste(false);
if(bPrivateDrop && DND_ACTION_LINK == nDropAction)
diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx
index d28554afd64e..d9cf0a00b73f 100644
--- a/sw/source/uibase/wrtsh/move.cxx
+++ b/sw/source/uibase/wrtsh/move.cxx
@@ -46,7 +46,8 @@ public:
ShellMoveCursor( SwWrtShell* pWrtSh, bool bSel )
{
bAct = !pWrtSh->ActionPend() && (pWrtSh->GetFrameType(nullptr,false) & FrameTypeFlags::FLY_ANY);
- ( pSh = pWrtSh )->MoveCursor( bSel );
+ pSh = pWrtSh;
+ pSh->MoveCursor( bSel );
pWrtSh->GetView().GetViewFrame()->GetBindings().Invalidate(SID_HYPERLINK_GETLINK);
}
~ShellMoveCursor() COVERITY_NOEXCEPT_FALSE