sc/source/ui/unoobj/chartuno.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit 42e0ea0a6e4f48967d58fa95081c8ba5a6b08bc6 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Wed Apr 7 22:26:30 2021 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Tue Apr 20 23:42:05 2021 +0200 tdf#141537: UNO Object Inspector: Crash while inspecting file See bt: 6 0x00007f276e146773 in ScChartsObj::getByName(rtl::OUString const&) (this=0x7738e00, aName="Object 1") at sc/source/ui/unoobj/chartuno.cxx:345 7 0x00007f276e146865 in non-virtual thunk to ScChartsObj::getByName(rtl::OUString const&) () at sc/source/ui/unoobj/chartuno.cxx:348 8 0x00007f27a1d87b7f in (anonymous namespace)::NameAccessTreeEntry::fill(std::unique_ptr<weld::TreeView, std::default_delete<weld::TreeView> >&, weld::TreeIter const&) (this=0x6d463e0, pDocumentModelTree=std::unique_ptr<class weld::TreeView> = {...}, rParent=...) at sfx2/source/devtools/DocumentModelTreeHandler.cxx:139 9 0x00007f27a1d87905 in (anonymous namespace)::ChartsEntry::fill(std::unique_ptr<weld::TreeView, std::default_delete<weld::TreeView> >&, weld::TreeIter const&) (this=0x6d463e0, pDocumentModelTree=std::unique_ptr<class weld::TreeView> = {...}, rParent=...) at sfx2/source/devtools/DocumentModelTreeHandler.cxx:596 10 0x00007f27a1d842e5 in DocumentModelTreeHandler::ExpandingHandler(weld::TreeIter const&) (this=0x76e3850, rParent=...) at sfx2/source/devtools/DocumentModelTreeHandl chart isn't retrieved from there: 0 sc::tools::findChartsByName(ScDocShell*, short, std::basic_string_view<char16_t, std::char_traits<char16_t> >, sc::tools::ChartSourceType) (pDocShell=0x351baa0, nTab=0, rName=u"Object 1", eChartSourceType=sc::tools::ChartSourceType::CELL_RANGE) at sc/source/ui/unoobj/ChartTools.cxx:106 1 0x00007f6297305323 in ScChartsObj::GetObjectByName_Impl(rtl::OUString const&) const (this=0x77ce370, aName="Object 1") at sc/source/ui/unoobj/chartuno.cxx:126 2 0x00007f62973076b4 in ScChartsObj::getByName(rtl::OUString const&) (this=0x77ce370, aName="Object 1") at sc/source/ui/unoobj/chartuno.cxx:343 Indeed, if graph hasn't type ChartSourceType::CELL_RANGE, it could be ChartSourceType::PIVOT_TABLE Change-Id: Id5a248535b214ad5f114671c52e4592d87c9f54a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113777 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index d701437bcda3..1530ed818b92 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -125,6 +125,8 @@ rtl::Reference<ScChartObj> ScChartsObj::GetObjectByName_Impl(const OUString& aNa { if (sc::tools::findChartsByName(pDocShell, nTab, aName, sc::tools::ChartSourceType::CELL_RANGE)) return new ScChartObj( pDocShell, nTab, aName ); + if (sc::tools::findChartsByName(pDocShell, nTab, aName, sc::tools::ChartSourceType::PIVOT_TABLE)) + return new ScChartObj( pDocShell, nTab, aName ); return nullptr; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits