summaryrefslogtreecommitdiff
path: root/desktop/inc/lib
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-01-22 13:39:32 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-01-29 13:29:54 +0000
commit2241a7fd97b8b70d2d3106ac531cc72192ad708f (patch)
tree4cb96b50ab72165882952b6fa59710a630620a73 /desktop/inc/lib
parent2cbd9dffe76068c71c9de3f6525ce68d949085c3 (diff)
libreofficekit: password interaction optional and off by default
Add setOptionalFeatures() function that clients must call during initialization, and enum LibreOfficeKitOptionalFeatures. Reviewed-on: https://gerrit.libreoffice.org/21809 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 23a0ee3c01c3588472e1c19605909d6b9401253c) libreofficekit: ask for password when loading encrypted documents (cherry picked from commit 2b63e576a5cf06f4af877d63403ad7955ac71b72) desktop: use x prefix for uno::Reference (cherry picked from commit 0101cd3da6262169fa273309a86ba5e7cfe573bf) loplugin:defaultparams (cherry picked from commit 95c8b8e85d3328bfbe906ef3f69145842aae01db) Change-Id: I73035193c87033052921c3aad94fdc057fe81111 Reviewed-on: https://gerrit.libreoffice.org/21838 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'desktop/inc/lib')
-rw-r--r--desktop/inc/lib/init.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx
index 9003859e5eba..d07729731b39 100644
--- a/desktop/inc/lib/init.hxx
+++ b/desktop/inc/lib/init.hxx
@@ -11,12 +11,16 @@
#define INCLUDED_DESKTOP_INC_LIB_INIT_HXX
#include <LibreOfficeKit/LibreOfficeKit.h>
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <memory>
+#include <map>
#include "../../source/inc/desktopdllapi.h"
#include <osl/thread.h>
+class LOKInteractionHandler;
+
namespace desktop {
struct DESKTOP_DLLPUBLIC LibLODocument_Impl : public _LibreOfficeKitDocument
{
@@ -36,8 +40,16 @@ namespace desktop {
oslThread maThread;
LibreOfficeKitCallback mpCallback;
void *mpCallbackData;
+ int64_t mOptionalFeatures;
+ std::map<OString, rtl::Reference<LOKInteractionHandler>> mInteractionMap;
LibLibreOffice_Impl();
+ ~LibLibreOffice_Impl();
+
+ bool hasOptionalFeature(LibreOfficeKitOptionalFeatures const feature)
+ {
+ return (mOptionalFeatures & feature) != 0;
+ }
};
}