cui/source/options/treeopt.cxx | 54 ++++++----------------------------------- 1 file changed, 8 insertions(+), 46 deletions(-)
New commits: commit 9eb81304989acb16c61c15b211dd124548ffb85f Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Thu Nov 8 15:18:03 2018 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat Nov 10 12:18:46 2018 +0100 tdf#120703 PVS: drop the unused code V547 Expression '!pGroupInfo->m_pModule' is always false The chunk of code updating module pointers was always doing nothing since the beginning (commit 997cf427da6c6c1d145a74e3c23a2a1adb3e2e7d from 2004), because the line to load the module was commented out. So just remove it now. Change-Id: I8db38e795662bba6b3b4693e7ba8a869a97acdd2 Reviewed-on: https://gerrit.libreoffice.org/63232 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index d8010ae3725e..b74830726911 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1009,53 +1009,15 @@ void OfaTreeOptionsDialog::SelectHdl_Impl() { if(pGroupInfo->m_bLoadError) return; - else - { - if(pGroupInfo->m_pModule /*&& !pGroupInfo->pModule->IsLoaded()*/) - { - SfxModule* pOldModule = pGroupInfo->m_pModule; - bool bIdentical = pGroupInfo->m_pModule == pGroupInfo->m_pShell; - WaitObject aWait(this); - //pGroupInfo->pModule = pGroupInfo->pModule->Load(); - if(!pGroupInfo->m_pModule) - { - pGroupInfo->m_bLoadError = true; - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(pBox->GetFrameWeld(), - VclMessageType::Info, VclButtonsType::Ok, - sNotLoadedError)); - xInfoBox->run(); - return; - } - if(bIdentical) - pGroupInfo->m_pShell = pGroupInfo->m_pModule; - // now test whether there was the same module in other groups, too (e. g. Text+HTML) - SvTreeListEntry* pTemp = pTreeLB->First(); - while(pTemp) - { - if(!pTreeLB->GetParent(pTemp) && pTemp != pEntry) - { - OptionsGroupInfo* pTGInfo = static_cast<OptionsGroupInfo *>(pTemp->GetUserData()); - if(pTGInfo->m_pModule == pOldModule) - { - pTGInfo->m_pModule = pGroupInfo->m_pModule; - if(bIdentical) - pTGInfo->m_pShell = pGroupInfo->m_pModule; - } - } - pTemp = pTreeLB->Next(pTemp); - } - } - - if(!pGroupInfo->m_pInItemSet) - pGroupInfo->m_pInItemSet = pGroupInfo->m_pShell - ? pGroupInfo->m_pShell->CreateItemSet( pGroupInfo->m_nDialogId ) - : CreateItemSet( pGroupInfo->m_nDialogId ); - if(!pGroupInfo->m_pOutItemSet) - pGroupInfo->m_pOutItemSet = o3tl::make_unique<SfxItemSet>( - *pGroupInfo->m_pInItemSet->GetPool(), - pGroupInfo->m_pInItemSet->GetRanges()); - } + if(!pGroupInfo->m_pInItemSet) + pGroupInfo->m_pInItemSet = pGroupInfo->m_pShell + ? pGroupInfo->m_pShell->CreateItemSet( pGroupInfo->m_nDialogId ) + : CreateItemSet( pGroupInfo->m_nDialogId ); + if(!pGroupInfo->m_pOutItemSet) + pGroupInfo->m_pOutItemSet = o3tl::make_unique<SfxItemSet>( + *pGroupInfo->m_pInItemSet->GetPool(), + pGroupInfo->m_pInItemSet->GetRanges()); TabPageParent pPageParent(pTabBox); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits