mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 08:10:50 +01:00
[poincare] Coding style
Change-Id: Ia3d073038503fde758c5cc67aa485a53aafe5816
This commit is contained in:
@@ -34,21 +34,21 @@ void FractionLayout::collapseSiblingsAndMoveCursor(ExpressionLayoutCursor * curs
|
||||
}
|
||||
|
||||
void FractionLayout::deleteBeforeCursor(ExpressionLayoutCursor * cursor) {
|
||||
// Case: Left of the denominator.
|
||||
// Replace the fraction with a horizontal juxtaposition of the numerator and
|
||||
// the denominator.
|
||||
/* Case: Left of the denominator.
|
||||
* Replace the fraction with a horizontal juxtaposition of the numerator and
|
||||
* the denominator. */
|
||||
if (cursor->pointedExpressionLayout() == denominatorLayout()) {
|
||||
assert(cursor->position() == ExpressionLayoutCursor::Position::Left);
|
||||
if (numeratorLayout()->isEmpty() && denominatorLayout()->isEmpty()) {
|
||||
// Case: Numerator and denominator are empty.
|
||||
// Move the cursor then replace the fraction with an empty layout.
|
||||
/* Case: Numerator and denominator are empty.
|
||||
* Move the cursor then replace the fraction with an empty layout. */
|
||||
replaceWithAndMoveCursor(new EmptyLayout(), true, cursor);
|
||||
return;
|
||||
}
|
||||
|
||||
// Else, replace the fraction with a juxtaposition of the numerator and
|
||||
// denominator. Place the cursor in the middle of the juxtaposition, which
|
||||
// is right of the numerator.
|
||||
/* Else, replace the fraction with a juxtaposition of the numerator and
|
||||
* denominator. Place the cursor in the middle of the juxtaposition, which
|
||||
* is right of the numerator. */
|
||||
|
||||
// Juxtapose.
|
||||
ExpressionLayout * numerator = numeratorLayout();
|
||||
@@ -94,8 +94,8 @@ void FractionLayout::deleteBeforeCursor(ExpressionLayoutCursor * cursor) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Case: Right.
|
||||
// Move Right of the denominator.
|
||||
/* Case: Right.
|
||||
* Move Right of the denominator. */
|
||||
if (cursor->pointedExpressionLayout() == this
|
||||
&& cursor->position() == ExpressionLayoutCursor::Position::Right)
|
||||
{
|
||||
|
||||
@@ -166,9 +166,9 @@ void HorizontalLayout::privateReplaceChild(const ExpressionLayout * oldChild, Ex
|
||||
void HorizontalLayout::addOrMergeChildAtIndex(ExpressionLayout * eL, int index, bool removeEmptyChildren) {
|
||||
if (eL->isHorizontal()) {
|
||||
mergeChildrenAtIndex(static_cast<HorizontalLayout *>(eL), index, removeEmptyChildren);
|
||||
return;
|
||||
} else {
|
||||
addChildAtIndex(eL, index);
|
||||
}
|
||||
addChildAtIndex(eL, index);
|
||||
}
|
||||
|
||||
ExpressionLayoutCursor HorizontalLayout::cursorLeftOf(ExpressionLayoutCursor cursor, bool * shouldRecomputeLayout) {
|
||||
|
||||
Reference in New Issue
Block a user