LibreOffice Module vcl (master) 1
svmain.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <sal/config.h>
21#include <sal/log.hxx>
22
23#include <cassert>
24
25#include <osl/file.hxx>
26#include <osl/signal.h>
27
28#include <desktop/exithelper.h>
29
35#include <utility>
36#include <vcl/QueueInfo.hxx>
37#include <vcl/svapp.hxx>
38#include <vcl/vclmain.hxx>
39#include <vcl/wrkwin.hxx>
40#include <vcl/cvtgrf.hxx>
41#include <vcl/scheduler.hxx>
42#include <vcl/image.hxx>
43#include <vcl/ImageTree.hxx>
44#include <vcl/settings.hxx>
46#include <configsettings.hxx>
47#include <vcl/lazydelete.hxx>
50#include <vcl/menu.hxx>
51#include <vcl/virdev.hxx>
52#include <vcl/print.hxx>
53#include <debugevent.hxx>
54#include <scrwnd.hxx>
55#include <windowdev.hxx>
56#include <svdata.hxx>
57
58#ifdef _WIN32
59#include <svsys.h>
60#include <process.h>
61#include <ole2.h>
62#else
63#include <stdlib.h>
64#endif
65
66#ifdef ANDROID
68#include <jni.h>
69#endif
70
71#include <impfontcache.hxx>
72#include <salinst.hxx>
73#include <vcl/svmain.hxx>
74#include <dbggui.hxx>
75#include <accmgr.hxx>
77#include <print.h>
78#include <salsys.hxx>
79#include <saltimer.hxx>
81
82#include <config_features.h>
83#include <config_feature_opencl.h>
84
85#include <osl/process.h>
86#include <com/sun/star/lang/XComponent.hpp>
87#include <com/sun/star/frame/Desktop.hpp>
88
89#ifdef _WIN32
90#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
91#endif
92
93#include <comphelper/lok.hxx>
95#include <uno/current_context.hxx>
96
97#include <opencl/OpenCLZone.hxx>
98#include <opengl/zone.hxx>
99#include <skia/zone.hxx>
100#include <watchdog.hxx>
101
104
105#if OSL_DEBUG_LEVEL > 0
106#include <typeinfo>
107#include <rtl/strbuf.hxx>
108#endif
109
110#ifdef LINUX
111#include <unx/gendata.hxx>
112#endif
113
114using namespace ::com::sun::star;
115
117
118static oslSignalAction VCLExceptionSignal_impl( void* /*pData*/, oslSignalInfo* pInfo)
119{
120 static volatile bool bIn = false;
121
122 // if we crash again, bail out immediately
123 if ( bIn || g_bIsLeanException)
124 return osl_Signal_ActCallNextHdl;
125
127
128 // UAE
129 if ( (pInfo->Signal == osl_Signal_AccessViolation) ||
130 (pInfo->Signal == osl_Signal_IntegerDivideByZero) ||
131 (pInfo->Signal == osl_Signal_FloatDivideByZero) ||
132 (pInfo->Signal == osl_Signal_DebugBreak) )
133 {
134 nVCLException = ExceptionCategory::System;
135#if HAVE_FEATURE_OPENGL
138#endif
139#if HAVE_FEATURE_SKIA
140 if (SkiaZone::isInZone())
142#endif
143#if HAVE_FEATURE_OPENCL
144 if (OpenCLZone::isInZone())
145 {
147#ifdef _WIN32
148 if (OpenCLInitialZone::isInZone())
149 TerminateProcess(GetCurrentProcess(), EXITHELPER_NORMAL_RESTART);
150#endif
151 }
152#endif
153 }
154
155 // DISPLAY-Unix
156 if ((pInfo->Signal == osl_Signal_User) &&
157 (pInfo->UserSignal == OSL_SIGNAL_USER_X11SUBSYSTEMERROR) )
158 nVCLException = ExceptionCategory::UserInterface;
159
160 if ( nVCLException != ExceptionCategory::NONE )
161 {
162 bIn = true;
163
165 if( aLock.isAcquired())
166 {
167 // do not stop timer because otherwise the UAE-Box will not be painted as well
168 ImplSVData* pSVData = ImplGetSVData();
169 if ( pSVData->mpApp )
170 {
173 pSVData->mpApp->Exception( nVCLException );
175 }
176 }
177 bIn = false;
178 }
179
180 return osl_Signal_ActCallNextHdl;
181
182}
183
185{
186 // The 'real' SVMain()
187 ImplSVData* pSVData = ImplGetSVData();
188
189 SAL_WARN_IF( !pSVData->mpApp, "vcl", "no instance of class Application" );
190
191 int nReturn = EXIT_FAILURE;
192
193 const bool bWasInitVCL = IsVCLInit();
194 const bool bInit = bWasInitVCL || InitVCL();
195 int nRet = 0;
196 if (!bWasInitVCL && bInit && pSVData->mpDefInst->SVMainHook(&nRet))
197 return nRet;
198
199 if( bInit )
200 {
201 // call application main
202 pSVData->maAppData.mbInAppMain = true;
203 nReturn = pSVData->mpApp->Main();
204 pSVData->maAppData.mbInAppMain = false;
205 }
206
207 if( pSVData->mxDisplayConnection.is() )
208 {
209 pSVData->mxDisplayConnection->terminate();
210 pSVData->mxDisplayConnection.clear();
211 }
212
213 // This is a hack to work around the problem of the asynchronous nature
214 // of bridging accessibility through Java: on shutdown there might still
215 // be some events in the AWT EventQueue, which need the SolarMutex which
216 // - on the other hand - is destroyed in DeInitVCL(). So empty the queue
217 // here ..
218 if( pSVData->mxAccessBridge.is() )
219 {
220 {
221 SolarMutexReleaser aReleaser;
222 pSVData->mxAccessBridge->dispose();
223 }
224 pSVData->mxAccessBridge.clear();
225 }
226
228 DeInitVCL();
229
230 return nReturn;
231}
232
234{
235 return ImplSVMain();
236}
237
238// This variable is set when no Application object has been instantiated
239// before InitVCL is called
240static Application * pOwnSvApp = nullptr;
241
242// Exception handler. pExceptionHandler != NULL => VCL already inited
243static oslSignalHandler pExceptionHandler = nullptr;
244
245namespace {
246
247class DesktopEnvironmentContext: public cppu::WeakImplHelper< css::uno::XCurrentContext >
248{
249public:
250 explicit DesktopEnvironmentContext( css::uno::Reference< css::uno::XCurrentContext > ctx)
251 : m_xNextContext(std::move( ctx )) {}
252
253 // XCurrentContext
254 virtual css::uno::Any SAL_CALL getValueByName( const OUString& Name ) override;
255
256private:
257 css::uno::Reference< css::uno::XCurrentContext > m_xNextContext;
258};
259
260}
261
262uno::Any SAL_CALL DesktopEnvironmentContext::getValueByName( const OUString& Name)
263{
264 uno::Any retVal;
265
266 if ( Name == "system.desktop-environment" )
267 {
269 }
270 else if( m_xNextContext.is() )
271 {
272 // Call next context in chain if found
273 retVal = m_xNextContext->getValueByName( Name );
274 }
275 return retVal;
276}
277
279{
280 ImplSVData* pSVData = ImplGetSVData();
281 return pExceptionHandler != nullptr &&
282 pSVData->mpApp != nullptr &&
283 pSVData->mpDefInst != nullptr;
284}
285
286#ifdef DBG_UTIL
287namespace vclmain
288{
289 bool isAlive()
290 {
291 return ImplGetSVData()->mpDefInst;
292 }
293}
294#endif
295
296
298{
299 if (IsVCLInit())
300 {
301 SAL_INFO("vcl.app", "Double initialization of vcl");
302 return true;
303 }
304
305 if( pExceptionHandler != nullptr )
306 return false;
307
309
310 if( !ImplGetSVData()->mpApp )
311 {
312 pOwnSvApp = new Application();
313 }
314
315 ImplSVData* pSVData = ImplGetSVData();
316
317 // remember Main-Thread-Id
318 pSVData->mnMainThreadId = ::osl::Thread::getCurrentIdentifier();
319
320 // Initialize Sal
321 pSVData->mpDefInst = CreateSalInstance();
322 if ( !pSVData->mpDefInst )
323 return false;
324 pSVData->mpDefInst->AcquireYieldMutex();
325
326 // Desktop Environment context (to be able to get value of "system.desktop-environment" as soon as possible)
327 css::uno::setCurrentContext(
328 new DesktopEnvironmentContext( css::uno::getCurrentContext() ) );
329
330 // Initialize application instance (should be done after initialization of VCL SAL part)
331 if (pSVData->mpApp)
332 {
333 // call init to initialize application class
334 // soffice/sfx implementation creates the global service manager
335 pSVData->mpApp->Init();
336 }
337
338 try
339 {
340 //Now that uno has been bootstrapped we can ask the config what the UI language is so that we can
341 //force that in as $LANGUAGE. That way we can get gtk to render widgets RTL
342 //if we have a RTL UI in an otherwise LTR locale and get gettext using externals (e.g. python)
343 //to match their translations to our preferred UI language
344 OUString aLocaleString(SvtSysLocaleOptions().GetRealUILanguageTag().getGlibcLocaleString(u".UTF-8"));
345 if (!aLocaleString.isEmpty())
346 {
347 MsLangId::getSystemUILanguage(); //call this now to pin what the system UI really was
348 OUString envVar("LANGUAGE");
349 osl_setEnvironment(envVar.pData, aLocaleString.pData);
350 }
351 }
352 catch (const uno::Exception &)
353 {
354 TOOLS_INFO_EXCEPTION("vcl.app", "Unable to get ui language:");
355 }
356
357 pSVData->mpDefInst->AfterAppInit();
358
359 // Fetch AppFileName and make it absolute before the workdir changes...
360 OUString aExeFileName;
361 osl_getExecutableFile( &aExeFileName.pData );
362
363 // convert path to native file format
364 OUString aNativeFileName;
365 osl::FileBase::getSystemPathFromFileURL( aExeFileName, aNativeFileName );
366 pSVData->maAppData.mxAppFileName = aNativeFileName;
367
368 // Initialize global data
369 pSVData->maGDIData.mxScreenFontList = std::make_shared<vcl::font::PhysicalFontCollection>();
370 pSVData->maGDIData.mxScreenFontCache = std::make_shared<ImplFontCache>();
371 pSVData->maGDIData.mxGrfConverter.reset(new GraphicConverter);
372
373 g_bIsLeanException = getenv("LO_LEAN_EXCEPTION") != nullptr;
374 // Set exception handler
375 pExceptionHandler = osl_addSignalHandler(VCLExceptionSignal_impl, nullptr);
376
377#ifndef NDEBUG
379#endif
380
381#if OSL_DEBUG_LEVEL > 0
383#endif
384
385#ifndef _WIN32
386 // Clear startup notification details for child processes
387 // See https://bugs.freedesktop.org/show_bug.cgi?id=11375 for discussion
388 unsetenv("DESKTOP_STARTUP_ID");
389#endif
390
391 return true;
392}
393
394namespace
395{
396
402class VCLUnoWrapperDeleter : public cppu::WeakImplHelper<css::lang::XEventListener>
403{
404 virtual void SAL_CALL disposing(lang::EventObject const& rSource) override;
405};
406
407void
408VCLUnoWrapperDeleter::disposing(lang::EventObject const& /* rSource */)
409{
410 ImplSVData* const pSVData = ImplGetSVData();
411 if (pSVData && pSVData->mpUnoWrapper)
412 {
413 pSVData->mpUnoWrapper->Destroy();
414 pSVData->mpUnoWrapper = nullptr;
415 }
416}
417
418}
419
421{
422 // The LOK Windows map container should be empty
424
425 //rhbz#1444437, when using LibreOffice like a library you can't realistically
426 //tear everything down and recreate them on the next call, there's too many
427 //(c++) singletons that point to stuff that gets deleted during shutdown
428 //which won't be recreated on restart.
430 return;
431
432 {
433 SolarMutexReleaser r; // unblock threads blocked on that so we can join
434 ::comphelper::JoinAsyncEventNotifiers();
435 }
436 ImplSVData* pSVData = ImplGetSVData();
437
438 // lp#1560328: clear cache before disposing rest of VCL
439 if(pSVData->mpBlendFrameCache)
440 pSVData->mpBlendFrameCache->m_aLastResult.Clear();
441 pSVData->mbDeInit = true;
442
444
445#if OSL_DEBUG_LEVEL > 0
446 OStringBuffer aBuf( 256 );
447 aBuf.append( "DeInitVCL: some top Windows are still alive\n" );
449 tools::Long nBadTopWindows = nTopWindowCount;
450 for( tools::Long i = 0; i < nTopWindowCount; i++ )
451 {
453 // default window will be destroyed further down
454 // but may still be useful during deinit up to that point
455 if( pWin == pSVData->mpDefaultWin )
456 nBadTopWindows--;
457 else
458 {
459 aBuf.append( "text = \"" );
460 aBuf.append( OUStringToOString( pWin->GetText(), osl_getThreadTextEncoding() ) );
461 aBuf.append( "\" type = \"" );
462 aBuf.append( typeid(*pWin).name() );
463 aBuf.append( "\", ptr = 0x" );
464 aBuf.append( reinterpret_cast<sal_Int64>( pWin ), 16 );
465 aBuf.append( "\n" );
466 }
467 }
468 SAL_WARN_IF( nBadTopWindows!=0, "vcl", aBuf.getStr() );
469#endif
470
472
473 osl_removeSignalHandler( pExceptionHandler);
474 pExceptionHandler = nullptr;
475
476 // free global data
477 pSVData->maGDIData.mxGrfConverter.reset();
478 pSVData->mpSettingsConfigItem.reset();
479
480 // prevent unnecessary painting during Scheduler shutdown
481 // as this processes all pending events in debug builds.
483
485
486 pSVData->mpWinData->maMsgBoxImgList.clear();
487 pSVData->maCtrlData.maCheckImgList.clear();
488 pSVData->maCtrlData.maRadioImgList.clear();
489 pSVData->maCtrlData.mpDisclosurePlus.reset();
490 pSVData->maCtrlData.mpDisclosureMinus.reset();
491 pSVData->mpDefaultWin.disposeAndClear();
492
493#if defined _WIN32
494 // See GetSystemClipboard (vcl/source/treelist/transfer2.cxx):
495 if (auto const comp = css::uno::Reference<css::lang::XComponent>(
496 pSVData->m_xSystemClipboard, css::uno::UNO_QUERY))
497 {
498 SolarMutexReleaser r; // unblock pending "clipboard content changed" notifications
499 comp->dispose(); // will use s_aClipboardSingletonMutex for CWinClipboard
500 }
501 pSVData->m_xSystemClipboard.clear();
502#endif
503
504#ifndef NDEBUG
506#endif
507
508 if ( pSVData->mpUnoWrapper )
509 {
510 try
511 {
512 uno::Reference<frame::XDesktop2> const xDesktop = frame::Desktop::create(
514 xDesktop->addEventListener(new VCLUnoWrapperDeleter);
515 }
516 catch (uno::Exception const&)
517 {
518 // ignore
519 }
520 }
521
522 if( pSVData->mpApp || pSVData->maDeInitHook.IsSet() )
523 {
524 SolarMutexReleaser aReleaser;
525 // call deinit to deinitialize application class
526 // soffice/sfx implementation disposes the global service manager
527 // Warning: After this call you can't call uno services
528 if( pSVData->mpApp )
529 {
530 pSVData->mpApp->DeInit();
531 }
532 if( pSVData->maDeInitHook.IsSet() )
533 {
534 pSVData->maDeInitHook.Call(nullptr);
535 }
536 }
537
538 if ( pSVData->maAppData.mxSettings )
539 {
540 if ( pSVData->maAppData.mpCfgListener )
541 {
542 pSVData->maAppData.mxSettings->GetSysLocale().GetOptions().RemoveListener( pSVData->maAppData.mpCfgListener );
543 delete pSVData->maAppData.mpCfgListener;
544 }
545
546 pSVData->maAppData.mxSettings.reset();
547 }
548 if ( pSVData->maAppData.mpAccelMgr )
549 {
550 delete pSVData->maAppData.mpAccelMgr;
551 pSVData->maAppData.mpAccelMgr = nullptr;
552 }
553 pSVData->maAppData.maKeyListeners.clear();
554 pSVData->mpBlendFrameCache.reset();
555
557
558 // destroy all Sal interfaces before destroying the instance
559 // and thereby unloading the plugin
560 pSVData->mpSalSystem.reset();
561 assert( !pSVData->maSchedCtx.mpSalTimer );
562 delete pSVData->maSchedCtx.mpSalTimer;
563 pSVData->maSchedCtx.mpSalTimer = nullptr;
564
565 pSVData->mpDefaultWin = nullptr;
566 pSVData->mpIntroWindow = nullptr;
567 pSVData->maAppData.mpActivePopupMenu = nullptr;
568 pSVData->maAppData.mpWheelWindow = nullptr;
569 pSVData->maGDIData.mpFirstWinGraphics = nullptr;
570 pSVData->maGDIData.mpLastWinGraphics = nullptr;
571 pSVData->maGDIData.mpFirstVirGraphics = nullptr;
572 pSVData->maGDIData.mpLastVirGraphics = nullptr;
573 pSVData->maGDIData.mpFirstPrnGraphics = nullptr;
574 pSVData->maGDIData.mpLastPrnGraphics = nullptr;
575 pSVData->maGDIData.mpFirstVirDev = nullptr;
576 pSVData->maGDIData.mpFirstPrinter = nullptr;
577 pSVData->maFrameData.mpFirstFrame = nullptr;
578 pSVData->maFrameData.mpAppWin = nullptr;
579 pSVData->maFrameData.mpActiveApplicationFrame = nullptr;
580 pSVData->mpWinData->mpCaptureWin = nullptr;
581 pSVData->mpWinData->mpLastDeacWin = nullptr;
582 pSVData->mpWinData->mpFirstFloat = nullptr;
583 pSVData->mpWinData->mpExecuteDialogs.clear();
584 pSVData->mpWinData->mpExtTextInputWin = nullptr;
585 pSVData->mpWinData->mpTrackWin = nullptr;
586 pSVData->mpWinData->mpAutoScrollWin = nullptr;
587 pSVData->mpWinData->mpLastWheelWindow = nullptr;
588
589 pSVData->maGDIData.mxScreenFontList.reset();
590 pSVData->maGDIData.mxScreenFontCache.reset();
591 // we are iterating over a map and doing erase while inside a loop which is doing erase
592 // hence we can't use clear() here
594 { return true; });
595
598
599 // Deinit Sal
600 if (pSVData->mpDefInst)
601 {
603 DestroySalInstance( pSVData->mpDefInst );
604 pSVData->mpDefInst = nullptr;
605 }
606
607 // This only works on Linux. On Mac and Windows I get very
608 // weird segment violations.
609#if defined LINUX
610 delete pSVData->mpSalData;
611#endif
612
613 if( pOwnSvApp )
614 {
615 delete pOwnSvApp;
616 pOwnSvApp = nullptr;
617 }
618
620}
621
622namespace {
623
624// only one call is allowed
625struct WorkerThreadData
626{
627 oslWorkerFunction pWorker;
628 void * pThreadData;
629 WorkerThreadData( oslWorkerFunction pWorker_, void * pThreadData_ )
630 : pWorker( pWorker_ )
631 , pThreadData( pThreadData_ )
632 {
633 }
634};
635
636}
637
638#ifdef _WIN32
639static HANDLE hThreadID = nullptr;
640static DWORD WINAPI threadmain( _In_ LPVOID pArgs )
641{
642 OleInitialize( nullptr );
643 static_cast<WorkerThreadData*>(pArgs)->pWorker( static_cast<WorkerThreadData*>(pArgs)->pThreadData );
644 delete static_cast<WorkerThreadData*>(pArgs);
645 OleUninitialize();
646 hThreadID = nullptr;
647 return 0;
648}
649#else
650static oslThread hThreadID = nullptr;
651extern "C"
652{
653static void MainWorkerFunction( void* pArgs )
654{
655 static_cast<WorkerThreadData*>(pArgs)->pWorker( static_cast<WorkerThreadData*>(pArgs)->pThreadData );
656 delete static_cast<WorkerThreadData*>(pArgs);
657 hThreadID = nullptr;
658}
659} // extern "C"
660#endif
661
662void CreateMainLoopThread( oslWorkerFunction pWorker, void * pThreadData )
663{
664#ifdef _WIN32
665 // sal thread always call CoInitializeEx, so a system dependent implementation is necessary
666
667 DWORD uThreadID;
668 hThreadID = CreateThread(
669 nullptr, // no security handle
670 0, // stacksize 0 means default
671 threadmain, // thread worker function
672 new WorkerThreadData( pWorker, pThreadData ), // arguments for worker function
673 0, // 0 means: create immediately otherwise use CREATE_SUSPENDED
674 &uThreadID ); // thread id to fill
675#else
676 hThreadID = osl_createThread( MainWorkerFunction, new WorkerThreadData( pWorker, pThreadData ) );
677#endif
678}
679
681{
682 if( hThreadID )
683 {
684#ifdef _WIN32
685 WaitForSingleObject(hThreadID, INFINITE);
686#else
687 osl_joinWithThread(hThreadID);
688 osl_destroyThread( hThreadID );
689#endif
690 }
691}
692
693/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class used mainly for the LibreOffice Desktop class.
Definition: svapp.hxx:234
static tools::Long GetTopWindowCount()
Return the number of top-level windows being used by the application.
Definition: svapp.cxx:1182
virtual void Init()
Initialize the application itself.
Definition: svapp.cxx:198
static vcl::Window * GetTopWindow(tools::Long nIndex)
Get the nth top window.
Definition: svapp.cxx:1196
static SystemWindowFlags GetSystemWindowMode()
Get the system window mode of dialogs.
Definition: svapp.cxx:1568
virtual void Exception(ExceptionCategory nCategory)
Handles an error.
Definition: svapp.cxx:243
static void SetSystemWindowMode(SystemWindowFlags nMode)
Make a dialog box a system window or not.
Definition: svapp.cxx:1563
virtual int Main()
Pure virtual entrypoint to the application.
Definition: svapp.cxx:177
static const OUString & GetDesktopEnvironment()
Get the desktop environment the process is currently running in.
Definition: svapp.cxx:1714
virtual void DeInit()
Deinitialized the application itself.
Definition: svapp.cxx:206
static bool isInZone()
static DebugEventInjector * getCreate()
Definition: debugevent.cxx:258
static void clearTemporaryFontFiles()
Removes all temporary fonts in the path used by fileUrlForTemporaryFont().
static VCL_DLLPUBLIC ImageTree & get()
Definition: ImageTree.cxx:16
VCL_DLLPUBLIC void shutdown()
a crude form of life cycle control (called from DeInitVCL; otherwise, if the ImplImageTree singleton ...
Definition: ImageTree.cxx:57
static LanguageType getSystemUILanguage()
static void hardDisable()
static void hardDisable()
Called from a signal handler or watchdog thread if we get a crash or hang in some GL code.
virtual bool SVMainHook(int *)
Definition: salinst.hxx:95
void AcquireYieldMutex(sal_uInt32 nCount=1)
Definition: salvtables.cxx:149
sal_uInt32 ReleaseYieldMutexAll()
Definition: salvtables.cxx:147
virtual void AfterAppInit()
Definition: salinst.hxx:94
static void ImplDeInitScheduler()
Definition: scheduler.cxx:101
static void hardDisable()
A helper class that calls Application::ReleaseSolarMutex() in its constructor and restores the mutex ...
Definition: svapp.hxx:1443
virtual void Destroy()=0
void disposeAndClear()
Definition: vclptr.hxx:200
static void stop()
Definition: watchdog.cxx:148
void remove_if(UnaryPredicate pred)
std::pair< Key, Value > key_value_pair_t
static void SAL_DLLPRIVATE ImplDeleteOnDeInit()
Definition: lazydelete.cxx:46
guard class that uses tryToAcquire() and has isAcquired() to check
Definition: svapp.hxx:1394
static bool IsLOKWindowsEmpty()
check if LOK Window container is empty
Definition: window.cxx:3216
virtual OUString GetText() const
Definition: window.cxx:3060
void DbgGUIInitSolarMutexCheck()
Definition: dbggui.cxx:38
void DbgGUIDeInitSolarMutexCheck()
Definition: dbggui.cxx:43
#define TOOLS_INFO_EXCEPTION(area, stream)
float u
Mutex aLock
ExceptionCategory
EXITHELPER_NORMAL_RESTART
#define SAL_WARN_IF(condition, area, stream)
#define SAL_INFO(area, stream)
aBuf
Reference< XComponentContext > getProcessComponentContext()
int i
ctx
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
comp
long Long
bool isAlive()
Definition: svmain.cxx:289
void ImplDeletePrnQueueList()
Definition: print.cxx:398
void DestroySalInstance(SalInstance *pInst)
Definition: salplug.cxx:359
SalInstance * CreateSalInstance()
Definition: salplug.cxx:280
VclPtr< ImplWheelWindow > mpWheelWindow
Definition: svdata.hxx:152
std::vector< Link< VclWindowEvent &, bool > > maKeyListeners
Definition: svdata.hxx:143
std::optional< OUString > mxAppFileName
Definition: svdata.hxx:147
std::optional< AllSettings > mxSettings
Definition: svdata.hxx:139
VclPtr< PopupMenu > mpActivePopupMenu
Definition: svdata.hxx:151
LocaleConfigurationListener * mpCfgListener
Definition: svdata.hxx:140
ImplAccelManager * mpAccelMgr
Definition: svdata.hxx:145
bool mbInAppMain
Definition: svdata.hxx:157
std::vector< Image > maCheckImgList
Definition: svdata.hxx:278
std::unique_ptr< Image > mpDisclosurePlus
Definition: svdata.hxx:280
std::unique_ptr< Image > mpDisclosureMinus
Definition: svdata.hxx:281
std::vector< Image > maRadioImgList
Definition: svdata.hxx:279
ImplSVCtrlData maCtrlData
Definition: svdata.hxx:404
ImplSchedulerContext maSchedCtx
Definition: svdata.hxx:399
bool mbDeInit
Definition: svdata.hxx:395
ImplSVFrameData maFrameData
Definition: svdata.hxx:402
oslThreadIdentifier mnMainThreadId
Definition: svdata.hxx:412
UnoWrapperBase * mpUnoWrapper
Definition: svdata.hxx:407
SalInstance * mpDefInst
Definition: svdata.hxx:392
rtl::Reference< vcl::DisplayConnectionDispatch > mxDisplayConnection
Definition: svdata.hxx:413
ImplSVGDIData maGDIData
Definition: svdata.hxx:401
std::unique_ptr< BlendFrameCache > mpBlendFrameCache
Definition: svdata.hxx:410
Application * mpApp
Definition: svdata.hxx:393
Link< LinkParamNone *, void > maDeInitHook
Definition: svdata.hxx:426
css::uno::Reference< css::lang::XComponent > mxAccessBridge
Definition: svdata.hxx:415
VclPtr< WorkWindow > mpDefaultWin
Definition: svdata.hxx:394
ImplSVWinData * mpWinData
Definition: svdata.hxx:403
ImplSVAppData maAppData
Definition: svdata.hxx:400
std::unique_ptr< SalSystem > mpSalSystem
Definition: svdata.hxx:396
std::unique_ptr< vcl::SettingsConfigItem > mpSettingsConfigItem
Definition: svdata.hxx:416
SalData * mpSalData
Definition: svdata.hxx:391
VclPtr< vcl::Window > mpIntroWindow
Definition: svdata.hxx:408
VclPtr< WorkWindow > mpAppWin
Definition: svdata.hxx:247
VclPtr< vcl::Window > mpFirstFrame
Definition: svdata.hxx:245
VclPtr< vcl::Window > mpActiveApplicationFrame
Definition: svdata.hxx:246
o3tl::lru_map< OUString, BitmapEx > maThemeImageCache
Definition: svdata.hxx:238
VclPtr< vcl::WindowOutputDevice > mpLastWinGraphics
Definition: svdata.hxx:220
VclPtr< OutputDevice > mpLastVirGraphics
Definition: svdata.hxx:222
VclPtr< Printer > mpFirstPrnGraphics
Definition: svdata.hxx:223
lru_scale_cache maScaleCache
Definition: svdata.hxx:231
std::shared_ptr< vcl::font::PhysicalFontCollection > mxScreenFontList
Definition: svdata.hxx:229
o3tl::lru_map< OUString, gfx::DrawRoot > maThemeDrawCommandsCache
Definition: svdata.hxx:239
VclPtr< Printer > mpFirstPrinter
Definition: svdata.hxx:227
std::shared_ptr< ImplFontCache > mxScreenFontCache
Definition: svdata.hxx:230
std::unique_ptr< GraphicConverter > mxGrfConverter
Definition: svdata.hxx:233
VclPtr< VirtualDevice > mpFirstVirDev
Definition: svdata.hxx:225
VclPtr< OutputDevice > mpFirstVirGraphics
Definition: svdata.hxx:221
VclPtr< vcl::WindowOutputDevice > mpFirstWinGraphics
Definition: svdata.hxx:219
VclPtr< Printer > mpLastPrnGraphics
Definition: svdata.hxx:224
VclPtr< vcl::Window > mpLastWheelWindow
Definition: svdata.hxx:265
VclPtr< FloatingWindow > mpFirstFloat
Definition: svdata.hxx:258
VclPtr< vcl::Window > mpLastDeacWin
Definition: svdata.hxx:257
std::vector< Image > maMsgBoxImgList
Definition: svdata.hxx:263
VclPtr< vcl::Window > mpAutoScrollWin
Definition: svdata.hxx:264
VclPtr< vcl::Window > mpCaptureWin
Definition: svdata.hxx:256
VclPtr< vcl::Window > mpTrackWin
Definition: svdata.hxx:261
VclPtr< vcl::Window > mpExtTextInputWin
Definition: svdata.hxx:260
std::vector< VclPtr< Dialog > > mpExecuteDialogs
Stack of dialogs that are Execute()'d - the last one is the top most one.
Definition: svdata.hxx:259
SalTimer * mpSalTimer
interface to sal event loop / system timer
Definition: svdata.hxx:379
SystemWindowFlags
Definition: svapp.hxx:87
ImplSVData * ImplGetSVData()
Definition: svdata.cxx:76
basegfx::SystemDependentDataManager & ImplGetSystemDependentDataManager()
Definition: svdata.cxx:203
void JoinMainLoopThread()
Definition: svmain.cxx:680
void DeInitVCL()
Definition: svmain.cxx:420
bool IsVCLInit()
Definition: svmain.cxx:278
int ImplSVMain()
Definition: svmain.cxx:184
static void MainWorkerFunction(void *pArgs)
Definition: svmain.cxx:653
static Application * pOwnSvApp
Definition: svmain.cxx:240
static oslThread hThreadID
Definition: svmain.cxx:650
static oslSignalHandler pExceptionHandler
Definition: svmain.cxx:243
static bool g_bIsLeanException
Definition: svmain.cxx:116
bool InitVCL()
Definition: svmain.cxx:297
int SVMain()
Definition: svmain.cxx:233
static oslSignalAction VCLExceptionSignal_impl(void *, oslSignalInfo *pInfo)
Definition: svmain.cxx:118
void CreateMainLoopThread(oslWorkerFunction pWorker, void *pThreadData)
Definition: svmain.cxx:662
OUString Name