2015-12-12 13:23:44 -06:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
|
|
|
|
/*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
2020-04-18 03:39:50 -05:00
|
|
|
#pragma once
|
2015-12-13 11:47:14 -06:00
|
|
|
|
2016-01-10 21:52:00 -06:00
|
|
|
#include <mutex>
|
2017-01-02 07:21:49 -06:00
|
|
|
#include <unordered_map>
|
2017-06-27 06:44:50 -05:00
|
|
|
#include <queue>
|
2016-01-10 21:52:00 -06:00
|
|
|
|
2016-11-15 04:37:47 -06:00
|
|
|
#define LOK_USE_UNSTABLE_API
|
|
|
|
#include <LibreOfficeKit/LibreOfficeKit.hxx>
|
|
|
|
|
2016-02-26 00:25:13 -06:00
|
|
|
#include "Common.hpp"
|
2016-11-24 08:56:06 -06:00
|
|
|
#include "Kit.hpp"
|
|
|
|
#include "Session.hpp"
|
2020-11-10 18:56:59 -06:00
|
|
|
#include "Watermark.hpp"
|
2015-12-12 13:23:44 -06:00
|
|
|
|
2016-08-21 10:12:12 -05:00
|
|
|
class ChildSession;
|
|
|
|
|
2017-08-24 06:47:40 -05:00
|
|
|
enum class LokEventTargetEnum
|
|
|
|
{
|
|
|
|
Document,
|
2017-12-04 10:43:50 -06:00
|
|
|
Window
|
2017-08-24 06:47:40 -05:00
|
|
|
};
|
|
|
|
|
2018-09-12 11:05:01 -05:00
|
|
|
// An abstract interface.
|
|
|
|
class DocumentManagerInterface
|
2016-08-14 17:02:51 -05:00
|
|
|
{
|
|
|
|
public:
|
2019-05-14 07:02:12 -05:00
|
|
|
virtual ~DocumentManagerInterface() {}
|
|
|
|
|
2020-04-26 15:55:16 -05:00
|
|
|
/// Request loading a document, or a new view, if one exists.
|
2016-11-15 04:37:47 -06:00
|
|
|
virtual bool onLoad(const std::string& sessionId,
|
2019-08-26 15:22:01 -05:00
|
|
|
const std::string& uriAnonym,
|
2016-11-15 04:37:47 -06:00
|
|
|
const std::string& renderOpts,
|
2019-05-21 22:33:26 -05:00
|
|
|
const std::string& docTemplate) = 0;
|
2016-08-14 17:02:51 -05:00
|
|
|
|
|
|
|
/// Unload a client session, which unloads the document
|
|
|
|
/// if it is the last and only.
|
2016-10-29 20:15:00 -05:00
|
|
|
virtual void onUnload(const ChildSession& session) = 0;
|
2016-08-14 21:20:35 -05:00
|
|
|
|
2019-05-29 10:26:16 -05:00
|
|
|
/// Access to the Kit instance.
|
|
|
|
virtual std::shared_ptr<lok::Office> getLOKit() = 0;
|
|
|
|
|
2016-11-15 04:37:47 -06:00
|
|
|
/// Access to the document instance.
|
|
|
|
virtual std::shared_ptr<lok::Document> getLOKitDocument() = 0;
|
|
|
|
|
2018-09-17 05:31:36 -05:00
|
|
|
/// Send msg to all active sessions.
|
|
|
|
virtual bool notifyAll(const std::string& msg) = 0;
|
|
|
|
|
2017-05-28 22:59:12 -05:00
|
|
|
/// Send updated view info to all active sessions.
|
|
|
|
virtual void notifyViewInfo() = 0;
|
2017-06-27 06:44:50 -05:00
|
|
|
virtual void updateEditorSpeeds(int id, int speed) = 0;
|
|
|
|
|
2019-12-16 01:33:16 -06:00
|
|
|
virtual int getEditorId() const = 0;
|
2017-05-28 22:59:12 -05:00
|
|
|
|
2016-10-26 10:08:25 -05:00
|
|
|
/// Get a view ID <-> UserInfo map.
|
2016-10-29 20:15:00 -05:00
|
|
|
virtual std::map<int, UserInfo> getViewInfo() = 0;
|
|
|
|
virtual std::mutex& getMutex() = 0;
|
2016-11-15 04:37:47 -06:00
|
|
|
|
2018-07-17 01:01:05 -05:00
|
|
|
virtual std::string getObfuscatedFileId() = 0;
|
|
|
|
|
2016-10-29 20:15:00 -05:00
|
|
|
virtual std::shared_ptr<TileQueue>& getTileQueue() = 0;
|
|
|
|
|
2018-05-04 11:47:33 -05:00
|
|
|
virtual bool sendFrame(const char* buffer, int length, WSOpCode opCode = WSOpCode::Text) = 0;
|
2020-04-20 09:01:00 -05:00
|
|
|
|
|
|
|
virtual void alertAllUsers(const std::string& cmd, const std::string& kind) = 0;
|
2020-04-24 02:46:54 -05:00
|
|
|
|
2020-09-17 01:57:18 -05:00
|
|
|
virtual unsigned getMobileAppDocId() const = 0;
|
2016-08-14 17:02:51 -05:00
|
|
|
};
|
2016-01-24 17:25:02 -06:00
|
|
|
|
2017-01-02 07:21:49 -06:00
|
|
|
struct RecordedEvent
|
|
|
|
{
|
2018-11-12 02:03:54 -06:00
|
|
|
private:
|
|
|
|
int _type = 0;
|
2017-01-02 07:21:49 -06:00
|
|
|
std::string _payload;
|
2018-11-12 02:03:54 -06:00
|
|
|
|
|
|
|
public:
|
|
|
|
RecordedEvent()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
RecordedEvent(int type, const std::string& payload)
|
|
|
|
: _type(type),
|
|
|
|
_payload(payload)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void setType(int type)
|
|
|
|
{
|
|
|
|
_type = type;
|
|
|
|
}
|
|
|
|
|
|
|
|
int getType() const
|
|
|
|
{
|
|
|
|
return _type;
|
|
|
|
}
|
|
|
|
|
|
|
|
void setPayload(const std::string& payload)
|
|
|
|
{
|
|
|
|
_payload = payload;
|
|
|
|
}
|
|
|
|
|
|
|
|
const std::string& getPayload() const
|
|
|
|
{
|
|
|
|
return _payload;
|
|
|
|
}
|
2017-01-02 07:21:49 -06:00
|
|
|
};
|
|
|
|
|
2017-04-24 12:19:18 -05:00
|
|
|
/// When the session is inactive, we need to record its state for a replay.
|
2017-01-02 07:21:49 -06:00
|
|
|
class StateRecorder
|
|
|
|
{
|
2018-11-09 01:41:28 -06:00
|
|
|
private:
|
2017-04-24 12:19:18 -05:00
|
|
|
bool _invalidate;
|
2017-01-02 07:21:49 -06:00
|
|
|
std::unordered_map<std::string, std::string> _recordedStates;
|
|
|
|
std::unordered_map<int, std::unordered_map<int, RecordedEvent>> _recordedViewEvents;
|
|
|
|
std::unordered_map<int, RecordedEvent> _recordedEvents;
|
2017-04-25 11:17:50 -05:00
|
|
|
std::vector<RecordedEvent> _recordedEventsVector;
|
2017-01-02 07:21:49 -06:00
|
|
|
|
2018-11-09 01:41:28 -06:00
|
|
|
public:
|
2017-04-24 12:19:18 -05:00
|
|
|
StateRecorder() : _invalidate(false) {}
|
|
|
|
|
|
|
|
// TODO Remember the maximal area we need to invalidate - grow it step by step.
|
|
|
|
void recordInvalidate()
|
|
|
|
{
|
|
|
|
_invalidate = true;
|
|
|
|
}
|
|
|
|
|
2018-11-09 01:41:28 -06:00
|
|
|
bool isInvalidate() const
|
|
|
|
{
|
|
|
|
return _invalidate;
|
|
|
|
}
|
|
|
|
|
|
|
|
const std::unordered_map<std::string, std::string>& getRecordedStates() const
|
|
|
|
{
|
|
|
|
return _recordedStates;
|
|
|
|
}
|
|
|
|
|
|
|
|
const std::unordered_map<int, std::unordered_map<int, RecordedEvent>>& getRecordedViewEvents() const
|
|
|
|
{
|
|
|
|
return _recordedViewEvents;
|
|
|
|
}
|
|
|
|
|
|
|
|
const std::unordered_map<int, RecordedEvent>& getRecordedEvents() const
|
|
|
|
{
|
|
|
|
return _recordedEvents;
|
|
|
|
}
|
|
|
|
|
|
|
|
const std::vector<RecordedEvent>& getRecordedEventsVector() const
|
|
|
|
{
|
|
|
|
return _recordedEventsVector;
|
|
|
|
}
|
|
|
|
|
2017-01-02 07:21:49 -06:00
|
|
|
void recordEvent(const int type, const std::string& payload)
|
|
|
|
{
|
2018-11-12 02:03:54 -06:00
|
|
|
_recordedEvents[type] = RecordedEvent(type, payload);
|
2017-01-02 07:21:49 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
void recordViewEvent(const int viewId, const int type, const std::string& payload)
|
|
|
|
{
|
|
|
|
_recordedViewEvents[viewId][type] = {type, payload};
|
|
|
|
}
|
|
|
|
|
|
|
|
void recordState(const std::string& name, const std::string& value)
|
|
|
|
{
|
|
|
|
_recordedStates[name] = value;
|
|
|
|
}
|
|
|
|
|
2020-04-26 15:55:16 -05:00
|
|
|
/// In the case we need to remember all the events that come, not just
|
2017-04-25 11:17:50 -05:00
|
|
|
/// the final state.
|
|
|
|
void recordEventSequence(const int type, const std::string& payload)
|
|
|
|
{
|
2018-11-12 02:03:54 -06:00
|
|
|
_recordedEventsVector.emplace_back(type, payload);
|
2017-04-25 11:17:50 -05:00
|
|
|
}
|
|
|
|
|
2017-01-02 07:21:49 -06:00
|
|
|
void clear()
|
|
|
|
{
|
2017-04-24 12:19:18 -05:00
|
|
|
_invalidate = false;
|
2017-01-02 07:21:49 -06:00
|
|
|
_recordedEvents.clear();
|
|
|
|
_recordedViewEvents.clear();
|
2017-04-24 12:19:18 -05:00
|
|
|
_recordedStates.clear();
|
2017-04-25 11:17:50 -05:00
|
|
|
_recordedEventsVector.clear();
|
2017-01-02 07:21:49 -06:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-09-28 12:15:51 -05:00
|
|
|
/// Represents a session to the WSD process, in a Kit process. Note that this is not a singleton.
|
2016-12-12 18:53:58 -06:00
|
|
|
class ChildSession final : public Session
|
2015-12-12 13:23:44 -06:00
|
|
|
{
|
|
|
|
public:
|
2020-03-11 10:55:49 -05:00
|
|
|
static bool NoCapsForKit;
|
|
|
|
|
2016-05-17 06:35:07 -05:00
|
|
|
/// Create a new ChildSession
|
2016-01-06 21:47:01 -06:00
|
|
|
/// jailId The JailID of the jail root directory,
|
|
|
|
// used by downloadas to construct jailed path.
|
2020-03-06 11:43:46 -06:00
|
|
|
ChildSession(
|
|
|
|
const std::shared_ptr<ProtocolHandlerInterface> &protocol,
|
|
|
|
const std::string& id,
|
|
|
|
const std::string& jailId,
|
2020-10-22 21:24:04 -05:00
|
|
|
const std::string& jailRoot,
|
2020-03-06 11:43:46 -06:00
|
|
|
DocumentManagerInterface& docManager);
|
2016-05-17 06:35:07 -05:00
|
|
|
virtual ~ChildSession();
|
2015-12-12 13:23:44 -06:00
|
|
|
|
2016-10-29 20:15:00 -05:00
|
|
|
bool getStatus(const char* buffer, int length);
|
2016-08-29 06:52:06 -05:00
|
|
|
int getViewId() const { return _viewId; }
|
2016-09-17 16:52:54 -05:00
|
|
|
void setViewId(const int viewId) { _viewId = viewId; }
|
2018-11-13 02:04:19 -06:00
|
|
|
const std::string& getViewUserId() const { return getUserId(); }
|
|
|
|
const std::string& getViewUserName() const { return getUserName(); }
|
|
|
|
const std::string& getViewUserExtraInfo() const { return getUserExtraInfo(); }
|
2017-06-27 06:44:50 -05:00
|
|
|
void updateSpeed();
|
|
|
|
int getSpeed();
|
2016-01-03 09:56:41 -06:00
|
|
|
|
2017-01-13 06:52:08 -06:00
|
|
|
void loKitCallback(const int type, const std::string& payload);
|
2016-01-24 17:25:02 -06:00
|
|
|
|
2020-11-10 18:56:59 -06:00
|
|
|
/// Initializes the watermark support, if enabled and required.
|
|
|
|
/// Returns true if watermark is enabled and initialized.
|
|
|
|
bool initWatermark()
|
|
|
|
{
|
|
|
|
if (hasWatermark())
|
|
|
|
{
|
|
|
|
_docWatermark.reset(
|
|
|
|
new Watermark(getLOKitDocument(), getWatermarkText(), getWatermarkOpacity()));
|
|
|
|
}
|
|
|
|
|
|
|
|
return _docWatermark != nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
const std::shared_ptr<Watermark>& watermark() const { return _docWatermark; };
|
2019-10-15 07:35:35 -05:00
|
|
|
|
2017-11-24 14:29:48 -06:00
|
|
|
bool sendTextFrame(const char* buffer, int length) override
|
2016-10-09 10:28:22 -05:00
|
|
|
{
|
2020-03-06 11:43:46 -06:00
|
|
|
if (!_docManager)
|
|
|
|
{
|
|
|
|
LOG_TRC("ERR dropping - client-" + getId() + ' ' + std::string(buffer, length));
|
|
|
|
return false;
|
|
|
|
}
|
2016-10-09 10:28:22 -05:00
|
|
|
const auto msg = "client-" + getId() + ' ' + std::string(buffer, length);
|
2019-08-16 02:05:54 -05:00
|
|
|
return _docManager->sendFrame(msg.data(), msg.size(), WSOpCode::Text);
|
2017-11-24 14:29:48 -06:00
|
|
|
}
|
2016-10-09 10:28:22 -05:00
|
|
|
|
2017-11-24 14:29:48 -06:00
|
|
|
bool sendBinaryFrame(const char* buffer, int length) override
|
|
|
|
{
|
2020-03-06 11:43:46 -06:00
|
|
|
if (!_docManager)
|
|
|
|
{
|
|
|
|
LOG_TRC("ERR dropping binary - client-" + getId());
|
|
|
|
return false;
|
|
|
|
}
|
2017-11-24 14:29:48 -06:00
|
|
|
const auto msg = "client-" + getId() + ' ' + std::string(buffer, length);
|
2019-08-16 02:05:54 -05:00
|
|
|
return _docManager->sendFrame(msg.data(), msg.size(), WSOpCode::Binary);
|
2016-10-09 10:28:22 -05:00
|
|
|
}
|
|
|
|
|
2016-12-12 19:18:25 -06:00
|
|
|
using Session::sendTextFrame;
|
2016-10-09 10:28:22 -05:00
|
|
|
|
2020-02-28 03:50:58 -06:00
|
|
|
bool getClipboard(const char* buffer, int length, const StringVector& tokens);
|
2019-07-04 04:50:33 -05:00
|
|
|
|
2019-08-16 02:05:54 -05:00
|
|
|
void resetDocManager()
|
|
|
|
{
|
android: Fix crash on the 2nd editing start.
The failing scenario was reproducible on my old phone:
* start editing the document from the shell
* add a word
* leave the editing using the '<' in the top left
* start editing the document again => boom!
In the normali, non-crashing case, the order of destruction is that
~ChildSession is called first (and calls ChildSession::disconnect() that
consequently calls Document::onUnload() via _docManager->onUnLoad(...).
The Document::onUnload() then deregisters callbacks and all is fine.
The in the above described crashing case, the Document is destroyed
before ChildSession and calls resetDocManager() for all sessions.
Before this patch, this meant that the _docManager was set to nullptr,
leading to situation that later, in the ~ChildSession, the call of
onUnload() was avoided, the callbacks were not unregistered, and later,
on the next document load, the app crashed because it called stale
callbacks.
I suspect the change might be useful even for the non-mobile case, but
not 100% sure, so rather do it MOBILEAPP-only.
Change-Id: I279a160ccaab3080e84fe0437ed72684331b6e13
Reviewed-on: https://gerrit.libreoffice.org/84588
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-12-05 15:09:22 -06:00
|
|
|
disconnect();
|
2019-08-16 02:05:54 -05:00
|
|
|
_docManager = nullptr;
|
|
|
|
}
|
|
|
|
|
2016-08-13 11:14:44 -05:00
|
|
|
private:
|
2020-02-28 03:50:58 -06:00
|
|
|
bool loadDocument(const char* buffer, int length, const StringVector& tokens);
|
2015-12-12 13:23:44 -06:00
|
|
|
|
2020-02-28 03:50:58 -06:00
|
|
|
bool sendFontRendering(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool getCommandValues(const char* buffer, int length, const StringVector& tokens);
|
2015-12-12 13:23:44 -06:00
|
|
|
|
2020-02-28 03:50:58 -06:00
|
|
|
bool clientZoom(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool clientVisibleArea(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool outlineState(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool downloadAs(const char* buffer, int length, const StringVector& tokens);
|
2015-12-12 13:23:44 -06:00
|
|
|
bool getChildId();
|
2020-02-28 03:50:58 -06:00
|
|
|
bool getTextSelection(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool setClipboard(const char* buffer, int length, const StringVector& tokens);
|
2018-02-25 13:18:04 -06:00
|
|
|
std::string getTextSelectionInternal(const std::string& mimeType);
|
2020-02-28 03:50:58 -06:00
|
|
|
bool paste(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool insertFile(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool keyEvent(const char* buffer, int length, const StringVector& tokens, const LokEventTargetEnum target);
|
|
|
|
bool extTextInputEvent(const char* /*buffer*/, int /*length*/, const StringVector& tokens);
|
2017-08-24 06:47:40 -05:00
|
|
|
bool dialogKeyEvent(const char* buffer, int length, const std::vector<std::string>& tokens);
|
2020-02-28 03:50:58 -06:00
|
|
|
bool mouseEvent(const char* buffer, int length, const StringVector& tokens, const LokEventTargetEnum target);
|
|
|
|
bool gestureEvent(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool dialogEvent(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool completeFunction(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool unoCommand(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool selectText(const char* buffer, int length, const StringVector& tokens, const LokEventTargetEnum target);
|
|
|
|
bool selectGraphic(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool renderWindow(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool resizeWindow(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool resetSelection(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool saveAs(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool setClientPart(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool selectClientPart(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool moveSelectedClientParts(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool setPage(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool sendWindowCommand(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool signDocumentContent(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool askSignatureStatus(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool uploadSignedDocument(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool exportSignAndUploadDocument(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool renderShapeSelection(const char* buffer, int length, const StringVector& tokens);
|
|
|
|
bool removeTextContext(const char* /*buffer*/, int /*length*/, const StringVector& tokens);
|
2015-12-12 13:23:44 -06:00
|
|
|
|
2017-01-13 06:52:08 -06:00
|
|
|
void rememberEventsForInactiveUser(const int type, const std::string& payload);
|
2020-05-06 06:59:03 -05:00
|
|
|
bool formFieldEvent(const char* buffer, int length, const StringVector& tokens);
|
2017-01-02 07:21:49 -06:00
|
|
|
|
2016-08-13 11:14:44 -05:00
|
|
|
virtual void disconnect() override;
|
2016-10-29 20:15:00 -05:00
|
|
|
virtual bool _handleInput(const char* buffer, int length) override;
|
2015-12-25 12:51:32 -06:00
|
|
|
|
2020-11-10 18:56:59 -06:00
|
|
|
std::shared_ptr<lok::Document> getLOKitDocument() const
|
2016-11-15 04:37:47 -06:00
|
|
|
{
|
2019-08-16 02:05:54 -05:00
|
|
|
return _docManager->getLOKitDocument();
|
2016-11-15 04:37:47 -06:00
|
|
|
}
|
|
|
|
|
2020-12-28 09:30:38 -06:00
|
|
|
std::shared_ptr<lok::Office> getLOKit() const
|
|
|
|
{
|
|
|
|
return _docManager->getLOKit();
|
|
|
|
}
|
|
|
|
|
2020-11-10 18:56:59 -06:00
|
|
|
std::string getLOKitLastError() const
|
2019-05-29 10:26:16 -05:00
|
|
|
{
|
2019-08-16 02:05:54 -05:00
|
|
|
char *lastErr = _docManager->getLOKit()->getError();
|
2019-05-29 10:26:16 -05:00
|
|
|
std::string ret;
|
|
|
|
if (lastErr)
|
|
|
|
{
|
|
|
|
ret = std::string(lastErr, strlen(lastErr));
|
|
|
|
free (lastErr);
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2020-07-14 09:20:05 -05:00
|
|
|
public:
|
|
|
|
void dumpState(std::ostream& oss) override
|
|
|
|
{
|
|
|
|
Session::dumpState(oss);
|
|
|
|
// TODO: the rest ...
|
|
|
|
}
|
|
|
|
|
2015-12-25 12:51:32 -06:00
|
|
|
private:
|
2016-01-08 18:58:50 -06:00
|
|
|
const std::string _jailId;
|
2020-10-22 21:24:04 -05:00
|
|
|
const std::string _jailRoot;
|
2019-08-16 02:05:54 -05:00
|
|
|
DocumentManagerInterface* _docManager;
|
2016-08-21 11:56:58 -05:00
|
|
|
|
2020-11-10 18:56:59 -06:00
|
|
|
std::shared_ptr<Watermark> _docWatermark;
|
|
|
|
|
2017-06-27 06:44:50 -05:00
|
|
|
std::queue<std::chrono::steady_clock::time_point> _cursorInvalidatedEvent;
|
|
|
|
const unsigned _eventStorageIntervalMs = 15*1000;
|
|
|
|
|
2016-01-03 09:56:41 -06:00
|
|
|
/// View ID, returned by createView() or 0 by default.
|
|
|
|
int _viewId;
|
2016-08-21 11:56:58 -05:00
|
|
|
|
2020-04-26 15:55:16 -05:00
|
|
|
/// Whether document has been opened successfully
|
2016-08-21 11:56:58 -05:00
|
|
|
bool _isDocLoaded;
|
|
|
|
|
|
|
|
std::string _docType;
|
2017-01-02 07:21:49 -06:00
|
|
|
|
|
|
|
StateRecorder _stateRecorder;
|
2016-01-10 21:52:00 -06:00
|
|
|
|
2018-02-25 13:18:04 -06:00
|
|
|
/// If we are copying to clipboard.
|
|
|
|
bool _copyToClipboard;
|
2015-12-12 13:23:44 -06:00
|
|
|
};
|
|
|
|
|
2015-12-13 11:47:14 -06:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|