LibreOffice Module sfx2 (master) 1
shutdownicon.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 "shutdownicon.hxx"
24#include <sfx2/strings.hrc>
25#include <sfx2/app.hxx>
26#include <svtools/imagemgr.hxx>
27#include <com/sun/star/task/InteractionHandler.hpp>
28#include <com/sun/star/frame/Desktop.hpp>
29#include <com/sun/star/frame/TerminationVetoException.hpp>
30#include <com/sun/star/frame/XDispatchResultListener.hpp>
31#include <com/sun/star/frame/XNotifyingDispatch.hpp>
32#include <com/sun/star/frame/XFramesSupplier.hpp>
33#include <com/sun/star/frame/XFrame.hpp>
34#include <com/sun/star/util/URLTransformer.hpp>
35#include <com/sun/star/util/XURLTransformer.hpp>
36#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
37#include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
38#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
39#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
40#include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
41#include <com/sun/star/ui/dialogs/ControlActions.hpp>
42#include <com/sun/star/document/MacroExecMode.hpp>
43#include <com/sun/star/document/UpdateDocMode.hpp>
45#include <sfx2/docfilt.hxx>
46#include <sfx2/fcontnr.hxx>
52#include <officecfg/Office/Common.hxx>
53#include <tools/urlobj.hxx>
54#include <tools/debug.hxx>
55#include <osl/file.hxx>
56#include <osl/module.hxx>
57#include <rtl/ref.hxx>
58#include <utility>
59#include <vcl/svapp.hxx>
60
61#include <sfx2/sfxresid.hxx>
62
63using namespace ::com::sun::star;
64using namespace ::com::sun::star::uno;
65using namespace ::com::sun::star::frame;
66using namespace ::com::sun::star::container;
67using namespace ::com::sun::star::lang;
68using namespace ::com::sun::star::beans;
69using namespace ::com::sun::star::util;
70using namespace ::com::sun::star::ui::dialogs;
71using namespace ::sfx2;
72
73class SfxNotificationListener_Impl : public cppu::WeakImplHelper< XDispatchResultListener >
74{
75public:
76 virtual void SAL_CALL dispatchFinished( const DispatchResultEvent& aEvent ) override;
77 virtual void SAL_CALL disposing( const EventObject& aEvent ) override;
78};
79
80void SAL_CALL SfxNotificationListener_Impl::dispatchFinished( const DispatchResultEvent& )
81{
83}
84
85void SAL_CALL SfxNotificationListener_Impl::disposing( const EventObject& )
86{
87}
88
90{
91 return "com.sun.star.comp.desktop.QuickstartWrapper";
92}
93
94sal_Bool SAL_CALL ShutdownIcon::supportsService(OUString const & ServiceName)
95{
97}
98
99css::uno::Sequence<OUString> SAL_CALL ShutdownIcon::getSupportedServiceNames()
100{
101 return { "com.sun.star.office.Quickstart" };
102}
103
104bool ShutdownIcon::bModalMode = false;
106
108{
109 if (m_bInitialized)
110 return;
111 m_bInitialized = true;
112
113#ifdef ENABLE_QUICKSTART_APPLET
114# ifdef _WIN32
116# elif defined MACOSX
118# endif // MACOSX
119#endif // ENABLE_QUICKSTART_APPLET
120}
121
123{
124 if (!m_bInitialized)
125 return;
126
127#ifdef ENABLE_QUICKSTART_APPLET
128# ifdef _WIN32
130# elif defined MACOSX
132# endif // MACOSX
133#endif // ENABLE_QUICKSTART_APPLET
134
135 m_bVeto = false;
136
137 m_pFileDlg.reset();
138 m_bInitialized = false;
139}
140
142{
143 return !Application::IsHeadlessModeEnabled() && officecfg::Office::Common::Misc::UseSystemFileDialog::get();
144}
145
146ShutdownIcon::ShutdownIcon( css::uno::Reference< XComponentContext > xContext ) :
147 m_bVeto ( false ),
148 m_bListenForTermination ( false ),
149 m_bSystemDialogs(UseSystemFileDialog()),
150 m_xContext(std::move( xContext )),
151 m_bInitialized( false )
152{
153}
154
156{
158}
159
160
161void ShutdownIcon::OpenURL( const OUString& aURL, const OUString& rTarget, const Sequence< PropertyValue >& aArgs )
162{
163 if ( !getInstance() || !getInstance()->m_xDesktop.is() )
164 return;
165
166 css::uno::Reference < XDispatchProvider > xDispatchProvider = getInstance()->m_xDesktop;
167 if ( !xDispatchProvider.is() )
168 return;
169
170 css::util::URL aDispatchURL;
171 aDispatchURL.Complete = aURL;
172
173 css::uno::Reference< util::XURLTransformer > xURLTransformer( util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
174 try
175 {
176 css::uno::Reference< css::frame::XDispatch > xDispatch;
177
178 xURLTransformer->parseStrict( aDispatchURL );
179 xDispatch = xDispatchProvider->queryDispatch( aDispatchURL, rTarget, 0 );
180 if ( xDispatch.is() )
181 xDispatch->dispatch( aDispatchURL, aArgs );
182 }
183 catch ( css::uno::RuntimeException& )
184 {
185 throw;
186 }
187 catch ( css::uno::Exception& )
188 {
189 }
190}
191
192
194{
195 if ( getInstance() && getInstance()->m_xDesktop.is() )
196 {
197 ::SolarMutexGuard aGuard;
200 }
201}
202
203
205{
206 if ( !getInstance() || !getInstance()->m_xDesktop.is() )
207 return;
208
209 css::uno::Reference < css::frame::XFramesSupplier > xDesktop = getInstance()->m_xDesktop;
210 css::uno::Reference < css::frame::XFrame > xFrame( xDesktop->getActiveFrame() );
211 if ( !xFrame.is() )
212 xFrame = xDesktop;
213
215 aTargetURL.Complete = ".uno:NewDoc";
216 css::uno::Reference< util::XURLTransformer > xTrans( util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
217 xTrans->parseStrict( aTargetURL );
218
219 css::uno::Reference < css::frame::XDispatchProvider > xProv( xFrame, UNO_QUERY );
220 css::uno::Reference < css::frame::XDispatch > xDisp;
221 if ( xProv.is() )
222 {
223 xDisp = xProv->queryDispatch( aTargetURL, "_self", 0 );
224 }
225 if ( !xDisp.is() )
226 return;
227
228 Sequence<PropertyValue> aArgs { comphelper::makePropertyValue("Referer", OUString("private:user")) };
229 css::uno::Reference< css::frame::XNotifyingDispatch > xNotifier(xDisp, UNO_QUERY);
230 if (xNotifier.is())
231 {
233 xNotifier->dispatchWithNotification(aTargetURL, aArgs, new SfxNotificationListener_Impl);
234 }
235 else
236 xDisp->dispatch( aTargetURL, aArgs );
237}
238
239OUString ShutdownIcon::GetUrlDescription( std::u16string_view aUrl )
240{
242}
243
245{
246 ::SolarMutexGuard aGuard;
247
248 bool bDirty = m_bSystemDialogs != UseSystemFileDialog();
249
250 if ( m_pFileDlg && bDirty )
251 {
252 // Destroy instance as changing the system file dialog setting
253 // forces us to create a new FileDialogHelper instance!
254 m_pFileDlg.reset();
255 }
256
257 if ( !m_pFileDlg )
258 m_pFileDlg.reset( new FileDialogHelper(
259 ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
260 FileDialogFlags::MultiSelection, OUString(), SfxFilterFlags::NONE, SfxFilterFlags::NONE, nullptr ) );
261 m_pFileDlg->StartExecuteModal( LINK( this, ShutdownIcon, DialogClosedHdl_Impl ) );
262}
263
264IMPL_LINK( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, /*unused*/, void )
265{
266 DBG_ASSERT( m_pFileDlg, "ShutdownIcon, DialogClosedHdl_Impl(): no file dialog" );
267
268 // use constructor for filling up filters automatically!
269 if ( ERRCODE_NONE == m_pFileDlg->GetError() )
270 {
271 css::uno::Reference< XFilePicker3 > xPicker = m_pFileDlg->GetFilePicker();
272
273 try
274 {
275
276 if ( xPicker.is() )
277 {
278
279 css::uno::Reference < XFilePickerControlAccess > xPickerControls ( xPicker, UNO_QUERY );
280
281 Sequence< OUString > sFiles = xPicker->getSelectedFiles();
282 int nFiles = sFiles.getLength();
283
284 css::uno::Reference < css::task::XInteractionHandler2 > xInteraction(
285 task::InteractionHandler::createWithParent(::comphelper::getProcessComponentContext(), nullptr) );
286
287 int nArgs=3;
288 Sequence< PropertyValue > aArgs{
289 comphelper::makePropertyValue("InteractionHandler", xInteraction),
290 comphelper::makePropertyValue("MacroExecutionMode", sal_Int16(css::document::MacroExecMode::USE_CONFIG)),
291 comphelper::makePropertyValue("UpdateDocMode", sal_Int16(css::document::UpdateDocMode::ACCORDING_TO_CONFIG))
292 };
293
294 // use the filedlghelper to get the current filter name,
295 // because it removes the extensions before you get the filter name.
296 OUString aFilterName( m_pFileDlg->GetCurrentFilter() );
297
298 if ( xPickerControls.is() )
299 {
300
301 // Set readonly flag
302
303 bool bReadOnly = false;
304
305
306 xPickerControls->getValue( ExtendedFilePickerElementIds::CHECKBOX_READONLY, 0 ) >>= bReadOnly;
307
308 // Only set property if readonly is set to TRUE
309
310 if ( bReadOnly )
311 {
312 aArgs.realloc( ++nArgs );
313 auto pArgs = aArgs.getArray();
314 pArgs[nArgs-1].Name = "ReadOnly";
315 pArgs[nArgs-1].Value <<= bReadOnly;
316 }
317
318 // Get version string
319
320 sal_Int32 iVersion = -1;
321
322 xPickerControls->getValue( ExtendedFilePickerElementIds::LISTBOX_VERSION, ControlActions::GET_SELECTED_ITEM_INDEX ) >>= iVersion;
323
324 if ( iVersion >= 0 )
325 {
326 sal_Int16 uVersion = static_cast<sal_Int16>(iVersion);
327
328 aArgs.realloc( ++nArgs );
329 auto pArgs = aArgs.getArray();
330 pArgs[nArgs-1].Name = "Version";
331 pArgs[nArgs-1].Value <<= uVersion;
332 }
333
334 // Retrieve the current filter
335
336 if ( aFilterName.isEmpty() )
337 xPickerControls->getValue( CommonFilePickerElementIds::LISTBOX_FILTER, ControlActions::GET_SELECTED_ITEM ) >>= aFilterName;
338
339 }
340
341
342 // Convert UI filter name to internal filter name
343
344 if ( !aFilterName.isEmpty() )
345 {
346 std::shared_ptr<const SfxFilter> pFilter = SfxGetpApp()->GetFilterMatcher().GetFilter4UIName( aFilterName, SfxFilterFlags::NONE, SfxFilterFlags::NOTINFILEDLG );
347
348 if ( pFilter )
349 {
350 aFilterName = pFilter->GetFilterName();
351
352 if ( !aFilterName.isEmpty() )
353 {
354 aArgs.realloc( ++nArgs );
355 auto pArgs = aArgs.getArray();
356 pArgs[nArgs-1].Name = "FilterName";
357 pArgs[nArgs-1].Value <<= aFilterName;
358 }
359 }
360 }
361
362 if ( 1 == nFiles )
363 OpenURL( sFiles[0], "_default", aArgs );
364 else
365 {
366 OUString aBaseDirURL = sFiles[0];
367 if ( !aBaseDirURL.isEmpty() && !aBaseDirURL.endsWith("/") )
368 aBaseDirURL += "/";
369
370 int iFiles;
371 for ( iFiles = 1; iFiles < nFiles; iFiles++ )
372 {
373 OUString aURL = aBaseDirURL + sFiles[iFiles];
374 OpenURL( aURL, "_default", aArgs );
375 }
376 }
377 }
378 }
379 catch ( ... )
380 {
381 }
382 }
383
384#ifdef _WIN32
385 // Destroy dialog to prevent problems with custom controls
386 // This fix is dependent on the dialog settings. Destroying the dialog here will
387 // crash the non-native dialog implementation! Therefore make this dependent on
388 // the settings.
390 {
391 m_pFileDlg.reset();
392 }
393#endif
394
395 LeaveModalMode();
396}
397
398
400{
401 ShutdownIcon* pInst = getInstance();
402 if ( ! pInst)
403 return;
404
405 if (pInst->m_bListenForTermination)
406 return;
407
408 css::uno::Reference< XDesktop2 > xDesktop = pInst->m_xDesktop;
409 if ( ! xDesktop.is())
410 return;
411
412 xDesktop->addTerminateListener( pInst );
413 pInst->m_bListenForTermination = true;
414}
415
416
418{
419 ShutdownIcon* pInst = getInstance();
420 if ( ! pInst)
421 return;
422
423 css::uno::Reference< XDesktop2 > xDesktop = pInst->m_xDesktop;
424 if ( ! xDesktop.is())
425 return;
426
427 // always remove ourselves as listener
428 pInst->m_bListenForTermination = true;
429 xDesktop->removeTerminateListener( pInst );
430
431 // terminate desktop only if no tasks exist
432 css::uno::Reference< XIndexAccess > xTasks = xDesktop->getFrames();
433 if( xTasks.is() && xTasks->getCount() < 1 )
435
436 // remove the instance pointer
438}
439
440
442{
443 OSL_ASSERT( pShutdownIcon );
444 return pShutdownIcon.get();
445}
446
447
449{
450 if (pShutdownIcon)
451 return pShutdownIcon.get();
452
453 try {
455 pIcon->init ();
456 pShutdownIcon = pIcon;
457 } catch (...) {
458 }
459
460 return pShutdownIcon.get();
461}
462
464{
465 css::uno::Reference < XDesktop2 > xDesktop = Desktop::create( m_xContext );
466 std::unique_lock aGuard(m_aMutex);
467 m_xDesktop = xDesktop;
468}
469
470
471void ShutdownIcon::disposing(std::unique_lock<std::mutex>&)
472{
473 m_xContext.clear();
474 m_xDesktop.clear();
475
477}
478
479
480// XEventListener
481void SAL_CALL ShutdownIcon::disposing( const css::lang::EventObject& )
482{
483}
484
485
486// XTerminateListener
487void SAL_CALL ShutdownIcon::queryTermination( const css::lang::EventObject& )
488{
489 SAL_INFO("sfx.appl", "ShutdownIcon::queryTermination: veto is " << m_bVeto);
490 std::unique_lock aGuard( m_aMutex );
491
492 if ( m_bVeto )
493 throw css::frame::TerminationVetoException();
494}
495
496
497void SAL_CALL ShutdownIcon::notifyTermination( const css::lang::EventObject& )
498{
499}
500
501
502void SAL_CALL ShutdownIcon::initialize( const css::uno::Sequence< css::uno::Any>& aArguments )
503{
504 std::unique_lock aGuard( m_aMutex );
505
506 // third argument only sets veto, everything else will be ignored!
507 if (aArguments.getLength() > 2)
508 {
509 bool bVeto = ::cppu::any2bool(aArguments[2]);
510 m_bVeto = bVeto;
511 return;
512 }
513
514 if ( aArguments.getLength() > 0 )
515 {
517 {
518 try
519 {
520 bool bQuickstart = ::cppu::any2bool( aArguments[0] );
521 if( !bQuickstart && !GetAutostart() )
522 return;
523 aGuard.unlock();
524 init ();
525 aGuard.lock();
526 if ( !m_xDesktop.is() )
527 return;
528
529 /* Create a sub-classed instance - foo */
531 initSystray();
532 }
533 catch(const css::lang::IllegalArgumentException&)
534 {
535 }
536 }
537 }
538 if ( aArguments.getLength() > 1 )
539 {
540 bool bAutostart = ::cppu::any2bool( aArguments[1] );
541 if (bAutostart && !GetAutostart())
542 SetAutostart( true );
543 if (!bAutostart && GetAutostart())
544 SetAutostart( false );
545 }
546
547}
548
549
551{
552 bModalMode = true;
553}
554
555
557{
558 bModalMode = false;
559}
560
561#ifdef _WIN32
562// defined in shutdowniconw32.cxx
563#elif defined MACOSX
564// defined in shutdowniconaqua.cxx
565#else
567{
568 return false;
569}
570#endif
571
572
573#ifdef ENABLE_QUICKSTART_APPLET
574#ifdef _WIN32
576{
577 return GetAutostartFolderNameW32() + "\\" + SfxResId(STR_QUICKSTART_LNKNAME) + ".lnk";
578}
579#endif // _WIN32
580#endif
581
583{
584#if defined MACOSX
585 return true;
586#elif defined ENABLE_QUICKSTART_APPLET
587 bool bRet = false;
588 OUString aShortcut( getShortcutName() );
589 OUString aShortcutUrl;
590 osl::File::getFileURLFromSystemPath( aShortcut, aShortcutUrl );
591 osl::File f( aShortcutUrl );
592 osl::File::RC error = f.open( osl_File_OpenFlag_Read );
593 if( error == osl::File::E_None )
594 {
595 f.close();
596 bRet = true;
597 }
598 return bRet;
599#else // ENABLE_QUICKSTART_APPLET
600 return false;
601#endif
602}
603
604void ShutdownIcon::SetAutostart( bool bActivate )
605{
606#ifdef ENABLE_QUICKSTART_APPLET
607#ifndef MACOSX
608 OUString aShortcut( getShortcutName() );
609#endif
610
611 if( bActivate && IsQuickstarterInstalled() )
612 {
613#ifdef _WIN32
614 EnableAutostartW32( aShortcut );
615#endif
616 }
617 else
618 {
619#ifndef MACOSX
620 OUString aShortcutUrl;
621 ::osl::File::getFileURLFromSystemPath( aShortcut, aShortcutUrl );
622 ::osl::File::remove( aShortcutUrl );
623#endif
624 }
625#else
626 (void)bActivate; // unused variable
627#endif // ENABLE_QUICKSTART_APPLET
628}
629
630const ::sal_Int32 PROPHANDLE_TERMINATEVETOSTATE = 0;
631
632// XFastPropertySet
633void SAL_CALL ShutdownIcon::setFastPropertyValue( ::sal_Int32 nHandle,
634 const css::uno::Any& aValue )
635{
636 switch(nHandle)
637 {
639 {
640 // use new value in case it's a valid information only
641 bool bState( false );
642 if (! (aValue >>= bState))
643 return;
644
645 m_bVeto = bState;
648 }
649 break;
650
651 default :
652 throw css::beans::UnknownPropertyException(OUString::number(nHandle));
653 }
654}
655
656// XFastPropertySet
657css::uno::Any SAL_CALL ShutdownIcon::getFastPropertyValue( ::sal_Int32 nHandle )
658{
659 css::uno::Any aValue;
660 switch(nHandle)
661 {
663 {
664 bool bState = (m_bListenForTermination && m_bVeto);
665 aValue <<= bState;
666 }
667 break;
668
669 default :
670 throw css::beans::UnknownPropertyException(OUString::number(nHandle));
671 }
672
673 return aValue;
674}
675
676extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
678 css::uno::XComponentContext *context,
679 css::uno::Sequence<css::uno::Any> const &)
680{
681 return cppu::acquire(new ShutdownIcon(context));
682}
683
684/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XComponentContext > m_xContext
SfxApplication * SfxGetpApp()
Definition: app.hxx:231
AnyEventRef aEvent
static void Quit()
static bool IsHeadlessModeEnabled()
SfxFilterMatcher & GetFilterMatcher()
Definition: appmain.cxx:27
std::shared_ptr< const SfxFilter > GetFilter4UIName(std::u16string_view rName, SfxFilterFlags nMust=SfxFilterFlags::NONE, SfxFilterFlags nDont=SFX_FILTER_NOTINSTALLED) const
Definition: fltfnc.cxx:709
virtual void SAL_CALL dispatchFinished(const DispatchResultEvent &aEvent) override
virtual void SAL_CALL disposing(const EventObject &aEvent) override
virtual void disposing(std::unique_lock< std::mutex > &) override
static bool IsQuickstarterInstalled()
static ShutdownIcon * createInstance()
virtual ~ShutdownIcon() override
static ShutdownIcon * getInstance()
static OUString getShortcutName()
virtual void SAL_CALL setFastPropertyValue(::sal_Int32 nHandle, const css::uno::Any &aValue) override
bool m_bListenForTermination
bool m_bSystemDialogs
void StartFileDialog()
static void terminateDesktop()
static rtl::Reference< ShutdownIcon > pShutdownIcon
css::uno::Reference< css::frame::XDesktop2 > m_xDesktop
css::uno::Reference< css::uno::XComponentContext > m_xContext
static void FromTemplate()
virtual void SAL_CALL queryTermination(const css::lang::EventObject &aEvent) override
std::unique_ptr< sfx2::FileDialogHelper > m_pFileDlg
static void addTerminateListener()
virtual void SAL_CALL notifyTermination(const css::lang::EventObject &aEvent) override
ShutdownIcon(css::uno::Reference< css::uno::XComponentContext > xContext)
virtual sal_Bool SAL_CALL supportsService(OUString const &ServiceName) override
virtual css::uno::Any SAL_CALL getFastPropertyValue(::sal_Int32 nHandle) override
static void FileOpen()
static OUString GetUrlDescription(std::u16string_view aUrl)
void deInitSystray()
static void LeaveModalMode()
static bool bModalMode
static bool GetAutostart()
void initSystray()
virtual OUString SAL_CALL getImplementationName() override
static void SetAutostart(bool bActivate)
static void OpenURL(const OUString &aURL, const OUString &rTarget, const css::uno::Sequence< css::beans::PropertyValue > &=css::uno::Sequence< css::beans::PropertyValue >(0))
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &aArguments) override
static void EnterModalMode()
static SVT_DLLPUBLIC OUString GetDescription(const INetURLObject &rObject)
#define DBG_ASSERT(sCon, aError)
Reference< XDispatch > xDispatch
URL aURL
#define ERRCODE_NONE
FilterGroup & rTarget
bool bReadOnly
Sequence< PropertyValue > aArguments
#define SAL_INFO(area, stream)
Reference< XComponentContext > getProcessComponentContext()
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
sal_Int32 nHandle
OUString SfxResId(TranslateId aId)
Definition: sfxresid.cxx:22
IMPL_LINK(ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper *,, void)
static bool UseSystemFileDialog()
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_desktop_QuickstartWrapper_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
const ::sal_Int32 PROPHANDLE_TERMINATEVETOSTATE
void SAL_DLLPUBLIC_EXPORT aqua_shutdown_systray()
void aqua_init_systray()
void win32_init_sys_tray()
void win32_shutdown_sys_tray()
Reference< XFrame > xFrame
unsigned char sal_Bool
OUString aTargetURL