sc/source/ui/view/gridwin4.cxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-)
New commits: commit b9516ea478b7df97cd97c48d5462f0e544b6b584 Author: Dennis Francis <dennis.fran...@collabora.com> AuthorDate: Fri May 6 10:56:38 2022 +0530 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Thu Feb 9 11:44:42 2023 +0000 lok: do not recreate lok-drawview for every tile paint This lets the ScLOKDrawView live long enough for non-tile painting related invocation of its methods and hopefully those of its member objects. This is a blind fix for the following crash: /opt/collaboraoffice/program/../program/libsclo.so (anonymous namespace)::ScLOKProxyObjectContact::calculateGridOffsetForViewOjectContact(basegfx::B2DVector&, sdr::contact::ViewObjectContact const&) const ... /opt/collaboraoffice/program/libmergedlo.so SdrTextObj::NbcSetOutlinerParaObjectForText(std::unique_ptr<OutlinerParaObject, std::default_delete<OutlinerParaObject> >, SdrText*) /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/svx/source/svdraw/svdotext.cxx:1379 /opt/collaboraoffice/program/libmergedlo.so sdr::properties::TextProperties::ItemSetChanged(SfxItemSet const&) /opt/rh/devtoolset-10/root/usr/include/c++/10/bits/unique_ptr.h:360 /opt/collaboraoffice/program/libmergedlo.so sdr::properties::RectangleProperties::ItemSetChanged(SfxItemSet const&) /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/svx/source/sdr/properties/rectangleproperties.cxx:54 /opt/collaboraoffice/program/libmergedlo.so sdr::properties::DefaultProperties::SetObjectItem(SfxPoolItem const&) /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/svx/source/sdr/properties/defaultproperties.cxx:120 /opt/collaboraoffice/program/libscfiltlo.so XclTxo::XclTxo(XclExpRoot const&, EditTextObject const&, SdrObject*) /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/include/svl/cenumitm.hxx:26 /opt/collaboraoffice/program/libscfiltlo.so XclObjComment::XclObjComment(XclExpObjectManager&, tools::Rectangle const&, EditTextObject const&, SdrCaptionObj*, bool, ScAddress const&, tools::Rectangle const&, tools::Rectangle const&) /opt/rh/devtoolset-10/root/usr/include/c++/10/bits/unique_ptr.h:179 /opt/collaboraoffice/program/libscfiltlo.so XclExpNote::XclExpNote(XclExpRoot const&, ScAddress const&, ScPostIt const*, rtl::OUString const&) /opt/rh/devtoolset-10/root/usr/include/c++/10/tuple:137 /opt/collaboraoffice/program/libscfiltlo.so ExcTable::FillAsTableXml() /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/include/rtl/ref.hxx:65 /opt/collaboraoffice/program/libscfiltlo.so ExcDocument::ReadDoc() /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/sc/source/filter/excel/excdoc.cxx:747 /opt/collaboraoffice/program/libscfiltlo.so XclExpXmlStream::exportDocument() /home/collabora/jenkins/workspace/build_linux_co-2021_online_snapshot/sc/source/filter/excel/xestream.cxx:1107 /opt/collaboraoffice/program/libooxlo.so Change-Id: I248395cca1e2da37208fc449aca731175a5aa368 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133914 Tested-by: Andras Timar <andras.ti...@collabora.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> (cherry picked from commit c17c410706eab6e4d449b2a20a51bf3702329341) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143583 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146683 Tested-by: Jenkins diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index a7b814c233fb..6c9c2a7b1819 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1657,13 +1657,16 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice, { bool bPrintTwipsMsgs = comphelper::LibreOfficeKit::isCompatFlagSet( comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs); - mpLOKDrawView.reset(bPrintTwipsMsgs ? - new ScLOKDrawView( - &rDevice, - mrViewData) : - new FmFormView( - *pModel, - &rDevice)); + if (!mpLOKDrawView) + { + mpLOKDrawView.reset(bPrintTwipsMsgs ? + new ScLOKDrawView( + &rDevice, + mrViewData) : + new FmFormView( + *pModel, + &rDevice)); + } mpLOKDrawView->SetNegativeX(bLayoutRTL); mpLOKDrawView->ShowSdrPage(mpLOKDrawView->GetModel().GetPage(nTab));