formula/source/core/resource/core_resource.src | 31 +++++++++++++++++++++++++ include/formula/compiler.hrc | 9 +++++-- include/formula/opcode.hxx | 5 ++++ sc/inc/token.hxx | 16 ++++++++---- 4 files changed, 53 insertions(+), 8 deletions(-)
New commits: commit 7867b976e8cb68a30df3cc825ccaa021269e219a Author: Eike Rathke <er...@redhat.com> Date: Wed Mar 11 21:01:54 2015 +0100 TableRef: add item specifiers and opcodes Change-Id: I043db29e3e1023566682b1df63a1d663dd432fee diff --git a/formula/source/core/resource/core_resource.src b/formula/source/core/resource/core_resource.src index 0fd104f..b6e6f7e 100644 --- a/formula/source/core/resource/core_resource.src +++ b/formula/source/core/resource/core_resource.src @@ -30,6 +30,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF String SC_OPCODE_CHOOSE { Text = "CHOOSE" ; }; String SC_OPCODE_OPEN { Text = "(" ; }; String SC_OPCODE_CLOSE { Text = ")" ; }; + // SC_OPCODE_TABLE_REF_... not supported in ODFF String SC_OPCODE_ARRAY_OPEN { Text = "{" ; }; String SC_OPCODE_ARRAY_CLOSE { Text = "}" ; }; String SC_OPCODE_ARRAY_ROW_SEP { Text = "|" ; }; @@ -441,6 +442,11 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML String SC_OPCODE_CLOSE { Text = ")" ; }; String SC_OPCODE_TABLE_REF_OPEN { Text = "[" ; }; String SC_OPCODE_TABLE_REF_CLOSE { Text = "]" ; }; + String SC_OPCODE_TABLE_REF_ITEM_ALL { Text = "#All" ; }; + String SC_OPCODE_TABLE_REF_ITEM_HEADERS { Text = "#Headers" ; }; + String SC_OPCODE_TABLE_REF_ITEM_DATA { Text = "#Data" ; }; + String SC_OPCODE_TABLE_REF_ITEM_TOTALS { Text = "#Totals" ; }; + String SC_OPCODE_TABLE_REF_ITEM_THIS_ROW { Text = "#This Row" ; }; String SC_OPCODE_ARRAY_OPEN { Text = "{" ; }; String SC_OPCODE_ARRAY_CLOSE { Text = "}" ; }; String SC_OPCODE_ARRAY_ROW_SEP { Text = ";" ; }; @@ -854,6 +860,11 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH String SC_OPCODE_CLOSE { Text = ")" ; }; String SC_OPCODE_TABLE_REF_OPEN { Text = "[" ; }; String SC_OPCODE_TABLE_REF_CLOSE { Text = "]" ; }; + String SC_OPCODE_TABLE_REF_ITEM_ALL { Text = "#All" ; }; + String SC_OPCODE_TABLE_REF_ITEM_HEADERS { Text = "#Headers" ; }; + String SC_OPCODE_TABLE_REF_ITEM_DATA { Text = "#Data" ; }; + String SC_OPCODE_TABLE_REF_ITEM_TOTALS { Text = "#Totals" ; }; + String SC_OPCODE_TABLE_REF_ITEM_THIS_ROW { Text = "#This Row" ; }; String SC_OPCODE_ARRAY_OPEN { Text = "{" ; }; String SC_OPCODE_ARRAY_CLOSE { Text = "}" ; }; String SC_OPCODE_ARRAY_ROW_SEP { Text = "|" ; }; @@ -1276,6 +1287,26 @@ Resource RID_STRLIST_FUNCTION_NAMES String SC_OPCODE_CLOSE { Text = ")" ; }; String SC_OPCODE_TABLE_REF_OPEN { Text = "[" ; }; String SC_OPCODE_TABLE_REF_CLOSE { Text = "]" ; }; + String SC_OPCODE_TABLE_REF_ITEM_ALL + { + Text [ en-US ] = "#All" ; + }; + String SC_OPCODE_TABLE_REF_ITEM_HEADERS + { + Text [ en-US ] = "#Headers" ; + }; + String SC_OPCODE_TABLE_REF_ITEM_DATA + { + Text [ en-US ] = "#Data" ; + }; + String SC_OPCODE_TABLE_REF_ITEM_TOTALS + { + Text [ en-US ] = "#Totals" ; + }; + String SC_OPCODE_TABLE_REF_ITEM_THIS_ROW + { + Text [ en-US ] = "#This Row" ; + }; String SC_OPCODE_ARRAY_OPEN { Text = "{" ; }; String SC_OPCODE_ARRAY_CLOSE { Text = "}" ; }; String SC_OPCODE_ARRAY_ROW_SEP { Text = "|" ; }; diff --git a/include/formula/compiler.hrc b/include/formula/compiler.hrc index 9131ce0..1fd4a58 100644 --- a/include/formula/compiler.hrc +++ b/include/formula/compiler.hrc @@ -53,8 +53,13 @@ #define SC_OPCODE_ARRAY_COL_SEP 27 /* some convs use sep != col_sep */ #define SC_OPCODE_TABLE_REF_OPEN 28 #define SC_OPCODE_TABLE_REF_CLOSE 29 -#define SC_OPCODE_STOP_DIV 30 -#define SC_OPCODE_SKIP 31 /* used to skip raw tokens during string compilation */ +#define SC_OPCODE_TABLE_REF_ITEM_ALL 30 +#define SC_OPCODE_TABLE_REF_ITEM_HEADERS 31 +#define SC_OPCODE_TABLE_REF_ITEM_DATA 32 +#define SC_OPCODE_TABLE_REF_ITEM_TOTALS 33 +#define SC_OPCODE_TABLE_REF_ITEM_THIS_ROW 34 +#define SC_OPCODE_STOP_DIV 35 +#define SC_OPCODE_SKIP 36 /* used to skip raw tokens during string compilation */ /*** error constants #... ***/ #define SC_OPCODE_START_ERRORS 40 diff --git a/include/formula/opcode.hxx b/include/formula/opcode.hxx index c093ab5..fa4c1bf 100644 --- a/include/formula/opcode.hxx +++ b/include/formula/opcode.hxx @@ -53,6 +53,11 @@ enum OpCode : sal_uInt16 ocStringXML = SC_OPCODE_STRINGXML, ocSpaces = SC_OPCODE_SPACES, ocMatRef = SC_OPCODE_MAT_REF, + ocTableRefItemAll = SC_OPCODE_TABLE_REF_ITEM_ALL, + ocTableRefItemHeaders = SC_OPCODE_TABLE_REF_ITEM_HEADERS, + ocTableRefItemData = SC_OPCODE_TABLE_REF_ITEM_DATA, + ocTableRefItemTotals = SC_OPCODE_TABLE_REF_ITEM_TOTALS, + ocTableRefItemThisRow = SC_OPCODE_TABLE_REF_ITEM_THIS_ROW, ocSkip = SC_OPCODE_SKIP, // Access commands ocDBArea = SC_OPCODE_DB_AREA, commit 53488caa1ea0c67c8da2bc8f887cf9c8acfbd9cf Author: Eike Rathke <er...@redhat.com> Date: Wed Mar 11 19:19:18 2015 +0100 TableRef: possible item combinations Change-Id: Id02fb58bbb9419d7c70d8265cb990ffc8ebc68ec diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx index 0d1aca1..662c17c 100644 --- a/sc/inc/token.hxx +++ b/sc/inc/token.hxx @@ -215,12 +215,16 @@ public: enum Item { - TABLE = 0, - ALL = 1, - HEADERS = 2, - DATA = 4, - TOTALS = 8, - THIS_ROW = 16 + TABLE = 0, + ALL = 1, + HEADERS = 2, + DATA = 4, + TOTALS = 8, + THIS_ROW = 16, + HEADERS_DATA = HEADERS | DATA, + DATA_TOTALS = DATA | TOTALS, + HEADERS_DATA_TOTALS = HEADERS | DATA | TOTALS, + ALL_COLUMN = HEADERS_DATA_TOTALS | 32 // semantically the same, but just a [#All] item }; ScTableRefToken( sal_uInt16 nIndex, Item eItem ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits