Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
0aeba08d
Kaydet (Commit)
0aeba08d
authored
Agu 25, 2013
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix "Save As" when sandboxed on OS X
Change-Id: Ibe2ea21265a0bb9c4fedcef137626df2a8019116
üst
21fbeebc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
0 deletions
+33
-0
SalAquaFilePicker.mm
fpicker/source/aqua/SalAquaFilePicker.mm
+6
-0
uunxapi.cxx
sal/osl/unx/uunxapi.cxx
+27
-0
No files found.
fpicker/source/aqua/SalAquaFilePicker.mm
Dosyayı görüntüle @
0aeba08d
...
...
@@ -340,6 +340,12 @@ uno::Sequence<rtl::OUString> SAL_CALL SalAquaFilePicker::getFiles() throw( uno::
if (userDefaults != NULL &&
[url respondsToSelector:@selector(bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:)])
{
// In the case of "Save As" when the user has input a new
// file name, this call will return nil, as bookmarks can
// (naturally) only be created for existing file system
// objects. In that case, code at a much lower level, in
// sal, takes care of creating a bookmark when a new file
// has been created outside the sandbox.
NSData *data = [url bookmarkDataWithOptions:NSURLBookmarkCreationWithSecurityScope
includingResourceValuesForKeys:nil
relativeToURL:nil
...
...
sal/osl/unx/uunxapi.cxx
Dosyayı görüntüle @
0aeba08d
...
...
@@ -262,6 +262,33 @@ int open_c(const char *cpPath, int oflag, int mode)
int
result
=
open
(
cpPath
,
oflag
,
mode
);
#if defined(MACOSX) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 && HAVE_FEATURE_MACOSX_SANDBOX
if
(
result
!=
-
1
&&
(
oflag
&
O_CREAT
)
&&
(
oflag
&
O_EXCL
))
{
// A new file was created. Check if it is outside the sandbox.
// (In that case it must be one the user selected as export or
// save destination in a file dialog, otherwise we wouldn't
// have been able to crete it.) Create and store a security
// scoped bookmark for it so that we can access the file in
// the future, too. (For the "Recent Files" functionality.)
const
char
*
sandbox
=
[
NSHomeDirectory
()
UTF8String
];
if
(
!
(
memcmp
(
sandbox
,
cpPath
,
strlen
(
sandbox
))
==
0
&&
cpPath
[
strlen
(
sandbox
)]
==
'/'
))
{
NSURL
*
url
=
[
NSURL
fileURLWithPath
:
[
NSString
stringWithUTF8String
:
cpPath
]];
NSData
*
data
=
[
url
bookmarkDataWithOptions
:
NSURLBookmarkCreationWithSecurityScope
includingResourceValuesForKeys
:
nil
relativeToURL
:
nil
error
:
nil
];
if
(
data
!=
NULL
)
{
[
userDefaults
setObject
:
data
forKey
:
[
@
"bookmarkFor:"
stringByAppendingString
:
[
url
absoluteString
]]];
}
}
}
#endif
done_accessing_file_path
(
cpPath
,
state
);
return
result
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment