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
611346f3
Kaydet (Commit)
611346f3
authored
Haz 07, 2018
tarafından
Katarina Behrens
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Basic native folder picker
Change-Id: I1b77d7a1c8a4a3581554fb5c481b7d9039497ced
üst
14b7477f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
5 deletions
+26
-5
KDE5FilePicker.hxx
vcl/unx/kde5/KDE5FilePicker.hxx
+9
-2
KDE5FilePicker2.cxx
vcl/unx/kde5/KDE5FilePicker2.cxx
+6
-1
KDE5SalInstance.cxx
vcl/unx/kde5/KDE5SalInstance.cxx
+8
-2
KDE5SalInstance.hxx
vcl/unx/kde5/KDE5SalInstance.hxx
+3
-0
No files found.
vcl/unx/kde5/KDE5FilePicker.hxx
Dosyayı görüntüle @
611346f3
...
...
@@ -25,6 +25,7 @@
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/ui/dialogs/XFilePicker3.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/XFolderPicker2.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <osl/conditn.hxx>
...
...
@@ -37,13 +38,15 @@
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QHash>
#include <QtWidgets/QFileDialog>
class
QFileDialog
;
class
QGridLayout
;
class
QWidget
;
typedef
::
cppu
::
WeakComponentImplHelper
<
css
::
ui
::
dialogs
::
XFilePicker3
,
css
::
ui
::
dialogs
::
XFilePickerControlAccess
css
::
ui
::
dialogs
::
XFilePickerControlAccess
,
css
::
ui
::
dialogs
::
XFolderPicker2
// TODO css::ui::dialogs::XFilePreview
,
css
::
lang
::
XInitialization
,
css
::
lang
::
XServiceInfo
>
...
...
@@ -80,7 +83,7 @@ protected:
bool
allowRemoteUrls
;
public
:
explicit
KDE5FilePicker
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
);
explicit
KDE5FilePicker
(
QFileDialog
::
FileMode
);
virtual
~
KDE5FilePicker
()
override
;
void
enableFolderMode
();
...
...
@@ -121,6 +124,10 @@ public:
virtual
void
SAL_CALL
setLabel
(
sal_Int16
nControlId
,
const
OUString
&
rLabel
)
override
;
virtual
OUString
SAL_CALL
getLabel
(
sal_Int16
nControlId
)
override
;
// XFolderPicker stuff
virtual
OUString
SAL_CALL
getDirectory
()
override
;
virtual
void
SAL_CALL
setDescription
(
const
OUString
&
rDescription
)
override
;
/* TODO XFilePreview
virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSupportedImageFormats( );
...
...
vcl/unx/kde5/KDE5FilePicker2.cxx
Dosyayı görüntüle @
611346f3
...
...
@@ -77,7 +77,7 @@ uno::Sequence<OUString> FilePicker_getSupportedServiceNames()
// KDE5FilePicker
KDE5FilePicker
::
KDE5FilePicker
(
const
uno
::
Reference
<
uno
::
XComponentContext
>&
)
KDE5FilePicker
::
KDE5FilePicker
(
QFileDialog
::
FileMode
eMode
)
:
KDE5FilePicker_Base
(
_helperMutex
)
,
_dialog
(
new
QFileDialog
(
nullptr
,
{},
QDir
::
homePath
()))
,
_extraControls
(
new
QWidget
)
...
...
@@ -94,6 +94,7 @@ KDE5FilePicker::KDE5FilePicker(const uno::Reference<uno::XComponentContext>&)
QStringLiteral
(
"webdavs"
),
QStringLiteral
(
"smb"
),
});
_dialog
->
setFileMode
(
eMode
);
setMultiSelectionMode
(
false
);
...
...
@@ -231,6 +232,10 @@ OUString SAL_CALL KDE5FilePicker::getLabel(sal_Int16 controlId)
return
label
;
}
OUString
SAL_CALL
KDE5FilePicker
::
getDirectory
()
{
return
OUString
();
}
void
SAL_CALL
KDE5FilePicker
::
setDescription
(
const
OUString
&
)
{}
void
KDE5FilePicker
::
addCustomControl
(
sal_Int16
controlId
)
{
const
char
*
resId
=
nullptr
;
...
...
vcl/unx/kde5/KDE5SalInstance.cxx
Dosyayı görüntüle @
611346f3
...
...
@@ -49,9 +49,15 @@ SalFrame* KDE5SalInstance::CreateFrame(SalFrame* pParent, SalFrameStyleFlags nSt
}
uno
::
Reference
<
ui
::
dialogs
::
XFilePicker2
>
KDE5SalInstance
::
createFilePicker
(
const
uno
::
Reference
<
uno
::
XComponentContext
>&
xMSF
)
KDE5SalInstance
::
createFilePicker
(
const
uno
::
Reference
<
uno
::
XComponentContext
>&
/*xMSF*/
)
{
return
uno
::
Reference
<
ui
::
dialogs
::
XFilePicker2
>
(
new
KDE5FilePicker
(
xMSF
));
return
uno
::
Reference
<
ui
::
dialogs
::
XFilePicker2
>
(
new
KDE5FilePicker
(
QFileDialog
::
ExistingFile
));
}
uno
::
Reference
<
ui
::
dialogs
::
XFolderPicker2
>
KDE5SalInstance
::
createFolderPicker
(
const
uno
::
Reference
<
uno
::
XComponentContext
>&
/*xMSF*/
)
{
return
uno
::
Reference
<
ui
::
dialogs
::
XFolderPicker2
>
(
new
KDE5FilePicker
(
QFileDialog
::
Directory
));
}
bool
KDE5SalInstance
::
IsMainThread
()
const
{
return
qApp
->
thread
()
==
QThread
::
currentThread
();
}
...
...
vcl/unx/kde5/KDE5SalInstance.hxx
Dosyayı görüntüle @
611346f3
...
...
@@ -36,6 +36,9 @@ public:
virtual
css
::
uno
::
Reference
<
css
::
ui
::
dialogs
::
XFilePicker2
>
createFilePicker
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
)
override
;
virtual
css
::
uno
::
Reference
<
css
::
ui
::
dialogs
::
XFolderPicker2
>
createFolderPicker
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
)
override
;
virtual
bool
IsMainThread
()
const
override
;
};
...
...
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