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
e3ee0653
Kaydet (Commit)
e3ee0653
authored
Ock 23, 2018
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Various loplugin in --enable-gtk3-kde5 code
Change-Id: Ic12464f01950a5037bb6819a2722aba5a7e3e2e6
üst
862d2fc5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
28 additions
and
44 deletions
+28
-44
filepicker_ipc_commands.hxx
vcl/unx/gtk3_kde5/filepicker_ipc_commands.hxx
+2
-11
gtk3_kde5_filepicker.cxx
vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
+13
-14
gtk3_kde5_filepicker.hxx
vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx
+2
-2
gtk3_kde5_filepicker_ipc.cxx
vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
+7
-7
gtk3_kde5_filepicker_ipc.hxx
vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx
+3
-9
gtk3_kde5_folderpicker.hxx
vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.hxx
+1
-1
No files found.
vcl/unx/gtk3_kde5/filepicker_ipc_commands.hxx
Dosyayı görüntüle @
e3ee0653
...
...
@@ -80,13 +80,7 @@ inline void readIpcArg(std::istream& stream, Commands& value)
value
=
static_cast
<
Commands
>
(
v
);
}
inline
void
readIpcArg
(
std
::
istream
&
stream
,
sal_Bool
&
value
)
{
bool
v
=
false
;
stream
>>
v
;
value
=
v
;
stream
.
ignore
();
// skip space
}
void
readIpcArg
(
std
::
istream
&
,
sal_Bool
)
=
delete
;
inline
void
readIpcArg
(
std
::
istream
&
stream
,
bool
&
value
)
{
...
...
@@ -133,10 +127,7 @@ inline void sendIpcArg(std::ostream& stream, Commands value)
stream
<<
static_cast
<
uint16_t
>
(
value
)
<<
' '
;
}
inline
void
sendIpcArg
(
std
::
ostream
&
stream
,
sal_Bool
value
)
{
stream
<<
static_cast
<
bool
>
(
value
)
<<
' '
;
}
void
sendIpcArg
(
std
::
ostream
&
,
sal_Bool
)
=
delete
;
inline
void
sendIpcArg
(
std
::
ostream
&
stream
,
bool
value
)
{
stream
<<
value
<<
' '
;
}
...
...
vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.cxx
Dosyayı görüntüle @
e3ee0653
...
...
@@ -38,9 +38,9 @@
#undef Region
#include
"unx/geninst.h"
#include
<unx/geninst.h>
#include
"strings.hrc"
#include
<strings.hrc>
#include <future>
...
...
@@ -64,7 +64,7 @@ namespace bf = boost::filesystem;
namespace
{
uno
::
Sequence
<
OUString
>
SAL_CALL
FilePicker_getSupportedServiceNames
()
uno
::
Sequence
<
OUString
>
FilePicker_getSupportedServiceNames
()
{
uno
::
Sequence
<
OUString
>
aRet
(
3
);
aRet
[
0
]
=
"com.sun.star.ui.dialogs.FilePicker"
;
...
...
@@ -107,7 +107,7 @@ sal_Int16 SAL_CALL Gtk3KDE5FilePicker::execute() { return m_ipc.execute(); }
void
SAL_CALL
Gtk3KDE5FilePicker
::
setMultiSelectionMode
(
sal_Bool
multiSelect
)
{
m_ipc
.
sendCommand
(
Commands
::
SetMultiSelectionMode
,
multiSelect
);
m_ipc
.
sendCommand
(
Commands
::
SetMultiSelectionMode
,
bool
(
multiSelect
)
);
}
void
SAL_CALL
Gtk3KDE5FilePicker
::
setDefaultName
(
const
OUString
&
name
)
...
...
@@ -176,9 +176,9 @@ void SAL_CALL Gtk3KDE5FilePicker::appendFilterGroup(const OUString& /*rGroupTitl
void
SAL_CALL
Gtk3KDE5FilePicker
::
setValue
(
sal_Int16
controlId
,
sal_Int16
nControlAction
,
const
uno
::
Any
&
value
)
{
if
(
value
.
has
<
sal_B
ool
>
())
if
(
value
.
has
<
b
ool
>
())
{
m_ipc
.
sendCommand
(
Commands
::
SetValue
,
controlId
,
nControlAction
,
value
.
get
<
sal_B
ool
>
());
m_ipc
.
sendCommand
(
Commands
::
SetValue
,
controlId
,
nControlAction
,
value
.
get
<
b
ool
>
());
}
else
{
...
...
@@ -198,7 +198,7 @@ uno::Any SAL_CALL Gtk3KDE5FilePicker::getValue(sal_Int16 controlId, sal_Int16 nC
auto
id
=
m_ipc
.
sendCommand
(
Commands
::
GetValue
,
controlId
,
nControlAction
);
sal_B
ool
value
=
false
;
b
ool
value
=
false
;
m_ipc
.
readResponse
(
id
,
value
);
return
uno
::
Any
(
value
);
...
...
@@ -206,7 +206,7 @@ uno::Any SAL_CALL Gtk3KDE5FilePicker::getValue(sal_Int16 controlId, sal_Int16 nC
void
SAL_CALL
Gtk3KDE5FilePicker
::
enableControl
(
sal_Int16
controlId
,
sal_Bool
enable
)
{
m_ipc
.
sendCommand
(
Commands
::
EnableControl
,
controlId
,
enable
);
m_ipc
.
sendCommand
(
Commands
::
EnableControl
,
controlId
,
bool
(
enable
)
);
}
void
SAL_CALL
Gtk3KDE5FilePicker
::
setLabel
(
sal_Int16
controlId
,
const
OUString
&
label
)
...
...
@@ -284,7 +284,7 @@ void Gtk3KDE5FilePicker::addCustomControl(sal_Int16 controlId)
{
// the checkbox is created even for CHECKBOX_AUTOEXTENSION to simplify
// code, but the checkbox is hidden and ignored
sal_B
ool
hidden
=
controlId
==
CHECKBOX_AUTOEXTENSION
;
b
ool
hidden
=
controlId
==
CHECKBOX_AUTOEXTENSION
;
m_ipc
.
sendCommand
(
Commands
::
AddCheckBox
,
controlId
,
hidden
,
getResString
(
resId
));
...
...
@@ -308,8 +308,7 @@ void SAL_CALL Gtk3KDE5FilePicker::initialize(const uno::Sequence<uno::Any>& args
uno
::
Any
arg
;
if
(
args
.
getLength
()
==
0
)
{
throw
lang
::
IllegalArgumentException
(
OUString
(
"no arguments"
),
static_cast
<
XFilePicker2
*>
(
this
),
1
);
throw
lang
::
IllegalArgumentException
(
"no arguments"
,
static_cast
<
XFilePicker2
*>
(
this
),
1
);
}
arg
=
args
[
0
];
...
...
@@ -317,14 +316,14 @@ void SAL_CALL Gtk3KDE5FilePicker::initialize(const uno::Sequence<uno::Any>& args
if
((
arg
.
getValueType
()
!=
cppu
::
UnoType
<
sal_Int16
>::
get
())
&&
(
arg
.
getValueType
()
!=
cppu
::
UnoType
<
sal_Int8
>::
get
()))
{
throw
lang
::
IllegalArgumentException
(
OUString
(
"invalid argument type"
)
,
throw
lang
::
IllegalArgumentException
(
"invalid argument type"
,
static_cast
<
XFilePicker2
*>
(
this
),
1
);
}
sal_Int16
templateId
=
-
1
;
arg
>>=
templateId
;
sal_B
ool
saveDialog
=
false
;
b
ool
saveDialog
=
false
;
switch
(
templateId
)
{
case
FILEOPEN_SIMPLE
:
...
...
@@ -411,7 +410,7 @@ void SAL_CALL Gtk3KDE5FilePicker::cancel()
// TODO
}
void
SAL_CALL
Gtk3KDE5FilePicker
::
disposing
(
const
lang
::
EventObject
&
rEvent
)
void
Gtk3KDE5FilePicker
::
disposing
(
const
lang
::
EventObject
&
rEvent
)
{
uno
::
Reference
<
XFilePickerListener
>
xFilePickerListener
(
rEvent
.
Source
,
uno
::
UNO_QUERY
);
...
...
vcl/unx/gtk3_kde5/gtk3_kde5_filepicker.hxx
Dosyayı görüntüle @
e3ee0653
...
...
@@ -56,7 +56,7 @@ protected:
public
:
explicit
Gtk3KDE5FilePicker
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
);
virtual
~
Gtk3KDE5FilePicker
();
virtual
~
Gtk3KDE5FilePicker
()
override
;
// XFilePickerNotifier
virtual
void
SAL_CALL
addFilePickerListener
(
...
...
@@ -115,7 +115,7 @@ public:
virtual
void
SAL_CALL
cancel
()
override
;
// XEventListener
virtual
void
SAL_CALL
disposing
(
const
css
::
lang
::
EventObject
&
rEvent
);
virtual
void
disposing
(
const
css
::
lang
::
EventObject
&
rEvent
);
using
cppu
::
WeakComponentImplHelperBase
::
disposing
;
// XServiceInfo
...
...
vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.cxx
Dosyayı görüntüle @
e3ee0653
...
...
@@ -21,9 +21,9 @@
#undef Region
#include
"unx/geninst.h"
#include
<unx/geninst.h>
#include
"strings.hrc"
#include
<strings.hrc>
#include <future>
...
...
@@ -125,12 +125,12 @@ Gtk3KDE5FilePickerIpc::~Gtk3KDE5FilePickerIpc()
m_process
.
wait_for
(
std
::
chrono
::
milliseconds
(
100
));
}
sal_Int16
SAL_CALL
Gtk3KDE5FilePickerIpc
::
execute
()
sal_Int16
Gtk3KDE5FilePickerIpc
::
execute
()
{
auto
restoreMainWindow
=
blockMainWindow
();
auto
id
=
sendCommand
(
Commands
::
Execute
);
sal_B
ool
accepted
=
false
;
b
ool
accepted
=
false
;
readResponse
(
id
,
accepted
);
if
(
restoreMainWindow
)
...
...
@@ -145,7 +145,7 @@ static gboolean ignoreDeleteEvent(GtkWidget* /*widget*/, GdkEvent* /*event*/,
return
true
;
}
std
::
function
<
void
()
>
SAL_CALL
Gtk3KDE5FilePickerIpc
::
blockMainWindow
()
std
::
function
<
void
()
>
Gtk3KDE5FilePickerIpc
::
blockMainWindow
()
{
vcl
::
Window
*
pParentWin
=
Application
::
GetDefDialogParent
();
if
(
!
pParentWin
)
...
...
@@ -157,7 +157,7 @@ std::function<void()> SAL_CALL Gtk3KDE5FilePickerIpc::blockMainWindow()
sendCommand
(
Commands
::
SetWinId
,
pSysData
->
aWindow
);
auto
*
pMainWindow
=
reinterpret
_cast
<
GtkWidget
*>
(
pSysData
->
pWidget
);
auto
*
pMainWindow
=
static
_cast
<
GtkWidget
*>
(
pSysData
->
pWidget
);
if
(
!
pMainWindow
)
return
{};
...
...
@@ -190,7 +190,7 @@ std::function<void()> SAL_CALL Gtk3KDE5FilePickerIpc::blockMainWindow()
};
}
void
SAL_CALL
Gtk3KDE5FilePickerIpc
::
await
(
const
std
::
future
<
void
>&
future
)
void
Gtk3KDE5FilePickerIpc
::
await
(
const
std
::
future
<
void
>&
future
)
{
while
(
future
.
wait_for
(
std
::
chrono
::
milliseconds
(
1
))
!=
std
::
future_status
::
ready
)
{
...
...
vcl/unx/gtk3_kde5/gtk3_kde5_filepicker_ipc.hxx
Dosyayı görüntüle @
e3ee0653
...
...
@@ -36,12 +36,6 @@
#include <mutex>
#include <thread>
void
readIpcArg
(
std
::
istream
&
stream
,
OUString
&
str
);
void
readIpcArg
(
std
::
istream
&
stream
,
css
::
uno
::
Sequence
<
OUString
>&
seq
);
void
sendIpcArg
(
std
::
ostream
&
stream
,
const
OUString
&
string
);
OUString
getResString
(
const
char
*
pResId
);
class
Gtk3KDE5FilePickerIpc
...
...
@@ -60,7 +54,7 @@ public:
explicit
Gtk3KDE5FilePickerIpc
();
~
Gtk3KDE5FilePickerIpc
();
sal_Int16
SAL_CALL
execute
();
sal_Int16
execute
();
template
<
typename
...
Args
>
uint64_t
sendCommand
(
Commands
command
,
const
Args
&
...
args
)
{
...
...
@@ -101,9 +95,9 @@ public:
}
private
:
std
::
function
<
void
()
>
SAL_CALL
blockMainWindow
();
std
::
function
<
void
()
>
blockMainWindow
();
static
void
SAL_CALL
await
(
const
std
::
future
<
void
>&
future
);
static
void
await
(
const
std
::
future
<
void
>&
future
);
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
vcl/unx/gtk3_kde5/gtk3_kde5_folderpicker.hxx
Dosyayı görüntüle @
e3ee0653
...
...
@@ -38,7 +38,7 @@ public:
// constructor
explicit
Gtk3KDE5FolderPicker
(
const
css
::
uno
::
Reference
<
css
::
uno
::
XComponentContext
>&
xServiceMgr
);
virtual
~
Gtk3KDE5FolderPicker
();
virtual
~
Gtk3KDE5FolderPicker
()
override
;
// XExecutableDialog functions
virtual
void
SAL_CALL
setTitle
(
const
OUString
&
aTitle
)
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