[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sc/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 22 08:20:28 UTC 2021
sc/source/ui/unoobj/chartuno.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 613a80b855406d180a663a4aec974c40be195395
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Wed Apr 7 22:26:30 2021 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Apr 22 10:19:55 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
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 42e0ea0a6e4f48967d58fa95081c8ba5a6b08bc6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114361
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
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;
}
More information about the Libreoffice-commits
mailing list