summaryrefslogtreecommitdiff
path: root/sw/source/uibase/docvw
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2024-09-29 22:00:58 +0200
committerJulien Nabet <serval2412@yahoo.fr>2024-09-30 08:45:19 +0200
commitc6cc724d8805215c7b5ad7b76cd167c6640e8e52 (patch)
tree2e5787034a8fa0e6bd32edb2e418282d70c2b6f7 /sw/source/uibase/docvw
parente5aff0ed177e218bfec7c9f57f393379c051166a (diff)
tdf#158323: CRASH when switch back from HTML to Normal View...
after edit in HTML code. bt: 0 rtl::Reference<SfxStyleSheetPool>::get (this=0xb8) at include/rtl/ref.hxx:205 1 0x00007f4361f3857c in SwDocStyleSheetPool::GetEEStyleSheetPool (this=0x0) at sw/inc/docstyle.hxx:236 2 0x00007f4362dcb8e2 in SwPostItMgr::SwPostItMgr (this=0x558439087f60, pView=0x5584387f7e80) at /home/julien/lo/libreoffice/sw/source/uibase/docvw/PostItMgr.cxx:229 3 0x00007f43630e6b14 in SwView::SwView (this=0x5584387f7e80, _rFrame=..., pOldSh=0x5584356fa360) at /home/julien/lo/libreoffice/sw/source/uibase/uiview/view.cxx:1003 4 0x00007f43632fee79 in SwWebView::SwWebView (this=0x5584387f7e80, _rFrame=..., _pShell=0x5584356fa360) at /home/julien/lo/libreoffice/sw/source/uibase/web/wview.cxx:85 5 0x00007f43632feb51 in SwWebView::CreateInstance (rFrame=..., pOldView=0x5584356fa360) at /home/julien/lo/libreoffice/sw/source/uibase/web/wview.cxx:67 6 0x00007f4393710655 in SfxViewFactory::CreateInstance (this=0x558434c3a090, rFrame=..., pOldSh=0x5584356fa360) at /home/julien/lo/libreoffice/sfx2/source/view/viewfac.cxx:26 7 0x00007f4393501e31 in SfxBaseModel::createViewController (this=0x558431de5a80, i_rViewName="Default", i_rArguments=empty uno::Sequence, i_rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x5584360bf520) at /home/julien/lo/libreoffice/sfx2/source/doc/sfxbasemodel.cxx:4334 8 0x00007f4393502a3f in non-virtual thunk to SfxBaseModel::createViewController(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) () at /home/julien/lo/libreoffice/instdir/program/libsfxlo.so 9 0x00007f43936b4ce4 in (anonymous namespace)::SfxFrameLoader_Impl::impl_createDocumentView (i_rModel=uno::Reference to (SwXTextDocument *) 0x558431de5b10, i_rFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x5584360bf520, i_rViewFactoryArgs=..., i_rViewName="Default") at /home/julien/lo/libreoffice/sfx2/source/view/frmload.cxx:577 10 0x00007f43936b1f6c in (anonymous namespace)::SfxFrameLoader_Impl::load (this=0x558436633660, rArgs=uno::Sequence of length 18 = {...}, _rTargetFrame=uno::Reference to ((anonymous namespace)::XFrameImpl *) 0x5584360bf520) at /home/julien/lo/libreoffice/sfx2/source/view/frmload.cxx:759 11 0x00007f439441ea51 in framework::LoadEnv::impl_loadContent (this=0x7ffdd69352c8) at /home/julien/lo/libreoffice/framework/source/loadenv/loadenv.cxx:1176 12 0x00007f439441b7d4 in framework::LoadEnv::start (this=0x7ffdd69352c8) at /home/julien/lo/libreoffice/framework/source/loadenv/loadenv.cxx:412 Regression from: https://git.libreoffice.org/core/+/d934aeace6e7049db3959421538ae382cb97b1d1%5E%21 tdf#103064 sw,editeng: make para styles work inside comments Change-Id: Ib9a1c9fe779ad14f93de0e1b3645beddb85e511d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174210 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sw/source/uibase/docvw')
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 03e2b9db6997..2d4ff760c04b 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -226,7 +226,9 @@ SwPostItMgr::SwPostItMgr(SwView* pView)
StartListening(*mpView->GetDocShell());
// listen to stylesheet pool to update on stylesheet rename,
// as EditTextObject references styles by name.
- StartListening(*static_cast<SwDocStyleSheetPool*>(mpView->GetDocShell()->GetStyleSheetPool())->GetEEStyleSheetPool());
+ SfxStyleSheetBasePool* pStyleSheetPool = mpView->GetDocShell()->GetStyleSheetPool();
+ if (pStyleSheetPool)
+ StartListening(*static_cast<SwDocStyleSheetPool*>(pStyleSheetPool)->GetEEStyleSheetPool());
if (!mvPostItFields.empty())
{
mbWaitingForCalcRects = true;