diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-06 14:49:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-07-10 09:57:24 +0200 |
commit | 4250b25c6ae361359300ab6ccde27230f8e01039 (patch) | |
tree | 916a8420282928a92ede0760d696997550ae0840 /sfx2 | |
parent | 2ed9a2b641682d8612b5404bd3978ed049aa0266 (diff) |
teach unnecessaryparen loplugin about identifiers
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b
Reviewed-on: https://gerrit.libreoffice.org/39737
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/sfxpicklist.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/request.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/control/templatelocalview.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 2 |
7 files changed, 13 insertions, 15 deletions
diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx index d0890d89f8fd..c1aceedb3663 100644 --- a/sfx2/source/appl/sfxpicklist.cxx +++ b/sfx2/source/appl/sfxpicklist.cxx @@ -178,8 +178,8 @@ void SfxPickListImpl::AddDocumentToPickList( SfxObjectShell* pDocSh ) if ( aURL.GetProtocol() == INetProtocol::File ) Application::AddToRecentDocumentList( aURL.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ), - (pFilter) ? pFilter->GetMimeType() : OUString(), - (pFilter) ? pFilter->GetServiceName() : OUString() ); + pFilter ? pFilter->GetMimeType() : OUString(), + pFilter ? pFilter->GetServiceName() : OUString() ); } SfxPickList::SfxPickList(sal_uInt32 nAllowedMenuSize) diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index 11f5bb9e7786..8abb7c313eed 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -618,7 +618,7 @@ void SfxRequest::Done_Impl // play it safe; repair the wrong flags OSL_FAIL( "recursion RecordPerItem - use RecordPerSet!" ); SfxSlot *pSlot = const_cast<SfxSlot*>(pImpl->pSlot); - pSlot->nFlags &= ~(SfxSlotMode::RECORDPERITEM); + pSlot->nFlags &= ~SfxSlotMode::RECORDPERITEM; pSlot->nFlags &= SfxSlotMode::RECORDPERSET; } diff --git a/sfx2/source/control/templatelocalview.cxx b/sfx2/source/control/templatelocalview.cxx index 83f25c641165..7f105c9c3a3a 100644 --- a/sfx2/source/control/templatelocalview.cxx +++ b/sfx2/source/control/templatelocalview.cxx @@ -203,7 +203,7 @@ void TemplateLocalView::showRegion(TemplateContainerItem *pItem) mnCurRegionId = pItem->mnRegionId+1; maCurRegionName = pItem->maTitle; - insertItems((pItem)->maTemplates); + insertItems(pItem->maTemplates); maOpenRegionHdl.Call(nullptr); } diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 77f4b8bcc2ae..4d5bceef239b 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -812,10 +812,8 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, // get the filename by dialog ... // create the file dialog sal_Int16 aDialogMode = bAllowOptions - ? (css::ui::dialogs::TemplateDescription:: - FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS) - : (css::ui::dialogs::TemplateDescription:: - FILESAVE_AUTOEXTENSION_PASSWORD); + ? css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS + : css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD; FileDialogFlags aDialogFlags = FileDialogFlags::NONE; if( ( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED ) ) diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 5c3f71f1c398..db7a7d1ca73e 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2058,8 +2058,8 @@ void SfxObjectShell::AddToRecentlyUsedList() { std::shared_ptr<const SfxFilter> pOrgFilter = pMedium->GetOrigFilter(); Application::AddToRecentDocumentList( aUrl.GetURLNoPass( INetURLObject::DecodeMechanism::NONE ), - (pOrgFilter) ? pOrgFilter->GetMimeType() : OUString(), - (pOrgFilter) ? pOrgFilter->GetServiceName() : OUString() ); + pOrgFilter ? pOrgFilter->GetMimeType() : OUString(), + pOrgFilter ? pOrgFilter->GetServiceName() : OUString() ); } } diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index a202a820d797..d4a42faf1dd9 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -728,9 +728,9 @@ IMPL_LINK(SfxTemplateManagerDlg, DeleteTemplateHdl, ThumbnailViewItem*, pItem, v { TemplateSearchViewItem *pSrchItem = static_cast<TemplateSearchViewItem*>(pItem); - if (!mpLocalView->removeTemplate((pSrchItem)->mnAssocId, pSrchItem->mnRegionId)) + if (!mpLocalView->removeTemplate(pSrchItem->mnAssocId, pSrchItem->mnRegionId)) { - aDeletedTemplate = (pSrchItem)->maTitle; + aDeletedTemplate = pSrchItem->maTitle; } } else @@ -738,9 +738,9 @@ IMPL_LINK(SfxTemplateManagerDlg, DeleteTemplateHdl, ThumbnailViewItem*, pItem, v TemplateViewItem *pViewItem = static_cast<TemplateViewItem*>(pItem); sal_uInt16 nRegionItemId = mpLocalView->getRegionId(pViewItem->mnRegionId); - if (!mpLocalView->removeTemplate((pViewItem)->mnDocId + 1, nRegionItemId))//mnId w.r.t. region is mnDocId + 1; + if (!mpLocalView->removeTemplate(pViewItem->mnDocId + 1, nRegionItemId))//mnId w.r.t. region is mnDocId + 1; { - aDeletedTemplate = (pItem)->maTitle; + aDeletedTemplate = pItem->maTitle; } } diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index bede7424acaf..7910618d6409 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -705,7 +705,7 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const if ( sTargetFrameName == "_beamer" ) { SfxViewFrame *pFrame = m_pData->m_pViewShell->GetViewFrame(); - if ( eSearchFlags & ( frame::FrameSearchFlag::CREATE )) + if ( eSearchFlags & frame::FrameSearchFlag::CREATE ) pFrame->SetChildWindow( SID_BROWSER, true ); SfxChildWindow* pChildWin = pFrame->GetChildWindow( SID_BROWSER ); Reference < frame::XFrame > xFrame; |