Kaydet (Commit) fbc3965d authored tarafından Andrzej Hunt's avatar Andrzej Hunt

lok: send list of commands instead of ClearStyles

We currently send just one command, but this could be expanded
server side in future.

Change-Id: Id8f14196158f3a7fe9c54595d094603efd5e2ce3
üst f9dfd012
...@@ -192,7 +192,7 @@ void DesktopLOKTest::testGetStyles() ...@@ -192,7 +192,7 @@ void DesktopLOKTest::testGetStyles()
rPair.first != "NumberingStyles" && rPair.first != "NumberingStyles" &&
rPair.first != "CellStyles" && rPair.first != "CellStyles" &&
rPair.first != "ShapeStyles" && rPair.first != "ShapeStyles" &&
rPair.first != "ClearStyle") rPair.first != "Commands")
{ {
CPPUNIT_FAIL("Unknown style family: " + rPair.first); CPPUNIT_FAIL("Unknown style family: " + rPair.first);
} }
......
...@@ -1301,10 +1301,27 @@ static char* getStyles(LibreOfficeKitDocument* pThis, const char* pCommand) ...@@ -1301,10 +1301,27 @@ static char* getStyles(LibreOfficeKitDocument* pThis, const char* pCommand)
aValues.add_child(sStyleFam.toUtf8().getStr(), aChildren); aValues.add_child(sStyleFam.toUtf8().getStr(), aChildren);
} }
boost::property_tree::ptree aChildClearFormat; {
OUString sClearFormat = SVX_RESSTR( RID_SVXSTR_CLEARFORM ); boost::property_tree::ptree aCommandList;
aChildClearFormat.put("", sClearFormat.toUtf8());
aValues.add_child("ClearStyle", aChildClearFormat); {
boost::property_tree::ptree aChild;
OUString sClearFormat = SVX_RESSTR( RID_SVXSTR_CLEARFORM );
boost::property_tree::ptree aName;
aName.put("", sClearFormat.toUtf8());
aChild.push_back(std::make_pair("text", aName));
boost::property_tree::ptree aCommand;
aCommand.put("", ".uno:ResetAttributes");
aChild.push_back(std::make_pair("id", aCommand));
aCommandList.push_back(std::make_pair("", aChild));
}
aValues.add_child("Commands", aCommandList);
}
aTree.add_child("commandValues", aValues); aTree.add_child("commandValues", aValues);
std::stringstream aStream; std::stringstream aStream;
......
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