summaryrefslogtreecommitdiff
path: root/libreofficekit
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-02-15 15:12:25 +0530
committerPranav Kant <pranavk@collabora.co.uk>2017-02-16 10:09:29 +0530
commit2c622c188757143ecf2131210f34b1ca1b0c33e2 (patch)
treee83cb8f71c07fe170ab97e76c1a4daa0731cdf15 /libreofficekit
parent4d800a54bfa94421712c7dccc5437f50b8bfab9c (diff)
gtktiledviewer: Store author name of each view
Change-Id: I9a5be9050f3bedd14b6b5602b51bf40da0a11175
Diffstat (limited to 'libreofficekit')
-rw-r--r--libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 1bdb2560a172..e7df903d4edb 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -165,6 +165,8 @@ public:
std::shared_ptr<CommentsSidebar> m_pCommentsSidebar;
/// Rendering arguments, which are the same for all views.
boost::property_tree::ptree m_aRenderingArguments;
+ /// Author of this window
+ std::string m_aAuthor;
TiledWindow()
: m_pDocView(nullptr),
@@ -1131,9 +1133,9 @@ static void createView(GtkWidget* pButton, gpointer /*pItem*/)
TiledWindow& rWindow = lcl_getTiledWindow(pButton);
boost::property_tree::ptree aTree = rWindow.m_aRenderingArguments;
- std::string aAuthor = getNextAuthor();
+ rWindow.m_aAuthor = getNextAuthor();
aTree.put(boost::property_tree::ptree::path_type(".uno:Author/type", '/'), "string");
- aTree.put(boost::property_tree::ptree::path_type(".uno:Author/value", '/'), aAuthor);
+ aTree.put(boost::property_tree::ptree::path_type(".uno:Author/value", '/'), rWindow.m_aAuthor);
std::stringstream aStream;
boost::property_tree::write_json(aStream, aTree);
std::string aArguments = aStream.str();
@@ -1195,9 +1197,9 @@ static void createModelAndView(const char* pLOPath, const char* pDocPath, const
// Save rendering arguments for views which are created later.
rWindow.m_aRenderingArguments = aTree;
-
+ rWindow.m_aAuthor = getNextAuthor();
aTree.put(boost::property_tree::ptree::path_type(".uno:Author/type", '/'), "string");
- aTree.put(boost::property_tree::ptree::path_type(".uno:Author/value", '/'), getNextAuthor());
+ aTree.put(boost::property_tree::ptree::path_type(".uno:Author/value", '/'), rWindow.m_aAuthor);
std::stringstream aStream;
boost::property_tree::write_json(aStream, aTree);