[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - fpicker/source sal/osl

Peter Nowee peter.nowee at gmail.com
Fri Jan 23 04:00:38 PST 2015


 fpicker/source/aqua/NSURL_OOoAdditions.mm |    2 +-
 sal/osl/unx/system.c                      |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 567a0e3bdd3f207bb6f7ae40944516db1048d82e
Author: Peter Nowee <peter.nowee at gmail.com>
Date:   Wed Jan 21 04:31:30 2015 +0100

    fdo#75467 extend Carbon API alias resolve from OS X 10.5 to 10.7
    
    Commits aa539f6 and 7aa4291 (June 2013) change the way Mac alias
    files are resolved. They replace Carbon API calls that were
    deprecated in OS X 10.8, such as FSResolveAliasFile, by Cocoa API
    calls such as CFURLCreateBookmarkDataFromFile.
    
    Unfortunately, these changes were also responsible for bug
    fdo#75467: Under Mac OS X 10.6 and 10.7, selecting a file in the
    Open File dialog or merely viewing files in the Save File dialog
    adds resource fork to those files, changing their sizes and
    modification dates.
    
    Introducing only the calls CFURLCreateBookmarkDataFromFile to
    the code as it was before the above-mentioned commits already
    introduces the bug.
    
    It was further established that the bugs are specific to the OS
    version (10.6 and 10.7), not the bitness (32-bit) of the build.
    (Thanks to Alex Thurgood.)
    
    This all indicates that there is unexpected behavior in Apple's
    CFURLCreateBookmarkDataFromFile under Mac OS X 10.6 and 10.7.
    However, a web search for this behavior yielded no results,
    suggesting it may only show up under specific circumstances.
    Since there is no report of this behavior under Mac OS X 10.8 or
    higher, and a simple and effective solution is available (see
    below), I did not investigate any further.
    
    Reverting to the code using the Carbon API, as it was used up
    until LibreOffice 4.1, resolves the problem for Mac OS X 10.6
    and 10.7.
    
    Douglas Mencken, in his work to port LibreOffice to PowerPC Macs,
    already brought back this code, wrapped in conditional compiler
    directives, so that it only applied to Mac OS X 10.5 and lower.
    See his commits e53eacb1 and 72e8f62 (February 2014).
    
    This commit extends the use of the Carbon API code for resolving
    aliases to Mac OS X 10.6 and 10.7 as well, thereby fixing bug
    fdo#75467.
    
    Change-Id: Ic2af13f487e1e62cb0a2683f3f4bbcf818e77e9f
    Reviewed-on: https://gerrit.libreoffice.org/14123
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit 9a9a33efaf613f8c4b0e0b4f36053c0fda68187b)

diff --git a/fpicker/source/aqua/NSURL_OOoAdditions.mm b/fpicker/source/aqua/NSURL_OOoAdditions.mm
index 80acb10..4e5ea6b 100644
--- a/fpicker/source/aqua/NSURL_OOoAdditions.mm
+++ b/fpicker/source/aqua/NSURL_OOoAdditions.mm
@@ -83,7 +83,7 @@ NSString* resolveAlias( NSString* i_pSystemPath )
                                                    kCFURLPOSIXPathStyle, false);
     if( rUrl != NULL )
     {
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1080
         FSRef rFS;
         if( CFURLGetFSRef( rUrl, &rFS ) )
         {
diff --git a/sal/osl/unx/system.c b/sal/osl/unx/system.c
index a234fce..8914275 100644
--- a/sal/osl/unx/system.c
+++ b/sal/osl/unx/system.c
@@ -157,7 +157,7 @@ int macxp_resolveAlias(char *path, int buflen)
   (void) buflen;
   return 0;
 #else
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1080
   FSRef aFSRef;
   OSStatus nErr;
   Boolean bFolder;
@@ -181,7 +181,7 @@ int macxp_resolveAlias(char *path, int buflen)
       if ( unprocessedPath )
           *unprocessedPath = '\0';
 
-#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1080
       nErr = noErr;
       bFolder = FALSE;
       bAliased = FALSE;


More information about the Libreoffice-commits mailing list