desktop/source/lib/lokinteractionhandler.cxx | 22 ++++++++++++++++++++++ desktop/source/lib/lokinteractionhandler.hxx | 2 ++ sc/source/ui/dbgui/scuiasciiopt.cxx | 7 +++++++ sc/source/ui/inc/scuiasciiopt.hxx | 2 ++ sfx2/source/doc/objstor.cxx | 3 ++- 5 files changed, 35 insertions(+), 1 deletion(-)
New commits: commit 20c48df295e0108d907b503a5adf3c24d4242a24 Author: merttumer <[email protected]> AuthorDate: Mon Apr 26 08:12:11 2021 +0300 Commit: Mert Tumer <[email protected]> CommitDate: Mon May 31 05:51:51 2021 +0200 lok: Interaction handler for FilterOptions This will enable Text Import Dialog to be executed before the document is loaded Change-Id: I263e69f0739f4971f4c4eec032ebf22ffbdeebb7 Signed-off-by: merttumer <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114638 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116304 diff --git a/desktop/source/lib/lokinteractionhandler.cxx b/desktop/source/lib/lokinteractionhandler.cxx index eb7d120a5e3e..e4ce45ce672d 100644 --- a/desktop/source/lib/lokinteractionhandler.cxx +++ b/desktop/source/lib/lokinteractionhandler.cxx @@ -40,6 +40,8 @@ #include <com/sun/star/task/DocumentPasswordRequest2.hpp> #include <com/sun/star/task/DocumentMSPasswordRequest2.hpp> +#include <com/sun/star/document/FilterOptionsRequest.hpp> + #include "../../inc/lib/init.hxx" #include <LibreOfficeKit/LibreOfficeKitEnums.h> @@ -341,6 +343,23 @@ bool LOKInteractionHandler::handleMacroConfirmationRequest(const uno::Reference< if (request >>= aConfirmRequest) { auto xInteraction(task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(), nullptr)); + if (xInteraction.is()) + xInteraction->handleInteractionRequest(xRequest); + + return true; + } + return false; +} + +bool LOKInteractionHandler::handleFilterOptionsRequest(const uno::Reference<task::XInteractionRequest>& xRequest) +{ + document::FilterOptionsRequest aFilterOptionsRequest; + uno::Any const request(xRequest->getRequest()); + if (request >>= aFilterOptionsRequest) + { + uno::Reference< task::XInteractionHandler2 > xInteraction( + task::InteractionHandler::createWithParent( + ::comphelper::getProcessComponentContext(), nullptr)); if (xInteraction.is()) xInteraction->handleInteractionRequest(xRequest); @@ -365,6 +384,9 @@ sal_Bool SAL_CALL LOKInteractionHandler::handleInteractionRequest( if (handlePasswordRequest(rContinuations, request)) return true; + if (handleFilterOptionsRequest(xRequest)) + return true; + if (handleMacroConfirmationRequest(xRequest)) return true; diff --git a/desktop/source/lib/lokinteractionhandler.hxx b/desktop/source/lib/lokinteractionhandler.hxx index 9c15f85f4bc8..108343ec22e3 100644 --- a/desktop/source/lib/lokinteractionhandler.hxx +++ b/desktop/source/lib/lokinteractionhandler.hxx @@ -76,6 +76,8 @@ private: bool handlePasswordRequest(const css::uno::Sequence<css::uno::Reference<css::task::XInteractionContinuation>> &rContinuations, const css::uno::Any& rRequest); static bool handleMacroConfirmationRequest(const css::uno::Reference<css::task::XInteractionRequest>& xRequest); + static bool handleFilterOptionsRequest(const ::com::sun::star::uno::Reference<::com::sun::star::task::XInteractionRequest>& Request); + public: void SetPassword(char const* pPassword); diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 29ca6d9a0fed..fd85ce09aabb 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -853,7 +853,8 @@ ErrCode SfxObjectShell::HandleFilter( SfxMedium* pMedium, SfxObjectShell const * SfxItemSet* pSet = pMedium->GetItemSet(); const SfxStringItem* pOptions = SfxItemSet::GetItem<SfxStringItem>(pSet, SID_FILE_FILTEROPTIONS, false); const SfxUnoAnyItem* pData = SfxItemSet::GetItem<SfxUnoAnyItem>(pSet, SID_FILTER_DATA, false); - if ( !pData && !pOptions ) + const bool bTiledRendering = comphelper::LibreOfficeKit::isActive(); + if ( !pData && (bTiledRendering || !pOptions) ) { css::uno::Reference< XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory(); css::uno::Reference< XNameAccess > xFilterCFG; commit 4cb1998f2a0715aa512dbc7c7902cad16bb4fe16 Author: merttumer <[email protected]> AuthorDate: Mon Apr 26 06:52:34 2021 +0300 Commit: Mert Tumer <[email protected]> CommitDate: Mon May 31 05:51:39 2021 +0200 lok: add global notifier to the "Text Import Dialog" This dialog is displayed before the document is loaded so no way to get access to the view shell notifier when model/view/controller are not created yet. Change-Id: Ic9259b0b1d72b2c4f29b7265742136e650c7b67b Signed-off-by: merttumer <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114637 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116303 diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index be524ab15437..564b167fe58e 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -36,6 +36,7 @@ #include <com/sun/star/uno/Sequence.hxx> #include <miscuno.hxx> #include <osl/diagnose.h> +#include <vcl/svapp.hxx> #include <unicode/uclean.h> #include <unicode/ucsdet.h> @@ -528,6 +529,12 @@ ScImportAsciiDlg::ScImportAsciiDlg(weld::Window* pParent, const OUString& aDatNa mxCkbSkipEmptyCells->set_active(false); mxCkbSkipEmptyCells->hide(); } + m_xDialog->SetInstallLOKNotifierHdl(LINK(this, ScImportAsciiDlg, InstallLOKNotifierHdl)); +} + +IMPL_STATIC_LINK_NOARG(ScImportAsciiDlg, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*) +{ + return GetpApp(); } ScImportAsciiDlg::~ScImportAsciiDlg() diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx index d327d81947bf..65718323f1ed 100644 --- a/sc/source/ui/inc/scuiasciiopt.hxx +++ b/sc/source/ui/inc/scuiasciiopt.hxx @@ -115,6 +115,8 @@ private: DECL_LINK( LbColTypeHdl, weld::ComboBox&, void ); DECL_LINK( UpdateTextHdl, ScCsvTableBox&, void ); DECL_LINK( ColTypeHdl, ScCsvTableBox&, void ); + DECL_STATIC_LINK(ScImportAsciiDlg, InstallLOKNotifierHdl, void*, vcl::ILibreOfficeKitNotifier*); + }; inline bool ScImportAsciiDlg::Seek(sal_uLong nPos) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
