Commit Graph

7625 Commits

Author SHA1 Message Date
Émilie Feral
05cd2b5866 [shared] Sequence/Function: on graph zoom on center if the cursor is undefined 2018-05-16 18:51:35 +02:00
Émilie Feral
0c93a50018 [calculation] Increase the cache buffer to accept serialized layout
which would fit in calculation
2018-05-16 18:45:44 +02:00
Léa Saviot
372a214afb [poincare] Prevent insertion of a big layout in ExprLayField
For instance when copy-pasting a layout.

Change-Id: I5967a601b783b81cb537ab4b46e03118f3bd6cdc
2018-05-16 18:37:02 +02:00
Léa Saviot
c2d273bba5 [escher/poincare] ExprLayoutField cannot have more than 152 descendants
If the number of layouts could be infinite, we would have memory
problems. A Layout uses at least one char when being serialized, so we
use the same limit as the char limit in TextField.

Change-Id: Ib8f9c05d04a4dde5b6ca96a732e3e4175dd65b9c
2018-05-16 18:37:02 +02:00
Léa Saviot
f1635515a8 [poincare] Make ExpressionLayoutField::insertLayoutAtCursor private
Change-Id: I809a04a87b933ef18dd6c02d29502ccf443ffa46
2018-05-16 18:37:02 +02:00
Léa Saviot
8c275ca2b6 [poincare] Remone unused function ExpressionLayout::insertLayoutAtCursor
Change-Id: I5906146998229641976d8a4fe3fd16c56f060085
2018-05-16 18:37:02 +02:00
Léa Saviot
22b0c4c8b1 [escher] Remove duplicate function
Change-Id: I6301f10bf1598a81956909137109ed1a721d3a1a
ExpressionLayoutField::insertLayoutFromTextAtCursor
ExpressionField::handleEventWithText
2018-05-16 18:37:02 +02:00
Émilie Feral
1108ef21db [calculation] Do not memoize the expression layouts but the expressions
final height to avoid overflowing the heap. The expression layouts are
kept in the cell which are fewer then the number of calculations
2018-05-16 18:36:45 +02:00
Léa Saviot
a67f422ab7 [apps/sequence] Fix first/second term index display.
Before, it was always u0 and u1.

Change-Id: Iad5a3992a16f4b4a55e295b24f6a784a17f2807b
2018-05-16 18:36:34 +02:00
Léa Saviot
0294ebc448 [escher] Fix signed/unsigned int comparison
Change-Id: I72b6dc3f46ee585814a540fc999001e113db0ea1
2018-05-16 17:34:34 +02:00
Léa Saviot
96310c75c8 Revert "[poincare] Finer addition of parenthesis when serializing fraction"
This reverts commit a84686d262.

The reverted commit created serialization errors. For instance,
the layout 1/(2^(3) 3) , without the arenthesis, would serialize to
1/(2^3) * 3.

Change-Id: I1ec9b03e84247c9cc30cc643784283d28e6402a7
2018-05-16 17:33:02 +02:00
Léa Saviot
99f6d73e19 [apps/code] Put cursor inside parentheses when inserting function
In Code::VariableBoxController.

Change-Id: Ib129781d46159c017bcb02e97c6667b6084f5b67
2018-05-16 16:00:24 +02:00
Léa Saviot
291958a901 [apps/statistics] Fix buffer overflow in HistogramController.
Change-Id: Idf8f8701ba7b7d18b92dc7b21108387c0fa0aa3a
2018-05-16 15:58:06 +02:00
Léa Saviot
ea8bd568bf [apps/escher] Fix ExprFieldDelegateApp::exprLayoutFieldDidReceiveEvent
Fix the buffer size and check the length of the serialized expression

Change-Id: I7d53365313c0e0307db3393d46537d35ed799b3b
2018-05-16 15:56:13 +02:00
Léa Saviot
a2226eb5f8 [apps/calculation] Expression buffer max length: k_printedExpressionSize
Change-Id: I41603624f7f7a4d3213ec6ea43297b75b204ed03
2018-05-16 15:56:13 +02:00
Émilie Feral
2e0a70f269 [escher] Fix bug in text field: casting a unsigned char to signed char give negative
values above 127...
2018-05-16 15:53:04 +02:00
Émilie Feral
67185e6d26 [poincare] Avoid parsing "prediction" prints "confidence" 2018-05-16 15:51:08 +02:00
Émilie Feral
fa2ccf16d7 [tests] Add test scenari 2018-05-16 15:48:46 +02:00
Émilie Feral
bb8ab2a42e Merge branch 'saisie-jolie' into master-merge-saisie-jolie 2018-05-16 11:28:07 +02:00
Léa Saviot
40d9fc4c42 [escher] Fix signed/unsigned comparison warning
Change-Id: I3278e2e1a951475f96adae4f0c6ba6b6b52a170e
2018-05-16 11:22:47 +02:00
Émilie Feral
b94c247c6a [poincare] PrintFloat: confusion between size and length 2018-05-16 11:20:23 +02:00
Émilie Feral
dcf1e7d8a2 [escher] Fix transparent view: absolute origin can be undefined
(because superviews have not been filled yet). Rather use m_frame.
2018-05-16 10:01:38 +02:00
Émilie Feral
16bfca6a7d [shared] Make cursor view a transparent view because it has no
background
2018-05-16 10:01:24 +02:00
Émilie Feral
6ac7825144 [tests] Add scenari 2018-05-16 10:00:50 +02:00
Romain Goyet
bd36fd0fe4 [ion/blackbox] Fix compare 2018-05-15 23:41:24 +02:00
Romain Goyet
66905319f8 [ion] Add blackbox compare 2018-05-15 23:41:24 +02:00
Léa Saviot
379dcdba1a [poincarE] Add unary tests on Layouts.
Change-Id: I21f33e84eb4a60ecbabbba99a966abed6a23039c
2018-05-15 18:05:32 +02:00
Claire Savinas
33a31ab8e0 Saving Python script when home is pressed 2018-05-15 17:27:53 +02:00
Léa Saviot
278a951229 [apps/code] Add member variable initialization in GutterView
Change-Id: I82bcd810f84ae46ec4efc6a2a1c3203ae5a4877a
2018-05-15 17:25:34 +02:00
Émilie Feral
ce186b578f [apps] Fix variable box cell margin 2018-05-15 17:25:17 +02:00
Émilie Feral
33ad49789b [escher][apps] Make View using blendRectWithMask without background
inherit from TransparentView
2018-05-15 17:24:27 +02:00
Émilie Feral
6f08a77cac [escher] create TransparentView 2018-05-15 17:24:27 +02:00
Léa Saviot
16de5291bb [apps/sequence] Fix "Un" size in sequence table
Change-Id: I8f46a2f6f49da08a58d8c24252cf9fa8d09d2a0e
2018-05-15 16:29:35 +02:00
Léa Saviot
a84686d262 [poincare] Finer addition of parenthesis when serializing fraction
Change-Id: I48f4fdad8185ab97916dcfc9b6f56e786854fe2a
2018-05-15 15:35:04 +02:00
Léa Saviot
4e6b12114f [poincare] Remove DEBUG comment
Change-Id: Ia9d35816bb71ad81f6b3d03e3e3184b1697b1c67
2018-05-15 13:52:52 +02:00
Léa Saviot
c70feb9a46 [poincare] Fix SumGraphController CondensSumLayout size on second step
Change-Id: Ia9608ccf6b556183ed8def852d35a9096aeaac19
2018-05-15 11:35:11 +02:00
Émilie Feral
c6ec8310b2 [apps] Do not display exact result if equals to undef 2018-05-15 11:33:28 +02:00
Émilie Feral
1d7bd2b70a [calculation] Change method name: shouldDisplayApproximateOutput --> shouldOnlyDisplayApproximateOutput 2018-05-15 11:33:28 +02:00
Émilie Feral
7bd806f38a [poincare] Power: fix memory issue (setSign is likely to change the
expression)
2018-05-15 11:33:28 +02:00
Émilie Feral
bc47d16231 [poincare] Factorial: add Parenthesis when needed (+(1,Pi)! -> (1+pi)!) 2018-05-15 11:33:28 +02:00
Émilie Feral
f1e574d8bc [apps] Variable Box Controller: improve layouts of variables 2018-05-15 11:33:28 +02:00
Émilie Feral
b84972da6a [apps] Calculation: Memoization of the equal sign type (approximate or
equal) in the model
2018-05-15 11:33:28 +02:00
Émilie Feral
fa840754e8 [poincare] Fix tests: convert_expression_to_text 2018-05-15 11:33:28 +02:00
Émilie Feral
02c1d3206a [poincare] Decimal: we do not need to remove zero at the end of the
mantissa as they are not printed when converting to text
2018-05-15 11:33:28 +02:00
Émilie Feral
6e1c0043e0 [poincare] In Decimal::convertToText, round mantissa rather than
truncate
2018-05-15 11:33:28 +02:00
Émilie Feral
98be622218 [apps] Calculation: display the exact output even if identical to input 2018-05-15 11:33:28 +02:00
Émilie Feral
538bf216be [apps] Fix bug in variable box controller: when displaying a scalar
value, fix the buffer size which was overflowed
2018-05-15 11:33:28 +02:00
Émilie Feral
1669bee2f6 [poincare] Fix Decimal::convertToText 2018-05-15 11:33:28 +02:00
Émilie Feral
bffdb59847 [poincare] Fix Decimal constructor from double 2018-05-15 11:33:28 +02:00
Romain Goyet
7610d7b65d Add a routine to debug ARM exceptions in GDB 2018-05-15 11:33:03 +02:00