summaryrefslogtreecommitdiff
path: root/offapi/com
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2021-07-28 17:31:56 +0200
committerEike Rathke <erack@redhat.com>2021-07-28 18:56:29 +0200
commit516318113f0bd2b3c658aba9b285165e63a280e2 (patch)
tree3e33e570b0d62b36afa95045999d115fe005d126 /offapi/com
parent24b06b9c6bdb777dff385b0fbfc81d55d3d013a1 (diff)
Resolves: tdf#76310 Preserve whitespace TAB, CR, LF in formula expressions
Allowed whitespace in ODFF and OOXML are U+0020 SPACE U+0009 CHARACTER TABULATION U+000A LINE FEED U+000D CARRIAGE RETURN Line feed and carriage return look a bit funny in the Function Wizard if part of a function's argument but work. Once a formula is edited, CR are converted to LF though, probably already in EditEngine, didn't investigate. Change-Id: I6278f6be48872e0710a3d74212db391dda249ed2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119635 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'offapi/com')
-rw-r--r--offapi/com/sun/star/sheet/FormulaMapGroupSpecialOffset.idl24
1 files changed, 20 insertions, 4 deletions
diff --git a/offapi/com/sun/star/sheet/FormulaMapGroupSpecialOffset.idl b/offapi/com/sun/star/sheet/FormulaMapGroupSpecialOffset.idl
index 89c21dca4328..4cb2699e9af6 100644
--- a/offapi/com/sun/star/sheet/FormulaMapGroupSpecialOffset.idl
+++ b/offapi/com/sun/star/sheet/FormulaMapGroupSpecialOffset.idl
@@ -140,10 +140,6 @@ constants FormulaMapGroupSpecialOffset
<p>The FormulaToken::Data member shall contain a
positive integer value of type `long` specifying the number
of space characters.</p>
-
- <p>Attention: This may change in next versions to support other
- characters than simple space characters (e.g. line feeds, horizontal
- tabulators, non-breakable spaces).</p>
*/
const long SPACES = 8;
@@ -176,6 +172,26 @@ constants FormulaMapGroupSpecialOffset
const long COL_ROW_NAME = 12;
+ /** Formula tokens containing the op-code obtained from this offset
+ describe whitespace characters within the string representation of a
+ formula.
+
+ <p>Whitespace characters in formulas are used for readability and do
+ not affect the result of the formula.</p>
+
+ <p>The FormulaToken::Data member shall contain a
+ `string` of one (repeated) whitespace character. The length of
+ the string determines the number of repetitions.</p>
+
+ <p>Allowed whitespace characters are SPACE (U+0020), CHARACTER
+ TABULATION (U+0009), LINE FEED (U+000A), and CARRIAGE RETURN
+ (U+000D). See also ODF v1.3 OpenFormula 5.14 Whitespace.</p>
+
+ @since LibreOffice 7.3
+ */
+ const long WHITESPACE = 13;
+
+
};