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
c488f3fc
Kaydet (Commit)
c488f3fc
authored
Eyl 13, 2015
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Simplify SvtFileDialog::appendDefaultExtension
Change-Id: I7d2d2aff6e26b66e73b6ccefdecf095c867d4f7d
üst
81d62c5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
21 deletions
+12
-21
iodlg.cxx
fpicker/source/office/iodlg.cxx
+12
-21
No files found.
fpicker/source/office/iodlg.cxx
Dosyayı görüntüle @
c488f3fc
...
@@ -2839,35 +2839,26 @@ void SvtFileDialog::appendDefaultExtension(OUString& _rFileName,
...
@@ -2839,35 +2839,26 @@ void SvtFileDialog::appendDefaultExtension(OUString& _rFileName,
const
OUString
&
_rFilterDefaultExtension
,
const
OUString
&
_rFilterDefaultExtension
,
const
OUString
&
_rFilterExtensions
)
const
OUString
&
_rFilterExtensions
)
{
{
OUString
aTemp
(
_rFileName
);
const
OUString
aType
(
_rFilterExtensions
.
toAsciiLowerCase
());
aTemp
=
aTemp
.
toAsciiLowerCase
();
OUString
aType
(
_rFilterExtensions
);
aType
=
aType
.
toAsciiLowerCase
();
if
(
aType
!=
FILEDIALOG_FILTER_ALL
)
if
(
aType
!=
FILEDIALOG_FILTER_ALL
)
{
{
sal_uInt16
nWildCard
=
comphelper
::
string
::
getTokenCount
(
aType
,
FILEDIALOG_DEF_EXTSEP
);
const
OUString
aTemp
(
_rFileName
.
toAsciiLowerCase
());
sal_uInt16
nIndex
;
sal_Int32
nPos
=
0
;
sal_Int32
nPos
=
0
;
for
(
nIndex
=
0
;
nIndex
<
nWildCard
;
nIndex
++
)
do
{
{
OUString
aExt
(
aType
.
getToken
(
0
,
FILEDIALOG_DEF_EXTSEP
,
nPos
));
if
(
nPos
+
1
<
aType
.
getLength
()
&&
aType
[
nPos
]
==
'*'
)
// take care of a leading *
// take care of a leading *
++
nPos
;
sal_Int32
nExtOffset
=
(
aExt
[
0
]
==
'*'
?
1
:
0
);
const
OUString
aExt
(
aType
.
getToken
(
0
,
FILEDIALOG_DEF_EXTSEP
,
nPos
));
const
sal_Unicode
*
pExt
=
aExt
.
getStr
()
+
nExtOffset
;
if
(
aExt
.
isEmpty
())
sal_Int32
nExtLen
=
aExt
.
getLength
()
-
nExtOffset
;
continue
;
sal_Int32
nOffset
=
aTemp
.
getLength
()
-
nExtLen
;
if
(
aTemp
.
endsWith
(
aExt
))
// minimize search by starting at last possible index
return
;
if
(
aTemp
.
indexOf
(
pExt
,
nOffset
)
==
nOffset
)
break
;
}
}
while
(
nPos
>=
0
);
if
(
nIndex
>=
nWildCard
)
_rFileName
+=
"."
+
_rFilterDefaultExtension
;
{
_rFileName
+=
"."
;
_rFileName
+=
_rFilterDefaultExtension
;
}
}
}
}
}
...
...
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