[Libreoffice-commits] core.git: 2 commits - fpicker/source vcl/Library_vcl.mk
Tor Lillqvist
tml at iki.fi
Sun Jun 16 13:12:22 PDT 2013
fpicker/source/aqua/NSURL_OOoAdditions.mm | 28 +++++++++++++++-------------
vcl/Library_vcl.mk | 1 +
2 files changed, 16 insertions(+), 13 deletions(-)
New commits:
commit 7aa42913bb1828b877c2f73b4fe59cc3c65a67bf
Author: Tor Lillqvist <tml at iki.fi>
Date: Sun Jun 16 23:01:05 2013 +0300
WaE: 'FSResolveAliasFile' is deprecated: first deprecated in OS X 10.8
Use the bookmark API instead.
Change-Id: I61fe91ea2c7287c52d45ddfee772ecfcfb5498b6
diff --git a/fpicker/source/aqua/NSURL_OOoAdditions.mm b/fpicker/source/aqua/NSURL_OOoAdditions.mm
index c4567eb..858eb27 100644
--- a/fpicker/source/aqua/NSURL_OOoAdditions.mm
+++ b/fpicker/source/aqua/NSURL_OOoAdditions.mm
@@ -83,23 +83,25 @@ NSString* resolveAlias( NSString* i_pSystemPath )
kCFURLPOSIXPathStyle, false);
if( rUrl != NULL )
{
- FSRef rFS;
- if( CFURLGetFSRef( rUrl, &rFS ) )
+ CFErrorRef rError;
+ CFDataRef rBookmark = CFURLCreateBookmarkDataFromFile( NULL, rUrl, &rError );
+ CFRelease( rUrl );
+ if( rBookmark != NULL )
{
- Boolean bIsFolder = false;
- Boolean bAlias = false;
- OSErr err = FSResolveAliasFile( &rFS, true, &bIsFolder, &bAlias);
- if( (err == noErr) && bAlias )
+ Boolean bIsStale;
+ CFURLRef rResolvedUrl = CFURLCreateByResolvingBookmarkData( kCFAllocatorDefault, rBookmark, kCFBookmarkResolutionWithoutUIMask,
+ NULL, NULL, &bIsStale, &rError );
+ CFRelease( rBookmark );
+ if( rResolvedUrl == NULL )
{
- CFURLRef rResolvedUrl = CFURLCreateFromFSRef( kCFAllocatorDefault, &rFS );
- if( rResolvedUrl != NULL )
- {
- pResolvedPath = (NSString*)CFURLCopyFileSystemPath( rResolvedUrl, kCFURLPOSIXPathStyle );
- CFRelease( rResolvedUrl );
- }
+ CFRelease( rError );
+ }
+ else
+ {
+ pResolvedPath = (NSString*)CFURLCopyFileSystemPath( rResolvedUrl, kCFURLPOSIXPathStyle );
+ CFRelease( rResolvedUrl );
}
}
- CFRelease( rUrl );
}
return pResolvedPath;
commit 332bce15e713cc07836082e0d0e82efc6e671762
Author: Tor Lillqvist <tml at iki.fi>
Date: Sun Jun 16 22:50:24 2013 +0300
Need the IOKit library now
Change-Id: Ib98fc2f683729d1c9fe6768c63a1d1a6614ba567
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 79d5326..32a1266 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -79,6 +79,7 @@ $(eval $(call gb_Library_use_libraries,vcl,\
ifeq ($(OS),MACOSX)
$(eval $(call gb_Library_add_libs,vcl,\
+ -lIOKit \
-lobjc \
))
endif
More information about the Libreoffice-commits
mailing list