31#include <config_features.h>
40 std::unique_ptr<SbxAppData> xSbxAppData;
48 static BasicDLLImpl* BASIC_DLL;
56BasicDLLImpl* BasicDLLImpl::BASIC_DLL =
nullptr;
61 std::scoped_lock aGuard(BasicDLLImpl::getMutex());
62 if (!BasicDLLImpl::BASIC_DLL)
63 BasicDLLImpl::BASIC_DLL =
new BasicDLLImpl;
64 m_xImpl = BasicDLLImpl::BASIC_DLL;
69 std::scoped_lock aGuard(BasicDLLImpl::getMutex());
70 const bool bLastRef =
m_xImpl->GetRefCount() == 1;
72 BasicDLLImpl::BASIC_DLL->xSbxAppData->m_aGlobErr.
clear();
77 BasicDLLImpl::BASIC_DLL =
nullptr;
82 DBG_ASSERT( BasicDLLImpl::BASIC_DLL,
"BasicDLL::EnableBreak: No instance yet!" );
83 if (BasicDLLImpl::BASIC_DLL)
85 BasicDLLImpl::BASIC_DLL->bBreakEnabled = bEnable;
91 DBG_ASSERT( BasicDLLImpl::BASIC_DLL,
"BasicDLL::EnableBreak: No instance yet!" );
92 if (BasicDLLImpl::BASIC_DLL)
94 BasicDLLImpl::BASIC_DLL->bDebugMode = bDebugMode;
101 DBG_ASSERT( BasicDLLImpl::BASIC_DLL,
"BasicDLL::EnableBreak: No instance yet!" );
102#if HAVE_FEATURE_SCRIPTING
103 if (!BasicDLLImpl::BASIC_DLL)
108 static bool bJustStopping =
false;
110 && (BasicDLLImpl::BASIC_DLL->bBreakEnabled || BasicDLLImpl::BASIC_DLL->bDebugMode))
112 bJustStopping =
true;
115 VclMessageType::Info, VclButtonsType::Ok,
118 bJustStopping =
false;
125 return *BasicDLLImpl::BASIC_DLL->xSbxAppData;
130 return BasicDLLImpl::BASIC_DLL && BasicDLLImpl::BASIC_DLL->xSbxAppData;
bool IsSbxData_Impl()
returns true if the SbxAppData is still valid, used to check if we are in shutdown.
SbxAppData & GetSbxData_Impl()
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
static void SetDebugMode(bool bDebugMode)
tools::SvRef< SvRefBase > m_xImpl
static void EnableBreak(bool bEnable)
#define DBG_ASSERT(sCon, aError)
::osl::Mutex & getMutex()
OUString BasResId(TranslateId aId)