summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-04-07 22:26:30 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-04-22 10:19:55 +0200
commit613a80b855406d180a663a4aec974c40be195395 (patch)
tree4c262b4acbb1f783daf25a0192dee9cdd6a3774e
parent40868f520f9da24d3eaa5e0489da8657bc8383b4 (diff)
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 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 42e0ea0a6e4f48967d58fa95081c8ba5a6b08bc6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114361 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index 638d517b4083..ac10a2ad35ef 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -125,6 +125,8 @@ ScChartObj* ScChartsObj::GetObjectByName_Impl(const OUString& aName) const
{
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;
}