[Libreoffice-commits] .: 2 commits - setup_native/source solenv/bin

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Sep 12 07:09:30 PDT 2012


 setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx |   37 +---------
 solenv/bin/modules/installer/windows/property.pm                    |   10 +-
 2 files changed, 12 insertions(+), 35 deletions(-)

New commits:
commit e2b1a7e4e4d9bfc32aab9921c30a6e40e08b8210
Author: Andras Timar <atimar at suse.com>
Date:   Wed Sep 12 16:06:07 2012 +0200

    fdo#39791 do not steal .doc association from MS Word
    
    I don't think it made sense to check OpenWithList at all. When we
    found WordPad there, we registered the file type, even when it was
    registered by MS Office.
    
    Change-Id: I15a151051cadd329e8614388ceb84470ea28805a

diff --git a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx
index f0f89fc..63e065c 100644
--- a/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx
+++ b/setup_native/source/win32/customactions/reg4allmsdoc/reg4allmsi.cxx
@@ -108,13 +108,13 @@ static BOOL CheckExtensionInRegistry( LPCSTR lpSubKey )
         DWORD   nSize = sizeof( szBuffer );
 
         lResult = RegQueryValueExA( hKey, "", NULL, NULL, (LPBYTE)szBuffer, &nSize );
-        if ( ERROR_SUCCESS == lResult )
+        if ( ERROR_SUCCESS == lResult && nSize > 0 )
         {
             szBuffer[nSize] = '\0';
             OutputDebugStringFormat( "Found value [%s] for key [%s].\n", szBuffer, lpSubKey );
 
             if ( strncmp( szBuffer, "WordPad.Document.1", 18 ) == 0 )
-            {   // We will replace registration for word pad
+            {   // We will replace registration for WordPad (alas, on XP only) FIXME
                 bRet = true;
             }
             else if ( strncmp( szBuffer, "LibreOffice.", 12 ) == 0 )
@@ -122,38 +122,11 @@ static BOOL CheckExtensionInRegistry( LPCSTR lpSubKey )
                 bRet = true;
             }
             else if ( strncmp( szBuffer, "lostub.", 7 ) == 0 )
-            {   // We will replace registration for ooostub, too
+            {   // We will replace registration for lostub, too
                 bRet = true;
             }
-            else
-            {
-                OutputDebugStringFormat( "  Checking OpenWithList of [%s].\n", lpSubKey );
-                HKEY hSubKey;
-                lResult = RegOpenKeyExA( hKey, "OpenWithList", 0, KEY_ENUMERATE_SUB_KEYS, &hSubKey );
-                if ( ERROR_SUCCESS == lResult )
-                {
-                    DWORD nIndex = 0;
-                    while ( ERROR_SUCCESS == lResult )
-                    {
-                        nSize = sizeof( szBuffer );
-                        lResult = RegEnumKeyExA( hSubKey, nIndex++, szBuffer, &nSize, NULL, NULL, NULL, NULL );
-                        if ( ERROR_SUCCESS == lResult )
-                        {
-                            OutputDebugStringFormat( "    Found value [%s] in OpenWithList of [%s].\n", szBuffer, lpSubKey );
-                            if ( strncmp( szBuffer, "WordPad.exe", 11 ) == 0 )
-                            {   // We will replace registration for word pad
-                                bRet = true;
-                            }
-                            else if ( nSize > 0 )
-                                bRet = false;
-                        }
-                    }
-                }
-                else
-                {
-                    OutputDebugStringFormat( "  No OpenWithList found!\n" );
-                }
-            }
+            else // we have a default value -> do not register, see fdo#39791
+                bRet = false;
         }
         else    // no default value found -> return TRUE to register for that key
             bRet = true;
commit da22f583f9a3207dd19d42db213bc64ffddfa7b5
Author: Andras Timar <atimar at suse.com>
Date:   Wed Sep 12 14:41:48 2012 +0200

    unused MSI properties: REGISTER_PPAM/PPSM/XLAM, related: fdo#52093
    
    Change-Id: Ia07a0351c68ffec2297b4316977b8ccff0fd5543

diff --git a/solenv/bin/modules/installer/windows/property.pm b/solenv/bin/modules/installer/windows/property.pm
index 519d2e1..52f3e34 100644
--- a/solenv/bin/modules/installer/windows/property.pm
+++ b/solenv/bin/modules/installer/windows/property.pm
@@ -411,10 +411,14 @@ sub set_ms_file_types_properties
 {
     my ($propertyfile) = @_;
 
+# we do not register PPSM, PPAM, and XLAM file types in
+# setup_native\source\win32\customactions\reg4allmsdoc\reg4allmsi.cxx
+# (probably because LibreOffice can't deal with them properly (?)
+
     push(@{$propertyfile}, "REGISTER_PPS"  . "\t" . "0" . "\n");
     push(@{$propertyfile}, "REGISTER_PPSX" . "\t" . "0" . "\n");
-    push(@{$propertyfile}, "REGISTER_PPSM" . "\t" . "0" . "\n");
-    push(@{$propertyfile}, "REGISTER_PPAM" . "\t" . "0" . "\n");
+#    push(@{$propertyfile}, "REGISTER_PPSM" . "\t" . "0" . "\n");
+#    push(@{$propertyfile}, "REGISTER_PPAM" . "\t" . "0" . "\n");
     push(@{$propertyfile}, "REGISTER_PPT"  . "\t" . "0" . "\n");
     push(@{$propertyfile}, "REGISTER_PPTX" . "\t" . "0" . "\n");
     push(@{$propertyfile}, "REGISTER_PPTM" . "\t" . "0" . "\n");
@@ -434,7 +438,7 @@ sub set_ms_file_types_properties
     push(@{$propertyfile}, "REGISTER_XLSX" . "\t" . "0" . "\n");
     push(@{$propertyfile}, "REGISTER_XLSM" . "\t" . "0" . "\n");
     push(@{$propertyfile}, "REGISTER_XLSB" . "\t" . "0" . "\n");
-    push(@{$propertyfile}, "REGISTER_XLAM" . "\t" . "0" . "\n");
+#    push(@{$propertyfile}, "REGISTER_XLAM" . "\t" . "0" . "\n");
     push(@{$propertyfile}, "REGISTER_XLT"  . "\t" . "0" . "\n");
     push(@{$propertyfile}, "REGISTER_XLTX" . "\t" . "0" . "\n");
     push(@{$propertyfile}, "REGISTER_XLTM" . "\t" . "0" . "\n");


More information about the Libreoffice-commits mailing list