Kaydet (Commit) 2c622c18 authored tarafından Pranav Kant's avatar Pranav Kant

gtktiledviewer: Store author name of each view

Change-Id: I9a5be9050f3bedd14b6b5602b51bf40da0a11175
üst 4d800a54
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment