Move _canonicalViewId out of Session
Signed-off-by: Paris Oplopoios <paris.oplopoios@collabora.com> Change-Id: I9c06440ed47eb217e973d2f530f2c3646d55d85b
This commit is contained in:
parent
5dba72a341
commit
d26c425dae
3 changed files with 19 additions and 12 deletions
|
@ -246,15 +246,6 @@ public:
|
|||
|
||||
const std::string& getJailedFilePathAnonym() const { return _jailedFilePathAnonym; }
|
||||
|
||||
int getCanonicalViewId() { return _canonicalViewId; }
|
||||
// Only called by kit.
|
||||
void setCanonicalViewId(int viewId) { _canonicalViewId = viewId; }
|
||||
// Only called by wsd.
|
||||
template<class T> void createCanonicalViewId(SessionMap<T> &map)
|
||||
{
|
||||
_canonicalViewId = map.createCanonicalId(_watermarkText);
|
||||
}
|
||||
|
||||
const std::string& getDeviceFormFactor() const { return _deviceFormFactor; }
|
||||
|
||||
const std::string& getSpellOnline() const { return _spellOnline; }
|
||||
|
@ -367,9 +358,6 @@ private:
|
|||
/// Timezone of the user.
|
||||
std::string _timezone;
|
||||
|
||||
/// the canonical id unique to the set of rendering properties of this session
|
||||
int _canonicalViewId;
|
||||
|
||||
/// The form factor of the device where the client is running: desktop, tablet, mobile.
|
||||
std::string _deviceFormFactor;
|
||||
|
||||
|
|
|
@ -262,6 +262,11 @@ public:
|
|||
_docManager = nullptr;
|
||||
}
|
||||
|
||||
// Only called by kit.
|
||||
void setCanonicalViewId(int viewId) { _canonicalViewId = viewId; }
|
||||
|
||||
int getCanonicalViewId() { return _canonicalViewId; }
|
||||
|
||||
private:
|
||||
bool loadDocument(const StringVector& tokens);
|
||||
|
||||
|
@ -379,6 +384,9 @@ private:
|
|||
|
||||
/// stores wopi url for export as operation
|
||||
std::string _exportAsWopiUrl;
|
||||
|
||||
/// the canonical id unique to the set of rendering properties of this session
|
||||
int _canonicalViewId;
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -254,6 +254,15 @@ public:
|
|||
/// Process an SVG to replace embedded file:/// media URIs with public http URLs.
|
||||
std::string processSVGContent(const std::string& svg);
|
||||
|
||||
int getCanonicalViewId() { return _canonicalViewId; }
|
||||
|
||||
// Only called by wsd.
|
||||
template<class T>
|
||||
void createCanonicalViewId(SessionMap<T> &map)
|
||||
{
|
||||
_canonicalViewId = map.createCanonicalId(getWatermarkText());
|
||||
}
|
||||
|
||||
private:
|
||||
std::shared_ptr<ClientSession> client_from_this()
|
||||
{
|
||||
|
@ -406,6 +415,8 @@ private:
|
|||
// Saves time from setting/fetching user info multiple times using zotero API
|
||||
bool _isZoteroUserInfoSet = false;
|
||||
|
||||
/// the canonical id unique to the set of rendering properties of this session
|
||||
int _canonicalViewId;
|
||||
};
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
Loading…
Reference in a new issue