diff options
author | Dennis Francis <dennis.francis@collabora.com> | 2022-05-06 10:56:38 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2022-06-09 21:32:54 +0200 |
commit | c17c410706eab6e4d449b2a20a51bf3702329341 (patch) | |
tree | 554c3d7af0224004c2d96b13d39fc70b8b9fd966 /sc | |
parent | f88b5a5f5c18d23a2b479eb9556026e19fb1fe42 (diff) |
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.timar@collabora.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index 2580b25fafd2..0c697bf085ef 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -1571,13 +1571,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)); |