office-gobmx/include/editeng/urlfieldhelper.hxx
Mike Kaganski e590d1ab4a tdf#129712: check if outliner view pointer is valid to avoid crash
Regression after commit 64233bbaa0.

editenglo.dll!std::unique_ptr<EditView,std::default_delete<EditView>>::operator*()
	at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\memory(1886)
editenglo.dll!OutlinerView::GetEditView()
	at C:\lo\src\core\include\editeng\outliner.hxx(208)
sdlo.dll!sd::DrawViewShell::GetAttrState(SfxItemSet & rSet)
	at C:\lo\src\core\sd\source\ui\view\drviewsf.cxx(514)
sdlo.dll!SfxStubGraphicViewShellGetAttrState(SfxShell * pShell, SfxItemSet & rSet)
	at C:\lo\src\core\workdir\SdiTarget\sd\sdi\sdgslots.hxx(1524)
sfxlo.dll!SfxShell::CallState(void(*)(SfxShell *, SfxItemSet &) pFunc, SfxItemSet & rSet)
	at C:\lo\src\core\include\sfx2\shell.hxx(199)
sfxlo.dll!SfxDispatcher::FillState_(const SfxSlotServer & rSvr, SfxItemSet & rState, const SfxSlot * pRealSlot)
	at C:\lo\src\core\sfx2\source\control\dispatch.cxx(1672)
sfxlo.dll!SfxBindings::Update_Impl(SfxStateCache & rCache)
	at C:\lo\src\core\sfx2\source\control\bindings.cxx(270)
sfxlo.dll!SfxBindings::NextJob_Impl(const Timer * pTimer)
	at C:\lo\src\core\sfx2\source\control\bindings.cxx(1285)
sfxlo.dll!SfxBindings::NextJob(Timer * pTimer)
	at C:\lo\src\core\sfx2\source\control\bindings.cxx(1230)
sfxlo.dll!SfxBindings::LinkStubNextJob(void * instance, Timer * data)
	at C:\lo\src\core\sfx2\source\control\bindings.cxx(1227)
vcllo.dll!Link<Timer *,void>::Call(Timer * data)
	at C:\lo\src\core\include\tools\link.hxx(111)
vcllo.dll!Timer::Invoke()
	at C:\lo\src\core\vcl\source\app\timer.cxx(76)
vcllo.dll!Scheduler::ProcessTaskScheduling()
	at C:\lo\src\core\vcl\source\app\scheduler.cxx(478)
vcllo.dll!Scheduler::CallbackTaskScheduling()
	at C:\lo\src\core\vcl\source\app\scheduler.cxx(288)
vcllo.dll!SalTimer::CallCallback()
	at C:\lo\src\core\vcl\inc\saltimer.hxx(55)
vclplug_winlo.dll!WinSalTimer::ImplHandleElapsedTimer()
	at C:\lo\src\core\vcl\win\app\saltimer.cxx(164)
vclplug_winlo.dll!WinSalTimer::ImplHandleTimerEvent(unsigned __int64 aWPARAM)
	at C:\lo\src\core\vcl\win\app\saltimer.cxx(174)
vclplug_winlo.dll!SalComWndProc(HWND__ * __formal, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam, bool & rDef)
	at C:\lo\src\core\vcl\win\app\salinst.cxx(626)
vclplug_winlo.dll!SalComWndProcW(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam)
	at C:\lo\src\core\vcl\win\app\salinst.cxx(658)
user32.dll!UserCallWinProcCheckWow()
user32.dll!DispatchMessageWorker()
vclplug_winlo.dll!ImplSalDispatchMessage(const tagMSG * pMsg)
	at C:\lo\src\core\vcl\win\app\salinst.cxx(420)
vclplug_winlo.dll!ImplSalYield(bool bWait, bool bHandleAllCurrentEvents)
	at C:\lo\src\core\vcl\win\app\salinst.cxx(493)
vclplug_winlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents)
	at C:\lo\src\core\vcl\win\app\salinst.cxx(522)
vcllo.dll!ImplYield(bool i_bWait, bool i_bAllEvents)
	at C:\lo\src\core\vcl\source\app\svapp.cxx(446)
vcllo.dll!Application::Yield()
	at C:\lo\src\core\vcl\source\app\svapp.cxx(511)
vcllo.dll!Application::Execute()
	at C:\lo\src\core\vcl\source\app\svapp.cxx(427)
sofficeapp.dll!desktop::Desktop::Main()
	at C:\lo\src\core\desktop\source\app\app.cxx(1609)
vcllo.dll!ImplSVMain()
	at C:\lo\src\core\vcl\source\app\svmain.cxx(191)
vcllo.dll!SVMain()
	at C:\lo\src\core\vcl\source\app\svmain.cxx(226)
sofficeapp.dll!soffice_main()
	at C:\lo\src\core\desktop\source\app\sofficemain.cxx(171)
soffice.bin!sal_main()
	at C:\lo\src\core\desktop\source\app\main.c(48)
soffice.bin!main(int argc, char * * argv)
	at C:\lo\src\core\desktop\source\app\main.c(47)
soffice.bin!invoke_main()
	at d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(79)
soffice.bin!__scrt_common_main_seh()
	at d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(288)
soffice.bin!__scrt_common_main()
	at d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl(331)
soffice.bin!mainCRTStartup()
	at d:\agent\_work\5\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp(17)
kernel32.dll!BaseThreadInitThunk()
ntdll.dll!RtlUserThreadStart()

Change-Id: Ia9ba183bc1be2f22082ac3833e57435dd8462adf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86097
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-02 11:02:18 +01:00

28 lines
894 B
C++

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#pragma once
#include <sal/config.h>
#include <editeng/editengdllapi.h>
#include <editeng/outliner.hxx>
#include <editeng/editview.hxx>
class EDITENG_DLLPUBLIC URLFieldHelper
{
public:
static void RemoveURLField(EditView& pEditView);
static bool IsCursorAtURLField(const EditView& pEditView);
static bool IsCursorAtURLField(const OutlinerView* pOLV)
{
return pOLV && IsCursorAtURLField(pOLV->GetEditView());
}
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */