summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2018-06-04 15:39:40 +0200
committerKatarina Behrens <Katarina.Behrens@cib.de>2018-06-18 15:27:57 +0200
commita2318dcff64e67b32e80ba3561ab25fb2f10cfab (patch)
tree8660cdbaed778240c99dbdf0e6a18b5aed7eac5d /vcl/unx
parent6196b7292fbb3168c558e64881601148c15653e4 (diff)
Basic structures of KDE5 native filepicker build now
Change-Id: I174a4a01f2191d935ea069a0e04b5c88f4bf8193
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/kde5/KDE5FilePicker.cxx4
-rw-r--r--vcl/unx/kde5/KDE5FilePicker2.cxx70
-rw-r--r--vcl/unx/kde5/KDE5FilePicker2.hxx3
3 files changed, 13 insertions, 64 deletions
diff --git a/vcl/unx/kde5/KDE5FilePicker.cxx b/vcl/unx/kde5/KDE5FilePicker.cxx
index f3b48b837836..bda9de9b9ae3 100644
--- a/vcl/unx/kde5/KDE5FilePicker.cxx
+++ b/vcl/unx/kde5/KDE5FilePicker.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "kde5_filepicker.hxx"
+#include "KDE5FilePicker.hxx"
#include <KWindowSystem>
#include <KFileWidget>
@@ -241,6 +241,6 @@ bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e)
return QObject::eventFilter(o, e);
}
-#include <kde5_filepicker.moc>
+#include <KDE5FilePicker.moc>
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx
index 011769091f6d..b2bafcdda95b 100644
--- a/vcl/unx/kde5/KDE5FilePicker2.cxx
+++ b/vcl/unx/kde5/KDE5FilePicker2.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "gtk3_kde5_filepicker.hxx"
+#include "KDE5FilePicker2.hxx"
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -88,33 +88,19 @@ void SAL_CALL KDE5FilePicker2::removeFilePickerListener(const uno::Reference<XFi
m_xListener.clear();
}
-void SAL_CALL KDE5FilePicker2::setTitle(const OUString& title)
-{
- m_ipc.sendCommand(Commands::SetTitle, title);
-}
+void SAL_CALL KDE5FilePicker2::setTitle(const OUString& title) {}
-sal_Int16 SAL_CALL KDE5FilePicker2::execute() { return m_ipc.execute(); }
+sal_Int16 SAL_CALL KDE5FilePicker2::execute() { return 0; }
-void SAL_CALL KDE5FilePicker2::setMultiSelectionMode(sal_Bool multiSelect)
-{
- m_ipc.sendCommand(Commands::SetMultiSelectionMode, bool(multiSelect));
-}
+void SAL_CALL KDE5FilePicker2::setMultiSelectionMode(sal_Bool multiSelect) {}
-void SAL_CALL KDE5FilePicker2::setDefaultName(const OUString& name)
-{
- m_ipc.sendCommand(Commands::SetDefaultName, name);
-}
+void SAL_CALL KDE5FilePicker2::setDefaultName(const OUString& name) {}
-void SAL_CALL KDE5FilePicker2::setDisplayDirectory(const OUString& dir)
-{
- m_ipc.sendCommand(Commands::SetDisplayDirectory, dir);
-}
+void SAL_CALL KDE5FilePicker2::setDisplayDirectory(const OUString& dir) {}
OUString SAL_CALL KDE5FilePicker2::getDisplayDirectory()
{
- auto id = m_ipc.sendCommand(Commands::GetDisplayDirectory);
OUString dir;
- m_ipc.readResponse(id, dir);
return dir;
}
@@ -128,27 +114,17 @@ uno::Sequence<OUString> SAL_CALL KDE5FilePicker2::getFiles()
uno::Sequence<OUString> SAL_CALL KDE5FilePicker2::getSelectedFiles()
{
- auto id = m_ipc.sendCommand(Commands::GetSelectedFiles);
uno::Sequence<OUString> seq;
- m_ipc.readResponse(id, seq);
return seq;
}
-void SAL_CALL KDE5FilePicker2::appendFilter(const OUString& title, const OUString& filter)
-{
- m_ipc.sendCommand(Commands::AppendFilter, title, filter);
-}
+void SAL_CALL KDE5FilePicker2::appendFilter(const OUString& title, const OUString& filter) {}
-void SAL_CALL KDE5FilePicker2::setCurrentFilter(const OUString& title)
-{
- m_ipc.sendCommand(Commands::SetCurrentFilter, title);
-}
+void SAL_CALL KDE5FilePicker2::setCurrentFilter(const OUString& title) {}
OUString SAL_CALL KDE5FilePicker2::getCurrentFilter()
{
- auto id = m_ipc.sendCommand(Commands::GetCurrentFilter);
OUString filter;
- m_ipc.readResponse(id, filter);
return filter;
}
@@ -166,14 +142,6 @@ void SAL_CALL KDE5FilePicker2::appendFilterGroup(const OUString& /*rGroupTitle*/
void SAL_CALL KDE5FilePicker2::setValue(sal_Int16 controlId, sal_Int16 nControlAction,
const uno::Any& value)
{
- if (value.has<bool>())
- {
- m_ipc.sendCommand(Commands::SetValue, controlId, nControlAction, value.get<bool>());
- }
- else
- {
- OSL_TRACE("set value of unhandled type %d", controlId);
- }
}
uno::Any SAL_CALL KDE5FilePicker2::getValue(sal_Int16 controlId, sal_Int16 nControlAction)
@@ -186,29 +154,18 @@ uno::Any SAL_CALL KDE5FilePicker2::getValue(sal_Int16 controlId, sal_Int16 nCont
// saves the value of the setting, so LO core is not needed for that either.
return uno::Any(false);
- auto id = m_ipc.sendCommand(Commands::GetValue, controlId, nControlAction);
-
bool value = false;
- m_ipc.readResponse(id, value);
return uno::Any(value);
}
-void SAL_CALL KDE5FilePicker2::enableControl(sal_Int16 controlId, sal_Bool enable)
-{
- m_ipc.sendCommand(Commands::EnableControl, controlId, bool(enable));
-}
+void SAL_CALL KDE5FilePicker2::enableControl(sal_Int16 controlId, sal_Bool enable) {}
-void SAL_CALL KDE5FilePicker2::setLabel(sal_Int16 controlId, const OUString& label)
-{
- m_ipc.sendCommand(Commands::SetLabel, controlId, label);
-}
+void SAL_CALL KDE5FilePicker2::setLabel(sal_Int16 controlId, const OUString& label) {}
OUString SAL_CALL KDE5FilePicker2::getLabel(sal_Int16 controlId)
{
- auto id = m_ipc.sendCommand(Commands::GetLabel, controlId);
OUString label;
- m_ipc.readResponse(id, label);
return label;
}
@@ -279,9 +236,6 @@ void KDE5FilePicker2::addCustomControl(sal_Int16 controlId)
// the checkbox is created even for CHECKBOX_AUTOEXTENSION to simplify
// code, but the checkbox is hidden and ignored
bool hidden = controlId == CHECKBOX_AUTOEXTENSION;
-
- m_ipc.sendCommand(Commands::AddCheckBox, controlId, hidden, getResString(resId));
-
break;
}
case PUSHBUTTON_PLAY:
@@ -402,9 +356,7 @@ void SAL_CALL KDE5FilePicker2::initialize(const uno::Sequence<uno::Any>& args)
return;
}
- setTitle(getResString(saveDialog ? STR_FPICKER_SAVE : STR_FPICKER_OPEN));
-
- m_ipc.sendCommand(Commands::Initialize, saveDialog);
+ setTitle(VclResId(saveDialog ? STR_FPICKER_SAVE : STR_FPICKER_OPEN));
}
void SAL_CALL KDE5FilePicker2::cancel()
diff --git a/vcl/unx/kde5/KDE5FilePicker2.hxx b/vcl/unx/kde5/KDE5FilePicker2.hxx
index ca98191def89..0271d8900a0d 100644
--- a/vcl/unx/kde5/KDE5FilePicker2.hxx
+++ b/vcl/unx/kde5/KDE5FilePicker2.hxx
@@ -32,8 +32,6 @@
#include <rtl/ustrbuf.hxx>
-#include "gtk3_kde5_filepicker_ipc.hxx"
-
#include <functional>
typedef ::cppu::WeakComponentImplHelper<css::ui::dialogs::XFilePicker3,
@@ -49,7 +47,6 @@ protected:
css::uno::Reference<css::ui::dialogs::XFilePickerListener> m_xListener;
osl::Mutex _helperMutex;
- KDE5FilePicker2Ipc m_ipc;
public:
explicit KDE5FilePicker2(const css::uno::Reference<css::uno::XComponentContext>&);