LibreOffice Module sfx2 (master) 1
app.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/log.hxx>
21#include <tools/debug.hxx>
22
23#include <sfx2/app.hxx>
24#include <sfx2/frame.hxx>
25#include <basic/sberrors.hxx>
26
27#include <svl/svdde.hxx>
29#include <com/sun/star/frame/XFrame.hpp>
30#include <comphelper/lok.hxx>
32#include <com/sun/star/uri/UriReferenceFactory.hpp>
33#include <com/sun/star/uri/XVndSunStarScriptUrl.hpp>
34#include <basic/basmgr.hxx>
35#include <vcl/svapp.hxx>
36#include <vcl/weld.hxx>
37#include <sfx2/sfxhelp.hxx>
38#include <sfx2/progress.hxx>
39#include <sfx2/objsh.hxx>
40#include <sfx2/dispatch.hxx>
41#include <sfx2/viewsh.hxx>
42#include <sfx2/viewfrm.hxx>
43#include <appdata.hxx>
44#include <sfx2/module.hxx>
45#include <sfx2/event.hxx>
46#include <workwin.hxx>
48#include <sfx2/tbxctrl.hxx>
49#include <sfx2/sfxdlg.hxx>
50#include <sfx2/stbitem.hxx>
51#include <sfx2/dockwin.hxx>
52
53#include <officecfg/Office/Common.hxx>
54#include <rtl/strbuf.hxx>
55#include <memory>
56#include <mutex>
58#include <fwkhelper.hxx>
59
60#include "getbasctlfunction.hxx"
61
62using namespace ::com::sun::star;
63
65
66#if HAVE_FEATURE_XMLHELP
67static SfxHelp* pSfxHelp = nullptr;
68#endif
69
71{
72 return g_pSfxApplication;
73}
74
75void SfxApplication::SetModule(SfxToolsModule nSharedLib, std::unique_ptr<SfxModule> pModule)
76{
77 assert(g_pSfxApplication != nullptr);
78
79 g_pSfxApplication->pImpl->aModules[nSharedLib] = std::move(pModule);
80}
81
83{
84 if (!g_pSfxApplication) // It is possible GetModule is called before SfxApplication is initialised via GetOrCreate()
85 return nullptr;
86 return g_pSfxApplication->pImpl->aModules[nSharedLib].get();
87}
88
90{
91 static std::mutex theApplicationMutex;
92
93 // SFX on demand
94 std::unique_lock aGuard(theApplicationMutex);
96 {
97 SAL_INFO( "sfx.appl", "SfxApplication::SetApp" );
98
100
101 // at the moment a bug may occur when Initialize_Impl returns FALSE,
102 // but this is only temporary because all code that may cause such
103 // a fault will be moved outside the SFX
105
106 ::framework::SetRefreshToolbars( RefreshToolbars );
107 ::framework::SetToolBoxControllerCreator( SfxToolBoxControllerFactory );
108 ::framework::SetStatusBarControllerCreator( SfxStatusBarControllerFactory );
109 ::framework::SetDockingWindowCreator( SfxDockingWindowFactory );
110 ::framework::SetIsDockingWindowVisible( IsDockingWindowVisible );
111#if HAVE_FEATURE_XMLHELP
112 Application::SetHelp( pSfxHelp );
113#endif
114#if HAVE_FEATURE_XMLHELP || defined(EMSCRIPTEN)
115 bool bHelpTip = officecfg::Office::Common::Help::Tip::get();
116 bool bExtendedHelpTip = officecfg::Office::Common::Help::ExtendedTip::get();
117 if (!utl::ConfigManager::IsFuzzing() && bHelpTip)
119 else
121 if (!utl::ConfigManager::IsFuzzing() && bHelpTip && bExtendedHelpTip)
123 else
125#endif
126 }
127 return g_pSfxApplication;
128}
129
131 : pImpl( new SfxAppData_Impl )
132{
133 SetName( "StarOffice" );
134
135 SAL_INFO( "sfx.appl", "{ initialize DDE" );
136
137 bool bOk = InitializeDde();
138
139#ifdef DBG_UTIL
140 if( !bOk )
141 {
142 OStringBuffer aStr("No DDE-Service possible. Error: ");
143 if( GetDdeService() )
144 aStr.append(static_cast<sal_Int32>(GetDdeService()->GetError()));
145 else
146 aStr.append('?');
147 SAL_WARN( "sfx.appl", aStr.getStr() );
148 }
149#else
150 (void)bOk;
151#endif
152
153#if HAVE_FEATURE_XMLHELP
154 pSfxHelp = new SfxHelp;
155#endif
156
157#if HAVE_FEATURE_SCRIPTING
158 StarBASIC::SetGlobalErrorHdl( LINK( this, SfxApplication, GlobalBasicErrorHdl_Impl ) );
159#endif
160
161 SAL_INFO( "sfx.appl", "} initialize DDE" );
162}
163
165{
166 SAL_WARN_IF(GetObjectShells_Impl().size() != 0, "sfx.appl", "Memory leak: some object shells were not removed!");
167
168 Broadcast( SfxHint(SfxHintId::Dying) );
169
170 for (auto &module : pImpl->aModules) // Clear modules
171 module.reset();
172
173#if HAVE_FEATURE_XMLHELP
174 delete pSfxHelp;
176#endif
177
178 if ( !pImpl->bDowning )
179 Deinitialize();
180
181 g_pSfxApplication = nullptr;
182}
183
184
185const OUString& SfxApplication::GetLastDir_Impl() const
186
187/* [Description]
188
189 Internal method by which the last set directory with the method
190 <SfxApplication::SetLastDir_Impl()> in SFX is returned.
191
192 This is usually the most recently addressed by the
193 SfxFileDialog directory.
194
195 [Cross-reference]
196 <SfxApplication::SetLastDir_Impl()>
197*/
198
199{
200 return pImpl->aLastDir;
201}
202
204(
205 const OUString& rNewDir /* Complete directory path as a string */
206)
207
208/* [Description]
209
210 Internal Method, by which a directory path is set that was last addressed
211 (eg by the SfxFileDialog).
212
213 [Cross-reference]
214 <SfxApplication::GetLastDir_Impl()>
215*/
216
217{
218 pImpl->aLastDir = rNewDir;
219}
220
221
223{
224 pImpl->aLastDir.clear();
225}
226
227
229{
230 return pImpl->pViewFrame ? pImpl->pViewFrame->GetDispatcher() : &*pImpl->pAppDispat;
231}
232
233
235{
236 if ( pFrame != pImpl->pViewFrame )
237 {
238 SfxViewFrame *pOldFrame = pImpl->pViewFrame;
239
240 // DocWinActivate : both frames belong to the same TopWindow
241 // TopWinActivate : both frames belong to different TopWindows
242
243 bool bTaskActivate = pOldFrame != pFrame;
244
245 if ( pOldFrame )
246 {
247 if ( bTaskActivate )
249
250 pOldFrame->DoDeactivate( bTaskActivate, pFrame );
251
252 if( pOldFrame->GetProgress() )
253 pOldFrame->GetProgress()->Suspend();
254 }
255
256 pImpl->pViewFrame = pFrame;
257
258 if( pFrame )
259 {
260 pFrame->DoActivate( bTaskActivate );
261 if ( bTaskActivate && pFrame->GetObjectShell() )
262 {
263 pFrame->GetObjectShell()->PostActivateEvent_Impl( pFrame );
265 }
266
267 SfxProgress *pProgress = pFrame->GetProgress();
268 if ( pProgress )
269 {
270 if( pProgress->IsSuspended() )
271 pProgress->Resume();
272 else
273 pProgress->SetState( pProgress->GetState() );
274 }
275
276 if ( pImpl->pViewFrame->GetViewShell() )
277 {
278 SfxDispatcher* pDisp = pImpl->pViewFrame->GetDispatcher();
279 pDisp->Flush();
280 pDisp->Update_Impl(true);
281 }
282 }
283 }
284
285 // even if the frame actually didn't change, ensure its document is forwarded
286 // to SfxObjectShell::SetCurrentComponent.
287 // Otherwise, the CurrentComponent might not be correct, in case it has meanwhile
288 // been reset to some other document, by some non-SFX component. #i49133#
289 if ( pFrame && pFrame->GetViewShell() )
290 pFrame->GetViewShell()->SetCurrentDocument();
291}
292
294(
295 SfxProgress *pProgress
296)
297{
298 DBG_ASSERT( ( !pImpl->pProgress && pProgress ) ||
299 ( pImpl->pProgress && !pProgress ),
300 "Progress activation/deactivation mismatch" );
301
302 if ( pImpl->pProgress && pProgress )
303 {
304 pImpl->pProgress->Suspend();
305 delete pImpl->pProgress;
306 }
307
308 pImpl->pProgress = pProgress;
309}
310
311
313{
314 return pImpl->aIndexBitSet.GetFreeIndex()+1;
315}
316
317
319{
320 pImpl->aIndexBitSet.ReleaseIndex(i-1);
321}
322
323
325{
327 if (!pWork)
328 return nullptr;
329 vcl::Window* pWindow = pWork->GetWindow();
330 if (!pWindow)
331 return nullptr;
332 return pWindow->GetFrameWeld();
333}
334
335SfxTbxCtrlFactory* SfxApplication::GetTbxCtrlFactory(const std::type_info& rSlotType, sal_uInt16 nSlotID) const
336{
337 // search for a factory with the given slot id
338 for (auto& rFactory : pImpl->maTbxCtrlFactories)
339 if( rFactory.nTypeId == rSlotType && rFactory.nSlotId == nSlotID )
340 return &rFactory;
341
342 // if no factory exists for the given slot id, see if we
343 // have a generic factory with the correct slot type and slot id == 0
344 for (auto& rFactory : pImpl->maTbxCtrlFactories)
345 if( rFactory.nTypeId == rSlotType && rFactory.nSlotId == 0 )
346 return &rFactory;
347
348 return nullptr;
349}
350
351SfxStbCtrlFactory* SfxApplication::GetStbCtrlFactory(const std::type_info& rSlotType, sal_uInt16 nSlotID) const
352{
353 for (auto& rFactory : pImpl->maStbCtrlFactories)
354 if ( rFactory.nTypeId == rSlotType &&
355 ( rFactory.nSlotId == 0 || rFactory.nSlotId == nSlotID ) )
356 return &rFactory;
357 return nullptr;
358}
359
360std::vector<SfxViewFrame*>& SfxApplication::GetViewFrames_Impl() const
361{
362 return pImpl->maViewFrames;
363}
364
365std::vector<SfxViewShell*>& SfxApplication::GetViewShells_Impl() const
366{
367 return pImpl->maViewShells;
368}
369
370std::unordered_map<OUString, css::uno::Reference<css::ui::XAcceleratorConfiguration>>& SfxApplication::GetAcceleratorConfs_Impl() const
371{
372 return pImpl->maAcceleratorConfs;
373}
374
375std::vector<SfxObjectShell*>& SfxApplication::GetObjectShells_Impl() const
376{
377 return pImpl->maObjShells;
378}
379
380void SfxApplication::Invalidate( sal_uInt16 nId )
381{
382 for( SfxViewFrame* pFrame = SfxViewFrame::GetFirst(); pFrame; pFrame = SfxViewFrame::GetNext( *pFrame ) )
383 Invalidate_Impl( pFrame->GetBindings(), nId );
384}
385
386#if HAVE_FEATURE_SCRIPTING
387
388#ifndef DISABLE_DYNLOADING
389
390typedef long (*basicide_handle_basic_error)(void const *);
391typedef void (*basicide_macro_organizer)(void *, void *, sal_Int16);
392
393#else
394
395extern "C" long basicide_handle_basic_error(void const*);
396extern "C" void basicide_macro_organizer(void*, void*, sal_Int16);
397
398#endif
399
400#endif
401
402IMPL_STATIC_LINK( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasic, bool )
403{
404#if !HAVE_FEATURE_SCRIPTING
405 (void) pStarBasic;
406 return false;
407#else
408
410 {
411 OUString aError;
412 std::unique_ptr<ErrorInfo> pErrorInfo = ErrorInfo::GetErrorInfo(StarBASIC::GetErrorCode());
413 if (ErrorStringFactory::CreateString(pErrorInfo.get(), aError))
414 {
415 const SfxViewFrame* pViewFrame = SfxViewFrame::Current();
416 std::shared_ptr<weld::MessageDialog> xBox;
418 pViewFrame ? pViewFrame->GetFrameWeld() : nullptr,
419 VclMessageType::Error,
420 VclButtonsType::Ok,
421 aError,
422 GetpApp()));
423
424 xBox->runAsync(xBox, [](sal_Int32 /*nResult*/) {});
425 }
426 return true;
427 }
428
429#ifndef DISABLE_DYNLOADING
430 basicide_handle_basic_error pSymbol = reinterpret_cast<basicide_handle_basic_error>(sfx2::getBasctlFunction("basicide_handle_basic_error"));
431
432 // call basicide_handle_basic_error in basctl
433 bool bRet = pSymbol( pStarBasic );
434
435#else
436
437 bool bRet = basicide_handle_basic_error( pStarBasic );
438
439#endif
440
441 return bRet;
442
443#endif
444}
445
446bool SfxApplication::IsXScriptURL( const OUString& rScriptURL )
447{
448 bool result = false;
449
450#if !HAVE_FEATURE_SCRIPTING
451 (void) rScriptURL;
452#else
453 css::uno::Reference< css::uno::XComponentContext > xContext =
454 ::comphelper::getProcessComponentContext();
455
456 css::uno::Reference< css::uri::XUriReferenceFactory >
457 xFactory = css::uri::UriReferenceFactory::create( xContext );
458
459 try
460 {
461 css::uno::Reference< css::uri::XVndSunStarScriptUrl >
462 xUrl( xFactory->parse( rScriptURL ), css::uno::UNO_QUERY );
463
464 if ( xUrl.is() )
465 {
466 result = true;
467 }
468 }
469 catch (const css::uno::RuntimeException&)
470 {
471 // ignore, will just return FALSE
472 }
473#endif
474 return result;
475}
476
477OUString
479{
480 OUString aScriptURL;
481
482#if HAVE_FEATURE_SCRIPTING
484 SAL_INFO( "sfx.appl", "create selector dialog");
485
486 const SfxViewFrame* pViewFrame = SfxViewFrame::Current();
487 const SfxFrame* pFrame = pViewFrame ? &pViewFrame->GetFrame() : nullptr;
488 uno::Reference< frame::XFrame > xFrame( pFrame ? pFrame->GetFrameInterface() : uno::Reference< frame::XFrame >() );
489
491
492 SAL_INFO( "sfx.appl", "done, now exec it");
493
494 sal_uInt16 nRet = pDlg->Execute();
495
496 SAL_INFO( "sfx.appl", "has returned");
497
498 if ( nRet == RET_OK )
499 {
500 aScriptURL = pDlg->GetScriptURL();
501 }
502#else
503 (void) pParent;
504#endif
505 return aScriptURL;
506}
507
508void SfxApplication::MacroOrganizer(weld::Window* pParent, const uno::Reference<frame::XFrame>& xDocFrame, sal_Int16 nTabId)
509{
510#if !HAVE_FEATURE_SCRIPTING
511 (void) pParent;
512 (void) nTabId;
513#else
514
515#ifndef DISABLE_DYNLOADING
516 basicide_macro_organizer pSymbol = reinterpret_cast<basicide_macro_organizer>(sfx2::getBasctlFunction("basicide_macro_organizer"));
517
518 // call basicide_macro_organizer in basctl
519 pSymbol(pParent, xDocFrame.get(), nTabId);
520
521#else
522
523 basicide_macro_organizer(pParent, xDocFrame.get(), nTabId);
524
525#endif
526
527#endif
528}
529
530ErrCode SfxApplication::CallBasic( const OUString& rCode, BasicManager* pMgr, SbxArray* pArgs, SbxValue* pRet )
531{
532#if !HAVE_FEATURE_SCRIPTING
533 (void) rCode;
534 (void) pMgr;
535 (void) pArgs;
536 (void) pRet;
538#else
539 (void) ERRCODE_BASIC_CANNOT_LOAD; // So that the !HAVE_FEATURE_SCRIPTING case isn't broken again by IWYU
540 return pMgr->ExecuteMacro( rCode, pArgs, pRet);
541#endif
542}
543
545{
546 if (!pImpl->m_pSidebarTheme.is())
547 {
548 pImpl->m_pSidebarTheme.set(new sfx2::sidebar::Theme);
549 pImpl->m_pSidebarTheme->InitializeTheme();
550 }
551 return *pImpl->m_pSidebarTheme;
552}
553
554/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
IMPL_STATIC_LINK(SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC *, pStarBasic, bool)
Definition: app.cxx:402
static SfxApplication * g_pSfxApplication
Definition: app.cxx:64
SfxToolsModule
Definition: app.hxx:69
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
static void SetHelp(Help *pHelp=nullptr)
ErrCode ExecuteMacro(OUString const &i_fullyQualifiedName, SbxArray *i_arguments, SbxValue *i_retValue)
static std::unique_ptr< ErrorInfo > GetErrorInfo(ErrCode)
static bool CreateString(const ErrorInfo *, OUString &)
static OUString GetEventName(GlobalEventId nID)
static void EnableQuickHelp()
static void DisableBalloonHelp()
static void EnableBalloonHelp()
static void DisableQuickHelp()
virtual VclPtr< AbstractScriptSelectorDialog > CreateScriptSelectorDialog(weld::Window *pParent, const css::uno::Reference< css::frame::XFrame > &rxFrame)=0
static SfxAbstractDialogFactory * Create()
Definition: sfxdlg.cxx:22
static bool IsXScriptURL(const OUString &rScriptURL)
Definition: app.cxx:446
void Deinitialize()
Definition: appquit.cxx:39
static void SetModule(SfxToolsModule nSharedLib, std::unique_ptr< SfxModule > pModule)
Definition: app.cxx:75
SAL_DLLPRIVATE void SetProgress_Impl(SfxProgress *)
Definition: app.cxx:294
void ResetLastDir()
Definition: app.cxx:222
static OUString ChooseScript(weld::Window *pParent)
Definition: app.cxx:478
SAL_DLLPRIVATE SfxTbxCtrlFactory * GetTbxCtrlFactory(const std::type_info &rSlotType, sal_uInt16 nSlotID) const
Definition: app.cxx:335
sfx2::sidebar::Theme & GetSidebarTheme()
this Theme contains Images so must be deleted before DeInitVCL
Definition: app.cxx:544
SAL_DLLPRIVATE void SetViewFrame_Impl(SfxViewFrame *pViewFrame)
Definition: app.cxx:234
SAL_DLLPRIVATE SfxDispatcher * GetDispatcher_Impl()
Definition: app.cxx:228
std::unique_ptr< SfxAppData_Impl > pImpl
Definition: app.hxx:97
static SfxApplication * Get()
Definition: app.cxx:70
SfxApplication()
Definition: app.cxx:130
SAL_DLLPRIVATE std::vector< SfxViewShell * > & GetViewShells_Impl() const
Definition: app.cxx:365
SAL_DLLPRIVATE std::vector< SfxViewFrame * > & GetViewFrames_Impl() const
Definition: app.cxx:360
virtual ~SfxApplication() override
Definition: app.cxx:164
SAL_DLLPRIVATE void SetLastDir_Impl(const OUString &)
Definition: app.cxx:204
void ReleaseIndex(sal_uInt16 i)
Definition: app.cxx:318
virtual void Invalidate(sal_uInt16 nId=0) override
With this method can the slots of the subclasses be invalidated through the slot Id or alternatively ...
Definition: app.cxx:380
bool InitializeDde()
Definition: appdde.cxx:406
SAL_DLLPRIVATE void Initialize_Impl()
Definition: appinit.cxx:172
SAL_DLLPRIVATE std::unordered_map< OUString, css::uno::Reference< css::ui::XAcceleratorConfiguration > > & GetAcceleratorConfs_Impl() const
Definition: app.cxx:370
SAL_DLLPRIVATE std::vector< SfxObjectShell * > & GetObjectShells_Impl() const
Definition: app.cxx:375
void NotifyEvent(const SfxEventHint &rEvent, bool bSynchron=true)
Definition: appcfg.cxx:338
static void MacroOrganizer(weld::Window *pParent, const css::uno::Reference< css::frame::XFrame > &xDocFrame, sal_Int16 nTabId)
Definition: app.cxx:508
const DdeService * GetDdeService() const
Definition: appdde.cxx:497
SAL_DLLPRIVATE const OUString & GetLastDir_Impl() const
Definition: app.cxx:185
SAL_DLLPRIVATE SfxStbCtrlFactory * GetStbCtrlFactory(const std::type_info &rSlotType, sal_uInt16 nSlotID) const
Definition: app.cxx:351
static SfxModule * GetModule(SfxToolsModule nSharedLib)
Definition: app.cxx:82
static ErrCode CallBasic(const OUString &, BasicManager *, SbxArray *pArgs, SbxValue *pRet)
Definition: app.cxx:530
SAL_DLLPRIVATE SfxWorkWindow * GetWorkWindow_Impl(const SfxViewFrame *pFrame) const
Definition: appchild.cxx:56
sal_uInt16 GetFreeIndex()
Definition: app.cxx:312
static SfxApplication * GetOrCreate()
Definition: app.cxx:89
weld::Window * GetTopWindow() const
Definition: app.cxx:324
void Broadcast(const SfxHint &rHint)
SAL_DLLPRIVATE void Update_Impl(bool bForce=false)
Definition: dispatch.cxx:1034
void Flush()
This method performs outstanding push- and pop- commands.
Definition: dispatch.cxx:155
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
Definition: frame.cxx:515
css::uno::Reference< css::frame::XController > GetController() const
Definition: frame.cxx:507
SAL_DLLPRIVATE void PostActivateEvent_Impl(SfxViewFrame const *)
Definition: objmisc.cxx:903
void Resume()
Definition: progress.cxx:242
void Suspend()
Definition: progress.cxx:287
bool IsSuspended() const
Definition: progress.hxx:50
sal_uInt32 GetState() const
Definition: progress.hxx:46
void SetState(sal_uInt32 nVal, sal_uInt32 nNewRange=0)
Definition: progress.cxx:169
SAL_DLLPRIVATE void Invalidate_Impl(SfxBindings &rBindings, sal_uInt16 nId)
Definition: shell.cxx:251
SfxViewShell * GetViewShell() const
Returns the SfxViewShell in which they are located in the subshells.
Definition: shell.cxx:129
void SetName(const OUString &rName)
Sets the name of the Shell object.
Definition: shell.cxx:114
void DoDeactivate(bool bMDI, SfxViewFrame const *pOld)
Definition: viewfrm.cxx:1197
static SAL_WARN_UNUSED_RESULT SfxViewFrame * Current()
Definition: viewfrm.cxx:1975
SfxProgress * GetProgress() const
Definition: viewfrm.cxx:2036
static SAL_WARN_UNUSED_RESULT SfxViewFrame * GetNext(const SfxViewFrame &rPrev, const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
Definition: viewfrm.cxx:2006
static SAL_WARN_UNUSED_RESULT SfxViewFrame * GetFirst(const SfxObjectShell *pDoc=nullptr, bool bOnlyVisible=true)
Definition: viewfrm.cxx:1983
void DoActivate(bool bMDI)
Definition: viewfrm.cxx:1192
SfxFrame & GetFrame() const
Definition: viewfrm.cxx:2782
virtual SfxObjectShell * GetObjectShell() override
Definition: viewfrm.cxx:2218
weld::Window * GetFrameWeld() const
Definition: viewfrm.cxx:2797
void SetCurrentDocument() const
forwards the current document, as returned by ->GetCurrentDocument, to SfxObjectShell::SetWorkingDocu...
Definition: viewsh.cxx:2608
vcl::Window * GetWindow() const
Definition: workwin.hxx:232
static void SetGlobalErrorHdl(const Link< StarBASIC *, bool > &rNewHdl)
static ErrCode const & GetErrorCode()
Simple collection of colors, gradients, fonts that define the look of the sidebar and its controls.
Definition: Theme.hxx:44
static bool IsFuzzing()
weld::Window * GetFrameWeld() const
#define DBG_ASSERT(sCon, aError)
bool IsDockingWindowVisible(const uno::Reference< frame::XFrame > &rFrame, std::u16string_view rDockingWindowName)
Function used by the framework layout manager to determine the visibility state of a docking window w...
Definition: dockwin.cxx:349
void SfxDockingWindowFactory(const uno::Reference< frame::XFrame > &rFrame, std::u16string_view rDockingWindowName)
Factory function used by the framework layout manager to "create" a docking window with a special nam...
Definition: dockwin.cxx:324
Reference< XSingleServiceFactory > xFactory
void RefreshToolbars(css::uno::Reference< css::frame::XFrame > const &xFrame)
Definition: fwkhelper.cxx:31
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
aStr
Definition: mgetempl.cxx:407
SAL_DLLPUBLIC_EXPORT void basicide_macro_organizer(void *pParent, void *pDocFrame_AsXFrame, sal_Int16 nTabId)
SAL_DLLPUBLIC_EXPORT tools::Long basicide_handle_basic_error(void const *pPtr)
size
int i
module
sal_Int16 nId
#define ERRCODE_BASIC_CANNOT_LOAD
rtl::Reference< svt::StatusbarController > SfxStatusBarControllerFactory(const uno::Reference< frame::XFrame > &rFrame, StatusBar *pStatusBar, unsigned short nID, const OUString &aCommandURL)
Definition: stbitem.cxx:69
Reference< XFrame > xFrame
VCL_DLLPUBLIC Application * GetpApp()
rtl::Reference< svt::ToolboxController > SfxToolBoxControllerFactory(const Reference< XFrame > &rFrame, ToolBox *pToolbox, ToolBoxItemId nID, const OUString &aCommandURL)
Definition: tbxitem.cxx:72
Any result
RET_OK
int GetError()