xref: /AOO41X/main/desktop/source/deployment/gui/dp_gui_service.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_desktop.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include "dp_gui_shared.hxx"
32*cdf0e10cSrcweir #include "dp_gui.h"
33*cdf0e10cSrcweir #include "dp_gui_theextmgr.hxx"
34*cdf0e10cSrcweir #include "cppuhelper/implbase2.hxx"
35*cdf0e10cSrcweir #include "cppuhelper/implementationentry.hxx"
36*cdf0e10cSrcweir #include "unotools/configmgr.hxx"
37*cdf0e10cSrcweir #include "comphelper/servicedecl.hxx"
38*cdf0e10cSrcweir #include "comphelper/unwrapargs.hxx"
39*cdf0e10cSrcweir #include <i18npool/mslangid.hxx>
40*cdf0e10cSrcweir #include "vcl/svapp.hxx"
41*cdf0e10cSrcweir #include "vcl/msgbox.hxx"
42*cdf0e10cSrcweir #include "com/sun/star/lang/XServiceInfo.hpp"
43*cdf0e10cSrcweir #include "com/sun/star/task/XJobExecutor.hpp"
44*cdf0e10cSrcweir #include "com/sun/star/ui/dialogs/XAsynchronousExecutableDialog.hpp"
45*cdf0e10cSrcweir 
46*cdf0e10cSrcweir #include "boost/bind.hpp"
47*cdf0e10cSrcweir #include "license_dialog.hxx"
48*cdf0e10cSrcweir #include "dp_gui_dialog2.hxx"
49*cdf0e10cSrcweir #include "dp_gui_extensioncmdqueue.hxx"
50*cdf0e10cSrcweir 
51*cdf0e10cSrcweir using namespace ::dp_misc;
52*cdf0e10cSrcweir using namespace ::com::sun::star;
53*cdf0e10cSrcweir using namespace ::com::sun::star::uno;
54*cdf0e10cSrcweir 
55*cdf0e10cSrcweir using ::rtl::OUString;
56*cdf0e10cSrcweir 
57*cdf0e10cSrcweir namespace css = ::com::sun::star;
58*cdf0e10cSrcweir namespace dp_gui {
59*cdf0e10cSrcweir 
60*cdf0e10cSrcweir //==============================================================================
61*cdf0e10cSrcweir class MyApp : public Application, private boost::noncopyable
62*cdf0e10cSrcweir {
63*cdf0e10cSrcweir public:
64*cdf0e10cSrcweir     MyApp();
65*cdf0e10cSrcweir     virtual ~MyApp();
66*cdf0e10cSrcweir 
67*cdf0e10cSrcweir     // Application
68*cdf0e10cSrcweir     virtual void Main();
69*cdf0e10cSrcweir };
70*cdf0e10cSrcweir 
71*cdf0e10cSrcweir //______________________________________________________________________________
72*cdf0e10cSrcweir MyApp::~MyApp()
73*cdf0e10cSrcweir {
74*cdf0e10cSrcweir }
75*cdf0e10cSrcweir 
76*cdf0e10cSrcweir //______________________________________________________________________________
77*cdf0e10cSrcweir MyApp::MyApp()
78*cdf0e10cSrcweir {
79*cdf0e10cSrcweir }
80*cdf0e10cSrcweir 
81*cdf0e10cSrcweir //______________________________________________________________________________
82*cdf0e10cSrcweir void MyApp::Main()
83*cdf0e10cSrcweir {
84*cdf0e10cSrcweir }
85*cdf0e10cSrcweir 
86*cdf0e10cSrcweir //##############################################################################
87*cdf0e10cSrcweir 
88*cdf0e10cSrcweir namespace
89*cdf0e10cSrcweir {
90*cdf0e10cSrcweir     struct ProductName
91*cdf0e10cSrcweir         : public rtl::Static< String, ProductName > {};
92*cdf0e10cSrcweir     struct Version
93*cdf0e10cSrcweir         : public rtl::Static< String, Version > {};
94*cdf0e10cSrcweir     struct AboutBoxVersion
95*cdf0e10cSrcweir         : public rtl::Static< String, AboutBoxVersion > {};
96*cdf0e10cSrcweir     struct OOOVendor
97*cdf0e10cSrcweir         : public rtl::Static< String, OOOVendor > {};
98*cdf0e10cSrcweir     struct Extension
99*cdf0e10cSrcweir         : public rtl::Static< String, Extension > {};
100*cdf0e10cSrcweir }
101*cdf0e10cSrcweir 
102*cdf0e10cSrcweir void ReplaceProductNameHookProc( String& rStr )
103*cdf0e10cSrcweir {
104*cdf0e10cSrcweir     static int nAll = 0, nPro = 0;
105*cdf0e10cSrcweir 
106*cdf0e10cSrcweir     nAll++;
107*cdf0e10cSrcweir     if ( rStr.SearchAscii( "%PRODUCT" ) != STRING_NOTFOUND )
108*cdf0e10cSrcweir     {
109*cdf0e10cSrcweir         String &rProductName = ProductName::get();
110*cdf0e10cSrcweir         String &rVersion = Version::get();
111*cdf0e10cSrcweir         String &rAboutBoxVersion = AboutBoxVersion::get();
112*cdf0e10cSrcweir         String &rExtension = Extension::get();
113*cdf0e10cSrcweir         String &rOOOVendor = OOOVendor::get();
114*cdf0e10cSrcweir 
115*cdf0e10cSrcweir         if ( !rProductName.Len() )
116*cdf0e10cSrcweir         {
117*cdf0e10cSrcweir             rtl::OUString aTmp;
118*cdf0e10cSrcweir             Any aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTNAME );
119*cdf0e10cSrcweir             aRet >>= aTmp;
120*cdf0e10cSrcweir             rProductName = aTmp;
121*cdf0e10cSrcweir 
122*cdf0e10cSrcweir             aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTVERSION );
123*cdf0e10cSrcweir             aRet >>= aTmp;
124*cdf0e10cSrcweir             rVersion = aTmp;
125*cdf0e10cSrcweir 
126*cdf0e10cSrcweir             aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::ABOUTBOXPRODUCTVERSION );
127*cdf0e10cSrcweir             aRet >>= aTmp;
128*cdf0e10cSrcweir             rAboutBoxVersion = aTmp;
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir             aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::OOOVENDOR );
131*cdf0e10cSrcweir             aRet >>= aTmp;
132*cdf0e10cSrcweir             rOOOVendor = aTmp;
133*cdf0e10cSrcweir 
134*cdf0e10cSrcweir             if ( !rExtension.Len() )
135*cdf0e10cSrcweir             {
136*cdf0e10cSrcweir                 aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTEXTENSION );
137*cdf0e10cSrcweir                 aRet >>= aTmp;
138*cdf0e10cSrcweir                 rExtension = aTmp;
139*cdf0e10cSrcweir             }
140*cdf0e10cSrcweir         }
141*cdf0e10cSrcweir 
142*cdf0e10cSrcweir         nPro++;
143*cdf0e10cSrcweir         rStr.SearchAndReplaceAllAscii( "%PRODUCTNAME", rProductName );
144*cdf0e10cSrcweir         rStr.SearchAndReplaceAllAscii( "%PRODUCTVERSION", rVersion );
145*cdf0e10cSrcweir         rStr.SearchAndReplaceAllAscii( "%ABOUTBOXPRODUCTVERSION", rAboutBoxVersion );
146*cdf0e10cSrcweir         rStr.SearchAndReplaceAllAscii( "%OOOVENDOR", rOOOVendor );
147*cdf0e10cSrcweir         rStr.SearchAndReplaceAllAscii( "%PRODUCTEXTENSION", rExtension );
148*cdf0e10cSrcweir     }
149*cdf0e10cSrcweir }
150*cdf0e10cSrcweir 
151*cdf0e10cSrcweir //==============================================================================
152*cdf0e10cSrcweir class ServiceImpl
153*cdf0e10cSrcweir     : public ::cppu::WeakImplHelper2<ui::dialogs::XAsynchronousExecutableDialog,
154*cdf0e10cSrcweir                                      task::XJobExecutor>
155*cdf0e10cSrcweir {
156*cdf0e10cSrcweir     Reference<XComponentContext> const m_xComponentContext;
157*cdf0e10cSrcweir     boost::optional< Reference<awt::XWindow> > /* const */ m_parent;
158*cdf0e10cSrcweir     boost::optional<OUString> /* const */ m_view;
159*cdf0e10cSrcweir     /* if true then this service is running in an unopkg process and not in an office process */
160*cdf0e10cSrcweir     boost::optional<sal_Bool> /* const */ m_unopkg;
161*cdf0e10cSrcweir 	boost::optional<OUString> m_extensionURL;
162*cdf0e10cSrcweir     OUString m_initialTitle;
163*cdf0e10cSrcweir     bool m_bShowUpdateOnly;
164*cdf0e10cSrcweir 
165*cdf0e10cSrcweir public:
166*cdf0e10cSrcweir     ServiceImpl( Sequence<Any> const & args,
167*cdf0e10cSrcweir                  Reference<XComponentContext> const & xComponentContext );
168*cdf0e10cSrcweir 
169*cdf0e10cSrcweir     // XAsynchronousExecutableDialog
170*cdf0e10cSrcweir     virtual void SAL_CALL setDialogTitle( OUString const & aTitle )
171*cdf0e10cSrcweir         throw (RuntimeException);
172*cdf0e10cSrcweir     virtual void SAL_CALL startExecuteModal(
173*cdf0e10cSrcweir         Reference< ui::dialogs::XDialogClosedListener > const & xListener )
174*cdf0e10cSrcweir         throw (RuntimeException);
175*cdf0e10cSrcweir 
176*cdf0e10cSrcweir     // XJobExecutor
177*cdf0e10cSrcweir     virtual void SAL_CALL trigger( OUString const & event )
178*cdf0e10cSrcweir         throw (RuntimeException);
179*cdf0e10cSrcweir };
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir //______________________________________________________________________________
182*cdf0e10cSrcweir ServiceImpl::ServiceImpl( Sequence<Any> const& args,
183*cdf0e10cSrcweir                           Reference<XComponentContext> const& xComponentContext)
184*cdf0e10cSrcweir     : m_xComponentContext(xComponentContext),
185*cdf0e10cSrcweir       m_bShowUpdateOnly( false )
186*cdf0e10cSrcweir {
187*cdf0e10cSrcweir 	try {
188*cdf0e10cSrcweir 		comphelper::unwrapArgs( args, m_parent, m_view, m_unopkg );
189*cdf0e10cSrcweir 		return;
190*cdf0e10cSrcweir 	} catch (css::lang::IllegalArgumentException & ) {
191*cdf0e10cSrcweir 	}
192*cdf0e10cSrcweir 	try {
193*cdf0e10cSrcweir 		comphelper::unwrapArgs( args, m_extensionURL);
194*cdf0e10cSrcweir 	} catch (css::lang::IllegalArgumentException & ) {
195*cdf0e10cSrcweir 	}
196*cdf0e10cSrcweir 
197*cdf0e10cSrcweir     ResHookProc pProc = ResMgr::GetReadStringHook();
198*cdf0e10cSrcweir     if ( !pProc )
199*cdf0e10cSrcweir         ResMgr::SetReadStringHook( ReplaceProductNameHookProc );
200*cdf0e10cSrcweir }
201*cdf0e10cSrcweir 
202*cdf0e10cSrcweir // XAsynchronousExecutableDialog
203*cdf0e10cSrcweir //______________________________________________________________________________
204*cdf0e10cSrcweir void ServiceImpl::setDialogTitle( OUString const & title )
205*cdf0e10cSrcweir     throw (RuntimeException)
206*cdf0e10cSrcweir {
207*cdf0e10cSrcweir     if ( dp_gui::TheExtensionManager::s_ExtMgr.is() )
208*cdf0e10cSrcweir     {
209*cdf0e10cSrcweir         const ::vos::OGuard guard( Application::GetSolarMutex() );
210*cdf0e10cSrcweir         ::rtl::Reference< ::dp_gui::TheExtensionManager > dialog(
211*cdf0e10cSrcweir             ::dp_gui::TheExtensionManager::get( m_xComponentContext,
212*cdf0e10cSrcweir                                                 m_parent ? *m_parent : Reference<awt::XWindow>(),
213*cdf0e10cSrcweir                                                 m_extensionURL ? *m_extensionURL : OUString() ) );
214*cdf0e10cSrcweir         dialog->SetText( title );
215*cdf0e10cSrcweir     }
216*cdf0e10cSrcweir     else
217*cdf0e10cSrcweir         m_initialTitle = title;
218*cdf0e10cSrcweir }
219*cdf0e10cSrcweir 
220*cdf0e10cSrcweir //______________________________________________________________________________
221*cdf0e10cSrcweir void ServiceImpl::startExecuteModal(
222*cdf0e10cSrcweir     Reference< ui::dialogs::XDialogClosedListener > const & xListener )
223*cdf0e10cSrcweir     throw (RuntimeException)
224*cdf0e10cSrcweir {
225*cdf0e10cSrcweir     bool bCloseDialog = true;  // only used if m_bShowUpdateOnly is true
226*cdf0e10cSrcweir     ::std::auto_ptr<Application> app;
227*cdf0e10cSrcweir     //ToDo: synchronize access to s_dialog !!!
228*cdf0e10cSrcweir     if (! dp_gui::TheExtensionManager::s_ExtMgr.is())
229*cdf0e10cSrcweir     {
230*cdf0e10cSrcweir         const bool bAppUp = (GetpApp() != 0);
231*cdf0e10cSrcweir         bool bOfficePipePresent;
232*cdf0e10cSrcweir         try {
233*cdf0e10cSrcweir             bOfficePipePresent = dp_misc::office_is_running();
234*cdf0e10cSrcweir         }
235*cdf0e10cSrcweir         catch (Exception & exc) {
236*cdf0e10cSrcweir             if (bAppUp) {
237*cdf0e10cSrcweir                 const vos::OGuard guard( Application::GetSolarMutex() );
238*cdf0e10cSrcweir                 std::auto_ptr<ErrorBox> box(
239*cdf0e10cSrcweir                     new ErrorBox( Application::GetActiveTopWindow(),
240*cdf0e10cSrcweir                                   WB_OK, exc.Message ) );
241*cdf0e10cSrcweir                 box->Execute();
242*cdf0e10cSrcweir             }
243*cdf0e10cSrcweir             throw;
244*cdf0e10cSrcweir         }
245*cdf0e10cSrcweir 
246*cdf0e10cSrcweir         if (! bOfficePipePresent) {
247*cdf0e10cSrcweir             OSL_ASSERT( ! bAppUp );
248*cdf0e10cSrcweir             app.reset( new MyApp );
249*cdf0e10cSrcweir             if (! InitVCL( Reference<lang::XMultiServiceFactory>(
250*cdf0e10cSrcweir                                m_xComponentContext->getServiceManager(),
251*cdf0e10cSrcweir                                UNO_QUERY_THROW ) ))
252*cdf0e10cSrcweir                 throw RuntimeException( OUSTR("Cannot initialize VCL!"),
253*cdf0e10cSrcweir                                         static_cast<OWeakObject *>(this) );
254*cdf0e10cSrcweir             AllSettings as = app->GetSettings();
255*cdf0e10cSrcweir             OUString slang;
256*cdf0e10cSrcweir             if (! (::utl::ConfigManager::GetDirectConfigProperty(
257*cdf0e10cSrcweir                        ::utl::ConfigManager::LOCALE ) >>= slang))
258*cdf0e10cSrcweir                 throw RuntimeException( OUSTR("Cannot determine language!"),
259*cdf0e10cSrcweir                                         static_cast<OWeakObject *>(this) );
260*cdf0e10cSrcweir             as.SetUILanguage( MsLangId::convertIsoStringToLanguage( slang ) );
261*cdf0e10cSrcweir             app->SetSettings( as );
262*cdf0e10cSrcweir             String sTitle = ::utl::ConfigManager::GetDirectConfigProperty(
263*cdf0e10cSrcweir                                 ::utl::ConfigManager::PRODUCTNAME).get<OUString>()
264*cdf0e10cSrcweir                                 + String(static_cast<sal_Unicode>(' '))
265*cdf0e10cSrcweir                                 + ::utl::ConfigManager::GetDirectConfigProperty(
266*cdf0e10cSrcweir                                     ::utl::ConfigManager::PRODUCTVERSION).get<OUString>();
267*cdf0e10cSrcweir             app->SetDisplayName(sTitle);
268*cdf0e10cSrcweir             ExtensionCmdQueue::syncRepositories( m_xComponentContext );
269*cdf0e10cSrcweir         }
270*cdf0e10cSrcweir     }
271*cdf0e10cSrcweir     else
272*cdf0e10cSrcweir     {
273*cdf0e10cSrcweir         // When m_bShowUpdateOnly is set, we are inside the office and the user clicked
274*cdf0e10cSrcweir         // the update notification icon in the menu bar. We must not close the extensions
275*cdf0e10cSrcweir         // dialog after displaying the update dialog when it has been visible before
276*cdf0e10cSrcweir         if ( m_bShowUpdateOnly )
277*cdf0e10cSrcweir             bCloseDialog = ! dp_gui::TheExtensionManager::s_ExtMgr->isVisible();
278*cdf0e10cSrcweir     }
279*cdf0e10cSrcweir 
280*cdf0e10cSrcweir     {
281*cdf0e10cSrcweir         const ::vos::OGuard guard( Application::GetSolarMutex() );
282*cdf0e10cSrcweir         ::rtl::Reference< ::dp_gui::TheExtensionManager > myExtMgr(
283*cdf0e10cSrcweir             ::dp_gui::TheExtensionManager::get(
284*cdf0e10cSrcweir                 m_xComponentContext,
285*cdf0e10cSrcweir                 m_parent ? *m_parent : Reference<awt::XWindow>(),
286*cdf0e10cSrcweir                 m_extensionURL ? *m_extensionURL : OUString() ) );
287*cdf0e10cSrcweir         myExtMgr->createDialog( false );
288*cdf0e10cSrcweir         if (m_initialTitle.getLength() > 0) {
289*cdf0e10cSrcweir             myExtMgr->SetText( m_initialTitle );
290*cdf0e10cSrcweir             m_initialTitle = OUString();
291*cdf0e10cSrcweir         }
292*cdf0e10cSrcweir         if ( m_bShowUpdateOnly )
293*cdf0e10cSrcweir         {
294*cdf0e10cSrcweir             myExtMgr->checkUpdates( true, !bCloseDialog );
295*cdf0e10cSrcweir             if ( bCloseDialog )
296*cdf0e10cSrcweir                 myExtMgr->Close();
297*cdf0e10cSrcweir             else
298*cdf0e10cSrcweir                 myExtMgr->ToTop( TOTOP_RESTOREWHENMIN );
299*cdf0e10cSrcweir         }
300*cdf0e10cSrcweir         else
301*cdf0e10cSrcweir         {
302*cdf0e10cSrcweir             myExtMgr->Show();
303*cdf0e10cSrcweir             myExtMgr->ToTop( TOTOP_RESTOREWHENMIN );
304*cdf0e10cSrcweir         }
305*cdf0e10cSrcweir     }
306*cdf0e10cSrcweir 
307*cdf0e10cSrcweir     if (app.get() != 0) {
308*cdf0e10cSrcweir         Application::Execute();
309*cdf0e10cSrcweir         DeInitVCL();
310*cdf0e10cSrcweir     }
311*cdf0e10cSrcweir 
312*cdf0e10cSrcweir     if (xListener.is())
313*cdf0e10cSrcweir         xListener->dialogClosed(
314*cdf0e10cSrcweir             ui::dialogs::DialogClosedEvent(
315*cdf0e10cSrcweir                 static_cast< ::cppu::OWeakObject * >(this),
316*cdf0e10cSrcweir                 sal_Int16(0)) );
317*cdf0e10cSrcweir }
318*cdf0e10cSrcweir 
319*cdf0e10cSrcweir // XJobExecutor
320*cdf0e10cSrcweir //______________________________________________________________________________
321*cdf0e10cSrcweir void ServiceImpl::trigger( OUString const &rEvent ) throw (RuntimeException)
322*cdf0e10cSrcweir {
323*cdf0e10cSrcweir     if ( rEvent == OUSTR("SHOW_UPDATE_DIALOG") )
324*cdf0e10cSrcweir         m_bShowUpdateOnly = true;
325*cdf0e10cSrcweir     else
326*cdf0e10cSrcweir         m_bShowUpdateOnly = false;
327*cdf0e10cSrcweir 
328*cdf0e10cSrcweir     startExecuteModal( Reference< ui::dialogs::XDialogClosedListener >() );
329*cdf0e10cSrcweir }
330*cdf0e10cSrcweir 
331*cdf0e10cSrcweir namespace sdecl = comphelper::service_decl;
332*cdf0e10cSrcweir sdecl::class_<ServiceImpl, sdecl::with_args<true> > serviceSI;
333*cdf0e10cSrcweir sdecl::ServiceDecl const serviceDecl(
334*cdf0e10cSrcweir     serviceSI,
335*cdf0e10cSrcweir     "com.sun.star.comp.deployment.ui.PackageManagerDialog",
336*cdf0e10cSrcweir     "com.sun.star.deployment.ui.PackageManagerDialog" );
337*cdf0e10cSrcweir 
338*cdf0e10cSrcweir sdecl::class_<LicenseDialog, sdecl::with_args<true> > licenseSI;
339*cdf0e10cSrcweir sdecl::ServiceDecl const licenseDecl(
340*cdf0e10cSrcweir     licenseSI,
341*cdf0e10cSrcweir     "com.sun.star.comp.deployment.ui.LicenseDialog",
342*cdf0e10cSrcweir     "com.sun.star.deployment.ui.LicenseDialog" );
343*cdf0e10cSrcweir 
344*cdf0e10cSrcweir sdecl::class_<UpdateRequiredDialogService, sdecl::with_args<true> > updateSI;
345*cdf0e10cSrcweir sdecl::ServiceDecl const updateDecl(
346*cdf0e10cSrcweir     updateSI,
347*cdf0e10cSrcweir     "com.sun.star.comp.deployment.ui.UpdateRequiredDialog",
348*cdf0e10cSrcweir     "com.sun.star.deployment.ui.UpdateRequiredDialog" );
349*cdf0e10cSrcweir } // namespace dp_gui
350*cdf0e10cSrcweir 
351*cdf0e10cSrcweir extern "C" {
352*cdf0e10cSrcweir 
353*cdf0e10cSrcweir void SAL_CALL component_getImplementationEnvironment(
354*cdf0e10cSrcweir     const sal_Char ** ppEnvTypeName, uno_Environment ** )
355*cdf0e10cSrcweir {
356*cdf0e10cSrcweir     *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
357*cdf0e10cSrcweir }
358*cdf0e10cSrcweir 
359*cdf0e10cSrcweir void * SAL_CALL component_getFactory(
360*cdf0e10cSrcweir     sal_Char const * pImplName,
361*cdf0e10cSrcweir     lang::XMultiServiceFactory * pServiceManager,
362*cdf0e10cSrcweir     registry::XRegistryKey * pRegistryKey )
363*cdf0e10cSrcweir {
364*cdf0e10cSrcweir     return component_getFactoryHelper(
365*cdf0e10cSrcweir         pImplName, pServiceManager, pRegistryKey, dp_gui::serviceDecl, dp_gui::licenseDecl, dp_gui::updateDecl );
366*cdf0e10cSrcweir }
367*cdf0e10cSrcweir 
368*cdf0e10cSrcweir } // extern "C"
369