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
dd2fe95c
Kaydet (Commit)
dd2fe95c
authored
Mar 27, 2012
tarafından
Andrzej J. R. Hunt
Kaydeden (comit)
Bjoern Michaelsen
Mar 27, 2012
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#43895 lp#905355: Never let users save in /tmp by default
üst
fd065e69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
filedlghelper.cxx
sfx2/source/dialog/filedlghelper.cxx
+23
-0
filedlgimpl.hxx
sfx2/source/dialog/filedlgimpl.hxx
+2
-0
No files found.
sfx2/source/dialog/filedlghelper.cxx
Dosyayı görüntüle @
dd2fe95c
...
...
@@ -101,6 +101,9 @@
#include <sfxlocal.hrc>
#include <rtl/oustringostreaminserter.hxx>
#include <rtl/strbuf.hxx>
#ifdef UNX
#include <sys/stat.h>
#endif
//-----------------------------------------------------------------------------
...
...
@@ -1635,6 +1638,24 @@ void FileDialogHelper_Impl::getRealFilter( String& _rFilter ) const
}
}
void
FileDialogHelper_Impl
::
verifyPath
()
{
#ifdef UNX
struct
stat
aFileStat
;
const
OString
sFullPath
=
OUStringToOString
(
maPath
.
copy
(
RTL_CONSTASCII_LENGTH
(
"file://"
))
+
maFileName
,
osl_getThreadTextEncoding
()
);
stat
(
sFullPath
.
getStr
(),
&
aFileStat
);
// lp#905355, fdo#43895
// Check that the file has read only permission and is in /tmp -- this is
// the case if we have opened the file from the web with firefox only.
if
(
maPath
.
reverseCompareToAsciiL
(
"file:///tmp"
,
11
)
==
0
&&
(
aFileStat
.
st_mode
&
(
S_IRWXO
+
S_IRWXG
+
S_IRWXU
)
)
==
S_IRUSR
)
{
maPath
=
SvtPathOptions
().
GetWorkPath
();
mxFileDlg
->
setDisplayDirectory
(
maPath
);
}
#endif
}
// ------------------------------------------------------------------------
void
FileDialogHelper_Impl
::
displayFolder
(
const
::
rtl
::
OUString
&
_rPath
)
{
...
...
@@ -1648,6 +1669,7 @@ void FileDialogHelper_Impl::displayFolder( const ::rtl::OUString& _rPath )
try
{
mxFileDlg
->
setDisplayDirectory
(
maPath
);
verifyPath
();
}
catch
(
const
IllegalArgumentException
&
)
{
...
...
@@ -1665,6 +1687,7 @@ void FileDialogHelper_Impl::setFileName( const ::rtl::OUString& _rFile )
try
{
mxFileDlg
->
setDefaultName
(
maFileName
);
verifyPath
();
}
catch
(
const
IllegalArgumentException
&
)
{
...
...
sfx2/source/dialog/filedlgimpl.hxx
Dosyayı görüntüle @
dd2fe95c
...
...
@@ -152,6 +152,8 @@ namespace sfx2
void
implInitializeFileName
(
);
void
verifyPath
(
);
void
implGetAndCacheFiles
(
const
::
com
::
sun
::
star
::
uno
::
Reference
<
XInterface
>&
xPicker
,
std
::
vector
<
rtl
::
OUString
>&
rpURLList
,
const
SfxFilter
*
pFilter
);
...
...
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