diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-08 15:18:03 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-11-10 12:18:46 +0100 |
commit | 9eb81304989acb16c61c15b211dd124548ffb85f (patch) | |
tree | 3e6d5b987c4f7187d887a10e6484f6dccb6a6a8c /cui | |
parent | 0df11c2388e4bf901e985d8041c410ba032efc61 (diff) |
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.kaganski@collabora.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/treeopt.cxx | 54 |
1 files changed, 8 insertions, 46 deletions
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); |