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