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