LibreOffice Module desktop (master) 1
|
InteractionHandler is an interface that provides the user with various dialogs / error messages. More...
#include <lokinteractionhandler.hxx>
Public Member Functions | |
void | SetPassword (char const *pPassword) |
LOKInteractionHandler (OString command, desktop::LibLibreOffice_Impl *, desktop::LibLODocument_Impl *pLOKDocumt=nullptr) | |
virtual | ~LOKInteractionHandler () override |
virtual OUString SAL_CALL | getImplementationName () override |
virtual sal_Bool SAL_CALL | supportsService (OUString const &rServiceName) override |
virtual com::sun::star::uno::Sequence< OUString > SAL_CALL | getSupportedServiceNames () override |
virtual void SAL_CALL | initialize (com::sun::star::uno::Sequence< com::sun::star::uno::Any > const &rArguments) override |
virtual void SAL_CALL | handle (com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest > const &rRequest) override |
virtual sal_Bool SAL_CALL | handleInteractionRequest (const ::com::sun::star::uno::Reference<::com::sun::star::task::XInteractionRequest > &Request) override |
Private Member Functions | |
LOKInteractionHandler (const LOKInteractionHandler &)=delete | |
LOKInteractionHandler & | operator= (const LOKInteractionHandler &)=delete |
void | postError (css::task::InteractionClassification classif, const char *kind, ErrCode code, const OUString &message) |
Call the LOK_CALLBACK_ERROR on the LOK document (if available) or LOK lib. More... | |
bool | handleIOException (const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > &rContinuations, const css::uno::Any &rRequest) |
bool | handleNetworkException (const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > &rContinuations, const css::uno::Any &rRequest) |
bool | handlePasswordRequest (const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > &rContinuations, const css::uno::Any &rRequest) |
Static Private Member Functions | |
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) |
Private Attributes | |
desktop::LibLibreOffice_Impl * | m_pLOKit |
desktop::LibLODocument_Impl * | m_pLOKDocument |
OString | m_command |
Command for which we use this interaction handler (like "load", "save", "saveas", ...) More... | |
OUString | m_Password |
bool | m_usePassword |
osl::Condition | m_havePassword |
InteractionHandler is an interface that provides the user with various dialogs / error messages.
We need an own implementation for the LibreOfficeKit so that we can route the information easily via callbacks.
TODO: the callbacks are not implemented yet, we just approve any interaction that we get.
Definition at line 44 of file lokinteractionhandler.hxx.
|
privatedelete |
|
explicit |
Definition at line 55 of file lokinteractionhandler.cxx.
References m_pLOKit.
|
overridevirtual |
Definition at line 67 of file lokinteractionhandler.cxx.
|
overridevirtual |
Definition at line 71 of file lokinteractionhandler.cxx.
|
overridevirtual |
Definition at line 81 of file lokinteractionhandler.cxx.
|
overridevirtual |
Definition at line 94 of file lokinteractionhandler.cxx.
References handleInteractionRequest().
|
staticprivate |
Definition at line 353 of file lokinteractionhandler.cxx.
Referenced by handleInteractionRequest().
|
overridevirtual |
Definition at line 371 of file lokinteractionhandler.cxx.
References handleFilterOptionsRequest(), handleIOException(), handleMacroConfirmationRequest(), handleNetworkException(), and handlePasswordRequest().
Referenced by handle().
|
private |
Definition at line 143 of file lokinteractionhandler.cxx.
References ERRCODE_IO_ABORT, ERRCODE_IO_ACCESSDENIED, ERRCODE_IO_ALREADYEXISTS, ERRCODE_IO_BADCRC, ERRCODE_IO_CANTCREATE, ERRCODE_IO_CANTREAD, ERRCODE_IO_CANTSEEK, ERRCODE_IO_CANTTELL, ERRCODE_IO_CANTWRITE, ERRCODE_IO_CURRENTDIR, ERRCODE_IO_DEVICENOTREADY, ERRCODE_IO_GENERAL, ERRCODE_IO_INVALIDACCESS, ERRCODE_IO_INVALIDCHAR, ERRCODE_IO_INVALIDDEVICE, ERRCODE_IO_INVALIDLENGTH, ERRCODE_IO_INVALIDPARAMETER, ERRCODE_IO_ISWILDCARD, ERRCODE_IO_LOCKVIOLATION, ERRCODE_IO_MISPLACEDCHAR, ERRCODE_IO_NAMETOOLONG, ERRCODE_IO_NOTADIRECTORY, ERRCODE_IO_NOTAFILE, ERRCODE_IO_NOTEXISTS, ERRCODE_IO_NOTEXISTSPATH, ERRCODE_IO_NOTSAMEDEVICE, ERRCODE_IO_NOTSUPPORTED, ERRCODE_IO_OUTOFMEMORY, ERRCODE_IO_OUTOFSPACE, ERRCODE_IO_PENDING, ERRCODE_IO_RECURSIVE, ERRCODE_IO_TOOMANYOPENFILES, ERRCODE_IO_UNKNOWN, ERRCODE_IO_WRITEPROTECTED, ERRCODE_IO_WRONGFORMAT, ERRCODE_IO_WRONGVERSION, and postError().
Referenced by handleInteractionRequest().
|
staticprivate |
Definition at line 336 of file lokinteractionhandler.cxx.
References comphelper::getProcessComponentContext().
Referenced by handleInteractionRequest().
|
private |
Definition at line 195 of file lokinteractionhandler.cxx.
References ERRCODE_INET_CONNECT, ERRCODE_INET_GENERAL, ERRCODE_INET_NAME_RESOLVE, ERRCODE_INET_OFFLINE, ERRCODE_INET_READ, ERRCODE_INET_WRITE, and postError().
Referenced by handleInteractionRequest().
|
private |
Definition at line 244 of file lokinteractionhandler.cxx.
References desktop::LibLibreOffice_Impl::hasOptionalFeature(), m_havePassword, m_Password, m_pLOKit, m_usePassword, desktop::LibLibreOffice_Impl::mpCallback, and desktop::LibLibreOffice_Impl::mpCallbackData.
Referenced by handleInteractionRequest().
|
overridevirtual |
Definition at line 90 of file lokinteractionhandler.cxx.
|
privatedelete |
|
private |
Call the LOK_CALLBACK_ERROR on the LOK document (if available) or LOK lib.
The error itself is a JSON message, like: { "classification": "error" | "warning" | "info" "kind": "network" etc. "code": 403 | 404 | ... "message": freeform description }
Definition at line 101 of file lokinteractionhandler.cxx.
References code, SfxViewShell::Current(), tools::JsonWriter::finishAndGetAsOString(), SfxLokHelper::getView(), m_command, m_pLOKDocument, m_pLOKit, desktop::LibLibreOffice_Impl::mpCallback, desktop::LibLibreOffice_Impl::mpCallbackData, desktop::LibLODocument_Impl::mpCallbackFlushHandlers, and tools::JsonWriter::put().
Referenced by handleIOException(), and handleNetworkException().
void LOKInteractionHandler::SetPassword | ( | char const * | pPassword | ) |
Definition at line 398 of file lokinteractionhandler.cxx.
References m_havePassword, m_Password, and m_usePassword.
|
overridevirtual |
Definition at line 76 of file lokinteractionhandler.cxx.
References cppu::supportsService().
|
private |
Command for which we use this interaction handler (like "load", "save", "saveas", ...)
Definition at line 53 of file lokinteractionhandler.hxx.
Referenced by postError().
|
private |
Definition at line 57 of file lokinteractionhandler.hxx.
Referenced by handlePasswordRequest(), and SetPassword().
|
private |
Definition at line 55 of file lokinteractionhandler.hxx.
Referenced by handlePasswordRequest(), and SetPassword().
|
private |
Definition at line 50 of file lokinteractionhandler.hxx.
Referenced by postError().
|
private |
Definition at line 49 of file lokinteractionhandler.hxx.
Referenced by handlePasswordRequest(), LOKInteractionHandler(), and postError().
|
private |
Definition at line 56 of file lokinteractionhandler.hxx.
Referenced by handlePasswordRequest(), and SetPassword().