From a2318dcff64e67b32e80ba3561ab25fb2f10cfab Mon Sep 17 00:00:00 2001 From: Katarina Behrens Date: Mon, 4 Jun 2018 15:39:40 +0200 Subject: Basic structures of KDE5 native filepicker build now Change-Id: I174a4a01f2191d935ea069a0e04b5c88f4bf8193 --- vcl/unx/kde5/KDE5FilePicker.cxx | 4 +-- vcl/unx/kde5/KDE5FilePicker2.cxx | 70 +++++++--------------------------------- vcl/unx/kde5/KDE5FilePicker2.hxx | 3 -- 3 files changed, 13 insertions(+), 64 deletions(-) (limited to 'vcl/unx') 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 #include @@ -241,6 +241,6 @@ bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e) return QObject::eventFilter(o, e); } -#include +#include /* 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 #include @@ -88,33 +88,19 @@ void SAL_CALL KDE5FilePicker2::removeFilePickerListener(const uno::Reference SAL_CALL KDE5FilePicker2::getFiles() uno::Sequence SAL_CALL KDE5FilePicker2::getSelectedFiles() { - auto id = m_ipc.sendCommand(Commands::GetSelectedFiles); uno::Sequence 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()) - { - m_ipc.sendCommand(Commands::SetValue, controlId, nControlAction, value.get()); - } - 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& 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 -#include "gtk3_kde5_filepicker_ipc.hxx" - #include typedef ::cppu::WeakComponentImplHelper m_xListener; osl::Mutex _helperMutex; - KDE5FilePicker2Ipc m_ipc; public: explicit KDE5FilePicker2(const css::uno::Reference&); -- cgit