summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-08-01 08:02:44 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-08-01 08:02:44 +0000
commit7b3379bf9943a03e5504ac1daf3857a4ce0a14b4 (patch)
tree87f3ad3780890227c6346bfa631973a2287c5693 /framework
parent873c8d27c86d53aec81a2422a4c38fd39450f441 (diff)
INTEGRATION: CWS register30 (1.11.12); FILE MERGED
2008/07/29 14:06:45 obr 1.11.12.1: #158122# added indirection through ProductRegistration service
Diffstat (limited to 'framework')
-rw-r--r--framework/source/services/backingwindow.cxx22
1 files changed, 19 insertions, 3 deletions
diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx
index a59448da2c..3432ee5d98 100644
--- a/framework/source/services/backingwindow.cxx
+++ b/framework/source/services/backingwindow.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: backingwindow.cxx,v $
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
* This file is part of OpenOffice.org.
*
@@ -56,6 +56,7 @@
#include "com/sun/star/container/XNameAccess.hpp"
#include "com/sun/star/system/XSystemShellExecute.hpp"
#include "com/sun/star/system/SystemShellExecuteFlags.hpp"
+#include "com/sun/star/task/XJobExecutor.hpp"
using namespace ::com::sun::star::beans;
@@ -657,8 +658,23 @@ IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG )
pNode = "AddFeatureURL";
break;
case nItemId_Reg:
- pNodePath = "/org.openoffice.Office.Common/Help/Registration";
- pNode = "URL";
+ try
+ {
+ // create the Desktop component which can load components
+ Reference < lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
+ if( xFactory.is() )
+ {
+ Reference< task::XJobExecutor > xProductRegistration(
+ xFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.setup.ProductRegistration" ) ) ),
+ UNO_QUERY_THROW );
+
+ // tell it that the user wants to register
+ xProductRegistration->trigger( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RegistrationRequired" ) ) );
+ }
+ }
+ catch( const Exception& )
+ {
+ }
break;
case nItemId_Info:
pNodePath = "/org.openoffice.Office.Common/Help/StartCenter";