Kaydet (Commit) 58993431 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Remove unncessary, wrong downcast

...which caused

> sw/source/uibase/docvw/edtwin.cxx:4280:47: runtime error: downcast of address 0x6060015556a0 which does not point to an object of type 'SwDrawContact'
> 0x6060015556a0: note: object is of type 'SwFlyDrawContact'
>  11 07 80 2c  50 26 83 79 65 7f 00 00  d0 26 83 79 65 7f 00 00  80 63 a6 01 20 61 00 00  00 00 00 00
>               ^~~~~~~~~~~~~~~~~~~~~~~
>               vptr for 'SwFlyDrawContact'
>  SwEditWin::MouseButtonUp(MouseEvent const&) sw/source/uibase/docvw/edtwin.cxx:4280:47
>  ImplHandleMouseEvent(vcl::Window*, MouseNotifyEvent, bool, long, long, unsigned long, unsigned short, MouseEventModifiers) vcl/source/window/winproc.cxx:736:17
>  ImplHandleSalMouseButtonUp(vcl::Window*, SalMouseEvent*) vcl/source/window/winproc.cxx:2082:12
>  ImplWindowFrameProc(vcl::Window*, SalFrame*, unsigned short, void const*) vcl/source/window/winproc.cxx:2425:20
>  SalFrame::CallCallback(unsigned short, void const*) const vcl/inc/salframe.hxx:255:33
>  GtkSalFrame::signalButton(_GtkWidget*, _GdkEventButton*, void*) vcl/unx/gtk3/window/../../gtk/window/gtksalframe.cxx:3176:5
>  [...]

Change-Id: Ib9013eb3ff7546ee6534d5148d2505608a9d70f9
üst 125f0c95
......@@ -4277,7 +4277,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
if (pSdrView && pSdrView->PickObj(aDocPos, pSdrView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER ))
{
std::map<SwFrameFormat*, SwFrameFormat*> aTextBoxShapes = SwTextBoxHelper::findShapes(rSh.GetDoc());
SwDrawContact* pDrawContact = static_cast<SwDrawContact*>(GetUserCall(pObj));
auto pDrawContact = GetUserCall(pObj);
SwFrameFormat* pFormat = pDrawContact->GetFormat();
if (aTextBoxShapes.find(pFormat) == aTextBoxShapes.end())
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment