summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammed Abdul Azeem <azeemmysore@gmail.com>2017-10-21 16:24:50 +0530
committerMichael Meeks <michael.meeks@collabora.com>2017-10-23 10:38:55 +0200
commit931c84e697dc69745d1c07c40f810638f9f71eda (patch)
treef91a8994c72141caadaf96b1c94d839ed3ec41c9
parent61e7fbf4f63232f26f96290bf08b7fffae94c486 (diff)
tdf#110431: Fixed losing listbos entries on opening .ods file
For some reason, XML_TOKEN_INVALID was taking wrong value in windows, causing to fail imports with unknown entries. I've also added some of the tokens I found from several test files to the list. Change-Id: Idd2e7db165b9b4b5a2d8c7a837786fde252fe938 Reviewed-on: https://gerrit.libreoffice.org/43677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--include/xmloff/xmltoken.hxx9
-rw-r--r--xmloff/source/core/fasttokenhandler.cxx2
-rw-r--r--xmloff/source/core/xmltoken.cxx9
-rw-r--r--xmloff/source/token/tokens.txt9
4 files changed, 28 insertions, 1 deletions
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index e1c0c4d58aac..175187ae6897 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -267,6 +267,7 @@ namespace xmloff { namespace token {
XML_AUTHOR_INITIALS,
XML_AUTHOR_NAME,
XML_AUTO,
+ XML_AUTO_COMPLETE,
XML_AUTO_GROW_HEIGHT,
XML_AUTO_GROW_WIDTH,
XML_AUTO_RELOAD,
@@ -349,6 +350,7 @@ namespace xmloff { namespace token {
XML_BOTTOM_VALUES,
XML_BOTTOMARC,
XML_BOTTOMCIRCLE,
+ XML_BOUND_COLUMN,
XML_BREAK_AFTER,
XML_BREAK_BEFORE,
XML_BREAK_INSIDE,
@@ -606,6 +608,7 @@ namespace xmloff { namespace token {
XML_DEFAULT_STYLE_NAME,
XML_DEGREE,
XML_DELAY,
+ XML_DELAY_FOR_REPEAT,
XML_DELETE_COLUMNS,
XML_DELETE_ROWS,
XML_DELETION,
@@ -669,6 +672,7 @@ namespace xmloff { namespace token {
XML_DRAWING,
XML_DRAWINGS,
XML_DRAWPOOL,
+ XML_DROPDOWN,
XML_DROP_CAP,
XML_DYNAMIC,
XML_EDGE_ROUNDING,
@@ -1136,6 +1140,7 @@ namespace xmloff { namespace token {
XML_LINENUMBERING_SEPARATOR,
XML_LINES,
XML_LINES_USED,
+ XML_LINKED_CELL,
XML_LINK_TO_SOURCE_DATA,
XML_LIST,
XML_LIST_BLOCK,
@@ -1146,6 +1151,7 @@ namespace xmloff { namespace token {
XML_LIST_LEVEL_STYLE_BULLET,
XML_LIST_LEVEL_STYLE_IMAGE,
XML_LIST_LEVEL_STYLE_NUMBER,
+ XML_LIST_LINKAGE_TYPE,
XML_LIST_NAME,
XML_LIST_STYLE,
XML_LIST_STYLE_NAME,
@@ -1355,6 +1361,7 @@ namespace xmloff { namespace token {
XML_OPERATION,
XML_OPERATOR,
XML_OPTIMAL,
+ XML_OPTION,
XML_OR,
XML_ORDER,
XML_ORDERED_LIST,
@@ -1752,6 +1759,7 @@ namespace xmloff { namespace token {
XML_STDEV,
XML_STDEVP,
XML_STEPS,
+ XML_STEP_SIZE,
XML_STOCK,
XML_STOCK_UPDOWN_BARS,
XML_STOCK_WITH_VOLUME,
@@ -1831,6 +1839,7 @@ namespace xmloff { namespace token {
XML_TAN,
XML_TANH,
XML_TARGET_CELL_ADDRESS,
+ XML_TARGET_FRAME,
XML_TARGET_FRAME_NAME,
XML_TARGET_RANGE_ADDRESS,
XML_TB_RL,
diff --git a/xmloff/source/core/fasttokenhandler.cxx b/xmloff/source/core/fasttokenhandler.cxx
index b5fa379c9de7..e7eeb0803717 100644
--- a/xmloff/source/core/fasttokenhandler.cxx
+++ b/xmloff/source/core/fasttokenhandler.cxx
@@ -60,7 +60,7 @@ TokenMap::~TokenMap()
sal_Int32 TokenMap::getTokenPerfectHash( const char *pStr, sal_Int32 nLength )
{
const struct xmltoken *pToken = Perfect_Hash::in_word_set( pStr, nLength );
- return pToken ? pToken->nToken : XML_TOKEN_INVALID;
+ return pToken ? pToken->nToken : xmloff::XML_TOKEN_INVALID;
}
FastTokenHandler::FastTokenHandler() :
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 521e304cf3e1..3d33a489493a 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -267,6 +267,7 @@ namespace xmloff { namespace token {
TOKEN( "author-initials", XML_AUTHOR_INITIALS ),
TOKEN( "author-name", XML_AUTHOR_NAME ),
TOKEN( "auto", XML_AUTO ),
+ TOKEN( "auto-complete", XML_AUTO_COMPLETE ),
TOKEN( "auto-grow-height", XML_AUTO_GROW_HEIGHT ),
TOKEN( "auto-grow-width", XML_AUTO_GROW_WIDTH ),
TOKEN( "auto-reload", XML_AUTO_RELOAD ),
@@ -349,6 +350,7 @@ namespace xmloff { namespace token {
TOKEN( "bottom values", XML_BOTTOM_VALUES ),
TOKEN( "bottom-arc", XML_BOTTOMARC ),
TOKEN( "bottom-circle", XML_BOTTOMCIRCLE ),
+ TOKEN( "bound-column", XML_BOUND_COLUMN ),
TOKEN( "break-after", XML_BREAK_AFTER ),
TOKEN( "break-before", XML_BREAK_BEFORE ),
TOKEN( "break-inside", XML_BREAK_INSIDE ),
@@ -606,6 +608,7 @@ namespace xmloff { namespace token {
TOKEN( "default-style-name", XML_DEFAULT_STYLE_NAME ),
TOKEN( "degree", XML_DEGREE ),
TOKEN( "delay", XML_DELAY ),
+ TOKEN( "delay-for-repeat", XML_DELAY_FOR_REPEAT ),
TOKEN( "delete-columns", XML_DELETE_COLUMNS ),
TOKEN( "delete-rows", XML_DELETE_ROWS ),
TOKEN( "deletion", XML_DELETION ),
@@ -669,6 +672,7 @@ namespace xmloff { namespace token {
TOKEN( "drawing", XML_DRAWING ),
TOKEN( "drawings", XML_DRAWINGS ),
TOKEN( "drawpool", XML_DRAWPOOL ),
+ TOKEN( "dropdown", XML_DROPDOWN ),
TOKEN( "drop-cap", XML_DROP_CAP ),
TOKEN( "dynamic", XML_DYNAMIC ),
TOKEN( "edge-rounding", XML_EDGE_ROUNDING ),
@@ -1137,6 +1141,7 @@ namespace xmloff { namespace token {
TOKEN( "linenumbering-separator", XML_LINENUMBERING_SEPARATOR ),
TOKEN( "lines", XML_LINES ),
TOKEN( "lines-used", XML_LINES_USED ),
+ TOKEN( "linked-cell", XML_LINKED_CELL ),
TOKEN( "link-to-source-data", XML_LINK_TO_SOURCE_DATA ),
TOKEN( "list", XML_LIST ),
TOKEN( "list-block", XML_LIST_BLOCK ),
@@ -1147,6 +1152,7 @@ namespace xmloff { namespace token {
TOKEN( "list-level-style-bullet", XML_LIST_LEVEL_STYLE_BULLET ),
TOKEN( "list-level-style-image", XML_LIST_LEVEL_STYLE_IMAGE ),
TOKEN( "list-level-style-number", XML_LIST_LEVEL_STYLE_NUMBER ),
+ TOKEN( "list-linkage-type", XML_LIST_LINKAGE_TYPE ),
TOKEN( "list-name", XML_LIST_NAME ),
TOKEN( "list-style", XML_LIST_STYLE ),
TOKEN( "list-style-name", XML_LIST_STYLE_NAME ),
@@ -1356,6 +1362,7 @@ namespace xmloff { namespace token {
TOKEN( "operation", XML_OPERATION ),
TOKEN( "operator", XML_OPERATOR ),
TOKEN( "optimal", XML_OPTIMAL ),
+ TOKEN( "option", XML_OPTION ),
TOKEN( "or", XML_OR ),
TOKEN( "order", XML_ORDER ),
TOKEN( "ordered-list", XML_ORDERED_LIST ),
@@ -1753,6 +1760,7 @@ namespace xmloff { namespace token {
TOKEN( "stdev", XML_STDEV ),
TOKEN( "stdevp", XML_STDEVP ),
TOKEN( "steps", XML_STEPS ),
+ TOKEN( "step-size", XML_STEP_SIZE ),
TOKEN( "stock", XML_STOCK ),
TOKEN( "stock-updown-bars", XML_STOCK_UPDOWN_BARS ),
TOKEN( "stock-with-volume", XML_STOCK_WITH_VOLUME ),
@@ -1832,6 +1840,7 @@ namespace xmloff { namespace token {
TOKEN( "tan", XML_TAN ),
TOKEN( "tanh", XML_TANH ),
TOKEN( "target-cell-address", XML_TARGET_CELL_ADDRESS ),
+ TOKEN( "target-frame", XML_TARGET_FRAME ),
TOKEN( "target-frame-name", XML_TARGET_FRAME_NAME ),
TOKEN( "target-range-address", XML_TARGET_RANGE_ADDRESS ),
TOKEN( "tb-rl", XML_TB_RL ),
diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt
index fc54aaf1b65b..4e58356c7c07 100644
--- a/xmloff/source/token/tokens.txt
+++ b/xmloff/source/token/tokens.txt
@@ -190,6 +190,7 @@ author
author-initials
author-name
auto
+auto-complete
auto-grow-height
auto-grow-width
auto-reload
@@ -272,6 +273,7 @@ bottom-right
BOTTOM_VALUES_DUMMY
bottom-arc
bottom-circle
+bound-column
break-after
break-before
break-inside
@@ -529,6 +531,7 @@ default-style
default-style-name
degree
delay
+delay-for-repeat
delete-columns
delete-rows
deletion
@@ -592,6 +595,7 @@ ole-draw-aspect
drawing
drawings
drawpool
+dropdown
drop-cap
dynamic
edge-rounding
@@ -1055,6 +1059,7 @@ linenumbering-configuration
linenumbering-separator
lines
lines-used
+linked-cell
link-to-source-data
list
list-block
@@ -1065,6 +1070,7 @@ list-level
list-level-style-bullet
list-level-style-image
list-level-style-number
+list-linkage-type
list-name
list-style
list-style-name
@@ -1274,6 +1280,7 @@ open-vertical
operation
operator
optimal
+option
or
order
ordered-list
@@ -1671,6 +1678,7 @@ stay-on-top
stdev
stdevp
steps
+step-size
stock
stock-updown-bars
stock-with-volume
@@ -1750,6 +1758,7 @@ tables
tan
tanh
target-cell-address
+target-frame
target-frame-name
target-range-address
tb-rl