Kaydet (Commit) 9eb81304 authored tarafından Mike Kaganski's avatar Mike Kaganski

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 997cf427
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: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 0df11c23
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment