loolwsd: only cache font/style command values

This fixes a bug where row/column headers were cached too
This commit is contained in:
Mihai Varga 2015-12-14 14:38:05 +02:00
parent 30f1f85e08
commit 803c89a43f

View file

@ -277,7 +277,12 @@ bool MasterProcessSession::handleInput(const char *buffer, int length)
Var result = parser.parse(stringJSON);
Object::Ptr object = result.extract<Object::Ptr>();
std::string commandName = object->get("commandName").toString();
peer->_tileCache->saveTextFile(std::string(buffer, length), "cmdValues" + commandName + ".txt");
if (commandName.find(".uno:CharFontName") != std::string::npos ||
commandName.find(".uno:StyleApply") != std::string::npos)
{
// other commands should not be cached
peer->_tileCache->saveTextFile(std::string(buffer, length), "cmdValues" + commandName + ".txt");
}
}
else if (tokens[0] == "partpagerectangles:")
{