[Libreoffice-commits] .: Branch 'libreoffice-3-6' - 2 commits - desktop/source desktop/win32 instsetoo_native/inc_openoffice scp2/source

Andras Timar timar at kemper.freedesktop.org
Thu Jun 28 10:49:09 PDT 2012


 desktop/source/app/app.cxx                                         |   36 ++++++++++
 desktop/win32/source/QuickStart/QuickStart.cxx                     |   11 +--
 instsetoo_native/inc_openoffice/windows/msi_templates/CheckBox.idt |    1 
 instsetoo_native/inc_openoffice/windows/msi_templates/Control.idt  |    3 
 instsetoo_native/inc_openoffice/windows/msi_templates/ControlC.idt |    1 
 scp2/source/quickstart/registryitem_quickstart.scp                 |    5 -
 6 files changed, 47 insertions(+), 10 deletions(-)

New commits:
commit 55d095a3122f68ebf97fd9b2567173c7fb648761
Author: Andras Timar <atimar at suse.com>
Date:   Thu Jun 28 14:21:27 2012 +0200

    use defines from systools/win32/qswin32.h instead of duplication
    
    Change-Id: I3d52308087412d1250b8ad64ffc308ca7cc414fd

diff --git a/desktop/win32/source/QuickStart/QuickStart.cxx b/desktop/win32/source/QuickStart/QuickStart.cxx
index b3e19a5..77583c4 100644
--- a/desktop/win32/source/QuickStart/QuickStart.cxx
+++ b/desktop/win32/source/QuickStart/QuickStart.cxx
@@ -5,16 +5,13 @@
 #include "StdAfx.h"
 #include "resource.h"
 #include <systools/win32/uwinapi.h>
+#include <systools/win32/qswin32.h>
 #include <stdio.h>
 
-// message used to communicate with soffice
-#define LISTENER_WINDOWCLASS    "SO Listener Class"
-#define KILLTRAY_MESSAGE        "SO KillTray"
-
 bool SofficeRuns()
 {
     // check for soffice by searching the communication window
-    return ( FindWindowEx( NULL, NULL, LISTENER_WINDOWCLASS, NULL ) == NULL ) ? false : true;
+    return ( FindWindowEx( NULL, NULL, QUICKSTART_CLASSNAME, NULL ) == NULL ) ? false : true;
 }
 
 bool launchSoffice( )
@@ -57,11 +54,11 @@ int APIENTRY WinMain(HINSTANCE /*hInstance*/,
     {
         if ( 0 == strcmp( __argv[i], "--killtray" ) )
         {
-            HWND    hwndTray = FindWindow( LISTENER_WINDOWCLASS, NULL );
+            HWND    hwndTray = FindWindow( QUICKSTART_CLASSNAME, NULL );
 
             if ( hwndTray )
             {
-                UINT    uMsgKillTray = RegisterWindowMessage( KILLTRAY_MESSAGE );
+                UINT    uMsgKillTray = RegisterWindowMessage( SHUTDOWN_QUICKSTART_MESSAGE );
                 SendMessage( hwndTray, uMsgKillTray, 0, 0 );
             }
 
commit fbc9e19443167bdfd98474ff979bf2c34530efca
Author: Andras Timar <atimar at suse.com>
Date:   Thu Jun 28 12:33:25 2012 +0200

    fdo#46510 optionally turn on Quickstarter by installer
    
    Change-Id: Ie002ab01a804cceea06e0a2ba7e6b2fe2a495344

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 7f037c1..b7136de 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -102,6 +102,18 @@
 #include <sys/wait.h>
 #endif
 
+#ifdef WNT
+#ifdef _MSC_VER
+#pragma warning(push, 1) /* disable warnings within system headers */
+#endif
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+#endif //WNT
+
+
 using rtl::OUString;
 using rtl::OUStringBuffer;
 
@@ -3053,6 +3065,30 @@ void Desktop::CheckFirstRun( )
     m_firstRunTimer.SetTimeoutHdl(LINK(this, Desktop, AsyncInitFirstRun));
     m_firstRunTimer.Start();
 
+#ifdef WNT
+    // Check if Quckstarter should be started (on Windows only)
+    TCHAR szValue[8192];
+    DWORD nValueSize = sizeof(szValue);
+    HKEY hKey;
+    if ( ERROR_SUCCESS == RegOpenKey( HKEY_LOCAL_MACHINE,  "Software\\LibreOffice", &hKey ) )
+    {
+        if ( ERROR_SUCCESS == RegQueryValueEx( hKey, TEXT("RunQuickstartAtFirstStart"), NULL, NULL, (LPBYTE)szValue, &nValueSize ) )
+        {
+            sal_Bool bQuickstart( sal_True );
+            sal_Bool bAutostart( sal_True );
+            Sequence< Any > aSeq( 2 );
+            aSeq[0] <<= bQuickstart;
+            aSeq[1] <<= bAutostart;
+
+            Reference < XInitialization > xQuickstart( ::comphelper::getProcessServiceFactory()->createInstance(
+                OUString::createFromAscii( "com.sun.star.office.Quickstart" )),UNO_QUERY );
+            if ( xQuickstart.is() )
+                xQuickstart->initialize( aSeq );
+            RegCloseKey( hKey );
+        }
+    }
+#endif
+
     // --------------------------------------------------------------------
     // reset the config flag
 
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/CheckBox.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/CheckBox.idt
index 20d80fb..85d191a 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/CheckBox.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/CheckBox.idt
@@ -3,3 +3,4 @@ s72	S64
 CheckBox	Property
 CREATEDESKTOPLINK	1
 ENABLEATTOOLS	1
+QUICKSTART	1
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/Control.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/Control.idt
index 2fbbad7..01fd1f4 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/Control.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/Control.idt
@@ -231,7 +231,8 @@ ReadyToInstall	DlgTitle2	Text	13	6	280	25	65538		OOO_CONTROL_171
 ReadyToInstall	DlgTitle3	Text	13	6	280	25	65538		OOO_CONTROL_172		
 ReadyToInstall	InstallNow	PushButton	230	243	66	17	3		OOO_CONTROL_173	Cancel	
 ReadyToInstall	DesktopLink	CheckBox	21	100	300	10	3	CREATEDESKTOPLINK	OOO_CONTROL_319	EnableATTools	
-ReadyToInstall	EnableATTools	CheckBox	21	125	300	10	3	ENABLEATTOOLS	OOO_CONTROL_320	Back	
+ReadyToInstall	EnableATTools	CheckBox	21	125	300	10	3	ENABLEATTOOLS	OOO_CONTROL_320	EnableQuickstart	
+ReadyToInstall	EnableQuickstart	CheckBox	21	150	300	10	3	QUICKSTART	OOO_CONTROL_321	Back	
 ReadyToRemove	Back	PushButton	164	243	66	17	3		OOO_CONTROL_174	RemoveNow	
 ReadyToRemove	Banner	Bitmap	0	0	374	44	1		BannerBmp		
 ReadyToRemove	BannerLine	Line	0	44	374	0	1				
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/ControlC.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/ControlC.idt
index 7b69d14..3fc3e48 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/ControlC.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/ControlC.idt
@@ -24,6 +24,7 @@ ReadyToInstall	DlgTitle	Show	ProgressType0="Modify"
 ReadyToInstall	DlgTitle2	Show	ProgressType0="Repair"
 ReadyToInstall	DlgTitle3	Show	ProgressType0="install"
 ReadyToInstall	DesktopLink	Hide	NOT DESKTOPLINKEXISTS
+ReadyToInstall	EnableQuickstart	Hide	NOT ( &gm_o_Quickstart=3 OR ( !gm_o_Quickstart=3 AND &gm_o_Quickstart=-1 ) )
 SetupCompleteError	Back	Default	UpdateStarted
 SetupCompleteError	Back	Disable	NOT UpdateStarted
 SetupCompleteError	Back	Enable	UpdateStarted
diff --git a/scp2/source/quickstart/registryitem_quickstart.scp b/scp2/source/quickstart/registryitem_quickstart.scp
index 31e0e95..3a02d6a 100644
--- a/scp2/source/quickstart/registryitem_quickstart.scp
+++ b/scp2/source/quickstart/registryitem_quickstart.scp
@@ -27,10 +27,11 @@
 
 #include "macros.inc"
 
-RegistryItem gid_Regitem_Software_OpenOffice_Quickstarterinstalled
+RegistryItem gid_Regitem_Software_OpenOffice_RunQuickstartAtFirstStart
     ParentID = PREDEFINED_HKEY_LOCAL_MACHINE;
     Subkey = "Software\LibreOffice";
     ModuleID = gid_Module_Optional_Quickstart;
-    Name = "QuickStarterInstalled";
+    Name = "RunQuickstartAtFirstStart";
     Value = "1";
+    ComponentCondition = "QUICKSTART=1";
 End


More information about the Libreoffice-commits mailing list