summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-12-01 08:32:58 +0200
committerNoel Grandin <noel@peralex.com>2015-12-01 08:33:23 +0200
commitf34b4844473d08c0c264ba4453a875e32f5c326b (patch)
tree767815d013a60fcb159bc71cc9153b89d4a31124
parent5a3b930b30149fbcaac246726a0f547527161429 (diff)
tdf#95990 - Calc is crashed when you double click on function in Sideba
The problem arises because we can dispose ourselves like so: /home/noel/libo3/sc/source/ui/formdlg/dwfunctr.cxx:176 /home/noel/libo3/vcl/source/outdev/outdev.cxx:202 (this=0x252c548) at /home/noel/libo3/include/vcl/vclptr.hxx:206 (this=0x252c4c0) at /home/noel/libo3/sfx2/source/sidebar/SidebarPanelBase.cxx:85 (this=0x252c4c0) at /home/noel/libo3/cppuhelper/source/implbase.cxx:109 cppu::WeakComponentImplHelper5<com::sun::star::ui::XContextChangeEventListener, com::sun::star::ui::XUIElement, com::sun::star::ui::XToolPanel, com::sun::star::ui::XSidebarPanel, com::sun::star::ui::XUpdateModel>::dispose (this=0x252c4c0) at /home/noel/libo3/include/cppuhelper/compbase5.hxx:60 at /home/noel/libo3/sfx2/source/sidebar/Panel.cxx:88 /home/noel/libo3/vcl/source/outdev/outdev.cxx:202 (this=0x21dbbd0) at /home/noel/libo3/include/vcl/vclptr.hxx:206 (this=0x23c9a10, rPanels=std::__debug::vector of length 1, capacity 1 = {...}) at /home/noel/libo3/sfx2/source/sidebar/Deck.cxx:205 (this=0x2068b00, rDeckId="ScFunctionsDeck") at /home/noel/libo3/sfx2/source/sidebar/SidebarController.cxx:631 (this=0x2068b00, rDeckId="ScFunctionsDeck", bForceCreate=false) at /home/noel/libo3/sfx2/source/sidebar/SidebarController.cxx:566 (this=0x2068b00, rDeckDescriptor=..., rContext=...) at /home/noel/libo3/sfx2/source/sidebar/SidebarController.cxx:690 sfx2::sidebar::SidebarController::UpdateConfigurations (this=0x2068b00) at /home/noel/libo3/sfx2/source/sidebar/SidebarController.cxx:500 sfx2::sidebar::SidebarController::notifyContextChangeEvent (this=0x2068b00, rEvent=...) at /home/noel/libo3/sfx2/source/sidebar/SidebarController.cxx:275 namespace)::ContextChangeEventMultiplexer::BroadcastEventToSingleContainer (this=0x207bad0, rEventObject=..., rxEventFocus=uno::Reference to (ScTabViewObj *) 0x1d9d120) at /home/noel/libo3/framework/source/services/ContextChangeEventMultiplexer.cxx:286 namespace)::ContextChangeEventMultiplexer::broadcastContextChangeEvent (this=0x207bad0, rEventObject=..., rxEventFocus=uno::Reference to (ScTabViewObj *) 0x1d9d120) at /home/noel/libo3/framework/source/services/ContextChangeEventMultiplexer.cxx:265 sfx2::sidebar::ContextChangeBroadcaster::BroadcastContextChange (this=0x23f0e50, rxFrame=uno::Reference to ((anonymous namespace)::Frame *) 0x17d1798, rsModuleName="com.sun.star.sheet.SpreadsheetDocument", rsContextName="EditCell") at /home/noel/libo3/sfx2/source/sidebar/ContextChangeBroadcaster.cxx:99 sfx2::sidebar::ContextChangeBroadcaster::Activate (this=0x23f0e50, rxFrame=uno::Reference to ((anonymous namespace)::Frame *) 0x17d1798) at /home/noel/libo3/sfx2/source/sidebar/ContextChangeBroadcaster.cxx:51 (this=0x2190490, bIsActivated=true) at /home/noel/libo3/sfx2/source/control/shell.cxx:729 /home/noel/libo3/sfx2/source/control/shell.cxx:378 pFrame=0x1d5dea0, bMDI=true) at /home/noel/libo3/sfx2/source/control/shell.cxx:331 /home/noel/libo3/sfx2/source/control/dispatch.cxx:1503 /home/noel/libo3/sfx2/source/control/dispatch.cxx:158 rShell=...) at /home/noel/libo3/sfx2/source/view/viewsh.cxx:1420 (this=0x1d61fe0, eOST=OST_Editing, bForce=false) at /home/noel/libo3/sc/source/ui/view/tabvwsh4.cxx:809 pView=0x1d685c0, bActive=true) at /home/noel/libo3/sc/source/ui/view/tabvwsh4.cxx:753 rBC=..., rHint=...) at /home/noel/libo3/sc/source/ui/view/tabvwsh5.cxx:195 pEditEngine=0x20570d0, rCursorPos=...) at /home/noel/libo3/sc/source/ui/docshell/docsh3.cxx:78 eNewMode=SC_INPUT_TABLE, pInitText=0x0) at /home/noel/libo3/sc/source/ui/app/inputhdl.cxx:2339 eMode=SC_INPUT_TABLE, pInitText=0x0) at /home/noel/libo3/sc/source/ui/app/scmod.cxx:1404 /home/noel/libo3/sc/source/ui/formdlg/dwfunctr.cxx:826 (this=0x23d29a0) at /home/noel/libo3/sc/source/ui/formdlg/dwfunctr.cxx:962 (instance=0x23d29a0, data=...) at /home/noel/libo3/sc/source/ui/formdlg/dwfunctr.cxx:960 data=...) at /home/noel/libo3/include/tools/link.hxx:84 (__closure=0x7fffffff3ec0) at /home/noel/libo3/vcl/source/control/lstbox.cxx:973 ListBox::DoubleClick()::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...) at /usr/include/c++/5/functional:1871 (this=0x7fffffff3ec0) at /usr/include/c++/5/functional:2271 Control::ImplCallEventListenersAndHandler(unsigned long, std::function<void ()>) (this=0x23e6260, nEvent=1109, callHandler=...) at /home/noel/libo3/vcl/source/control/ctrl.cxx:333 /home/noel/libo3/vcl/source/control/lstbox.cxx:973 at /home/noel/libo3/vcl/source/control/lstbox.cxx:294 (instance=0x23e6260, data=0x23fd160) at /home/noel/libo3/vcl/source/control/lstbox.cxx:292 (this=0x23fd4a0, data=0x23fd160) at /home/noel/libo3/include/tools/link.hxx:84 (this=0x23fd160, rMEvt=...) at /home/noel/libo3/vcl/source/control/ilstbox.cxx:874 and then two lines later we need access to things we have just disposed: at /home/noel/libo3/include/rtl/ref.hxx:169 (this=0x258) at /home/noel/libo3/include/vcl/vclptr.hxx:187 nIndex=0) at /home/noel/libo3/vcl/source/control/lstbox.cxx:1088 at /home/noel/libo3/vcl/source/control/lstbox.cxx:1076 /home/noel/libo3/sc/source/ui/formdlg/dwfunctr.cxx:828 Change-Id: I0ee07c7753ac06d042653f443df9921f4eebd8f2
-rw-r--r--sc/source/ui/formdlg/dwfunctr.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx
index 9cb5a305258f..a44b021bd237 100644
--- a/sc/source/ui/formdlg/dwfunctr.cxx
+++ b/sc/source/ui/formdlg/dwfunctr.cxx
@@ -112,7 +112,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP,
eSfxNewAlignment=SfxChildAlignment::RIGHT;
eSfxOldAlignment=eSfxNewAlignment;
aFiFuncDesc->SetUpdateMode(true);
- pAllFuncList=aFuncList.get();
+ pAllFuncList=aFuncList;
aDDFuncList->Disable();
aDDFuncList->Hide();
nArgs=0;
@@ -275,7 +275,7 @@ void ScFunctionDockWin::SetSize()
aPrivatSplit->Hide();
aFuncList->Disable();
aFuncList->Hide();
- pAllFuncList=aDDFuncList.get();
+ pAllFuncList=aDDFuncList;
SelHdl(*aCatBox.get());
aDDFuncList->SelectEntryPos(nSelEntry);
}
@@ -293,7 +293,7 @@ void ScFunctionDockWin::SetSize()
aPrivatSplit->Show();
aFuncList->Enable();
aFuncList->Show();
- pAllFuncList=aFuncList.get();
+ pAllFuncList=aFuncList;
SelHdl(*aCatBox.get());
aFuncList->SelectEntryPos(nSelEntry);
}
@@ -822,6 +822,9 @@ void ScFunctionDockWin::DoEnter()
if(!pScMod->IsEditMode())
{
pScMod->SetInputMode(SC_INPUT_TABLE);
+ // the above call can result in us being disposed
+ if (OutputDevice::isDisposed())
+ return;
aString = "=";
aString += pAllFuncList->GetSelectEntry();
if (pHdl)