[poincare] Layout::serialize is serializeForParsing or ParsedExpression

serializeForParsing serializes the layout once,
serializeParsedExpression serializes the layout, parses it and
serializes it again.
This commit is contained in:
Léa Saviot
2018-11-21 14:49:20 +01:00
committed by Émilie Feral
parent 2bdce9dd82
commit 94603b2b7d
11 changed files with 55 additions and 17 deletions

View File

@@ -25,7 +25,7 @@ bool ExpressionFieldDelegateApp::layoutFieldDidReceiveEvent(LayoutField * layout
}
char buffer[TextField::maxBufferSize()];
int bufferSize = TextField::maxBufferSize();
int length = layoutField->serialize(buffer, bufferSize);
int length = layoutField->layout().serializeForParsing(buffer, bufferSize);
if (length >= bufferSize-1) {
/* If the buffer is totally full, it is VERY likely that writeTextInBuffer
* escaped before printing utterly the expression. */