basctl/source/basicide/iderdll.cxx | 1 - basctl/source/basicide/macrodlg.cxx | 7 ------- vcl/source/app/salvtables.cxx | 2 -- vcl/source/treelist/treelist.cxx | 6 ------ 4 files changed, 16 deletions(-)
New commits: commit 6e2bd11251afbe64f9889ede36b28b00f47aaff5 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Aug 7 12:49:11 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun Aug 7 15:40:29 2022 +0200 tdf#150291 Revert "Fix crash when no valid EntryDescriptor found" This reverts commit 499ecbf3a36990c29dc7e1fb9b0ecb1d297c2848 because it causes the dialog not to start with the default selected macro auto-expanded like it used to. Possibly the other fix for tdf#150291 solves the original problem. Change-Id: Ic91410de073fe87d4edebde18b60ffcc1ad324a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137923 Tested-by: Jenkins Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx index 8e8a3dc3e114..022045050e9a 100644 --- a/basctl/source/basicide/iderdll.cxx +++ b/basctl/source/basicide/iderdll.cxx @@ -145,7 +145,6 @@ ExtraData* Dll::GetExtraData () ExtraData::ExtraData () : - m_aLastEntryDesc(EntryDescriptor()), bChoosingMacro(false), bShellInCriticalSection(false) { diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index a9d3fd0f037c..2cc12fb053d9 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -154,13 +154,6 @@ void MacroChooser::RestoreMacroDescription() aDesc = pData->GetLastEntryDescriptor(); } - // No valid EntryDescriptor found - if (aDesc.GetMethodName().isEmpty()) - { - m_xMacroNameEdit->select_region(0, 0); - return; - } - m_xBasicBox->SetCurrentEntry(aDesc); BasicSelectHdl(m_xBasicBox->get_widget()); diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 1cc12d47a12c..02394ac9176c 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -4900,8 +4900,6 @@ void SalInstanceTreeView::set_text(const weld::TreeIter& rIter, const OUString& OUString SalInstanceTreeView::get_id(const weld::TreeIter& rIter) const { const SalInstanceTreeIter& rVclIter = static_cast<const SalInstanceTreeIter&>(rIter); - if (!rVclIter.iter) - return OUString(); const OUString* pStr = static_cast<const OUString*>(rVclIter.iter->GetUserData()); if (pStr) return *pStr; diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx index fc81fa2eaa0c..8f51e343fd98 100644 --- a/vcl/source/treelist/treelist.cxx +++ b/vcl/source/treelist/treelist.cxx @@ -102,8 +102,6 @@ bool SvTreeList::IsEntryVisible( const SvListView* pView, SvTreeListEntry* pEntr sal_uInt16 SvTreeList::GetDepth( const SvTreeListEntry* pEntry ) const { - if (!pEntry) - return 0; DBG_ASSERT(pEntry && pEntry!=pRootItem.get(),"GetDepth:Bad Entry"); sal_uInt16 nDepth = 0; while( pEntry && pEntry->pParent != pRootItem.get() ) @@ -1504,8 +1502,6 @@ SvTreeListEntries& SvTreeList::GetChildList( SvTreeListEntry* pParent ) const SvTreeListEntry* SvTreeList::GetParent( const SvTreeListEntry* pEntry ) const { - if (!pEntry) - return nullptr; const SvTreeListEntry* pParent = pEntry->pParent; if (pParent == pRootItem.get()) pParent = nullptr; @@ -1514,8 +1510,6 @@ const SvTreeListEntry* SvTreeList::GetParent( const SvTreeListEntry* pEntry ) co SvTreeListEntry* SvTreeList::GetParent( SvTreeListEntry* pEntry ) { - if (!pEntry) - return nullptr; SvTreeListEntry* pParent = pEntry->pParent; if (pParent == pRootItem.get()) pParent = nullptr;