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
31664660
Kaydet (Commit)
31664660
authored
Tem 10, 2015
tarafından
Szymon Kłos
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
RemoteFilesDialog: auto file extension in the save mode
Change-Id: I7b1dd5cc330de0c1ad713d68d93e7d12375033c6
üst
16ba8ede
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
RemoteFilesDialog.hxx
include/svtools/RemoteFilesDialog.hxx
+2
-0
RemoteFilesDialog.cxx
svtools/source/dialogs/RemoteFilesDialog.cxx
+21
-0
No files found.
include/svtools/RemoteFilesDialog.hxx
Dosyayı görüntüle @
31664660
...
...
@@ -153,6 +153,8 @@ private:
FileViewResult
OpenURL
(
OUString
sURL
);
void
AddFileExtension
();
void
EnableControls
();
DECL_LINK
(
AddServiceHdl
,
void
*
);
...
...
svtools/source/dialogs/RemoteFilesDialog.cxx
Dosyayı görüntüle @
31664660
...
...
@@ -517,6 +517,23 @@ FileViewResult RemoteFilesDialog::OpenURL( OUString sURL )
return
eResult
;
}
void
RemoteFilesDialog
::
AddFileExtension
()
{
if
(
m_nCurrentFilter
!=
LISTBOX_ENTRY_NOTFOUND
)
{
OUString
sExt
=
m_aFilters
[
m_nCurrentFilter
].
second
;
OUString
sFileName
=
m_pName_ed
->
GetText
();
sal_Int32
nDotPos
=
sFileName
.
lastIndexOf
(
'.'
);
if
(
nDotPos
==
-
1
)
{
sFileName
+=
sExt
.
copy
(
1
);
// without '*'
m_pName_ed
->
SetText
(
sFileName
);
}
}
}
void
RemoteFilesDialog
::
EnableControls
()
{
if
(
m_pServices_lb
->
GetEntryCount
()
>
0
)
...
...
@@ -787,6 +804,10 @@ IMPL_LINK ( RemoteFilesDialog, SelectBreadcrumbHdl, Breadcrumb*, pPtr )
IMPL_LINK_NOARG
(
RemoteFilesDialog
,
OkHdl
)
{
// auto extension
if
(
m_eMode
==
REMOTEDLG_MODE_SAVE
)
AddFileExtension
();
// check if file/path exists
OUString
sCurrentPath
=
m_pFileView
->
GetViewURL
();
...
...
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