diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2017-02-15 15:12:25 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-02-18 00:54:34 +0100 |
commit | 21c545a23f1dc33f4e18a6dc6b9d8a5d86cc6e4f (patch) | |
tree | 8cbb8e417a02324c72dc563062369c2b365e3da0 | |
parent | 2b62934862d020f3475b8fc95b8acee1572a54c5 (diff) |
gtktiledviewer: Store author name of each view
Change-Id: I9a5be9050f3bedd14b6b5602b51bf40da0a11175
(cherry picked from commit 2c622c188757143ecf2131210f34b1ca1b0c33e2)
-rw-r--r-- | libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx index 9255ff0d3d8a..e24a63a283af 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), @@ -1130,9 +1132,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(); @@ -1194,9 +1196,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); |