diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-11-10 19:20:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-11 06:33:53 +0100 |
commit | 3de38e95561ab7ca114d9f3307702ba89c4e3e9a (patch) | |
tree | 5d4c84a81e68897f325f67bc92b326ae48805f9a /include | |
parent | cc1e6ee2dd4609c27cb7a09aa47a779592a3e22c (diff) |
use fastparser in forms
Change-Id: I7d09d64857e24267b4b4baddb563e28ceea92f2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105560
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/sax/fastattribs.hxx | 4 | ||||
-rw-r--r-- | include/xmloff/formlayerimport.hxx | 8 | ||||
-rw-r--r-- | include/xmloff/xformsimport.hxx | 2 | ||||
-rw-r--r-- | include/xmloff/xmltoken.hxx | 23 |
4 files changed, 34 insertions, 3 deletions
diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx index 8b8138d82e9b..a9bb67e62841 100644 --- a/include/sax/fastattribs.hxx +++ b/include/sax/fastattribs.hxx @@ -73,6 +73,7 @@ class SAX_DLLPUBLIC FastAttributeList final : public cppu::WeakImplHelper< css:: { public: FastAttributeList( FastTokenHandlerBase *pTokenHandler ); + FastAttributeList( const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList ); virtual ~FastAttributeList() override; void clear(); @@ -81,6 +82,8 @@ public: maAttributeValues.reserve(nNumTokens+1); maAttributeTokens.reserve(nNumTokens); } + void add( const FastAttributeList& ); + void add( const css::uno::Reference<css::xml::sax::XFastAttributeList>& ); void add( sal_Int32 nToken, const char* pValue ); void add( sal_Int32 nToken, const char* pValue, size_t nValueLength ); void add( sal_Int32 nToken, const OString& rValue ); @@ -91,6 +94,7 @@ public: const std::vector< sal_Int32 >& getFastAttributeTokens() const { return maAttributeTokens; } const char* getFastAttributeValue(size_t nIndex) const { return mpChunk + maAttributeValues[nIndex]; } sal_Int32 AttributeValueLength(size_t i) const { return maAttributeValues[i + 1] - maAttributeValues[i] - 1; } + size_t size() const { return maAttributeValues.size(); } // performance sensitive shortcuts to avoid allocation ... bool getAsInteger( sal_Int32 nToken, sal_Int32 &rInt) const; diff --git a/include/xmloff/formlayerimport.hxx b/include/xmloff/formlayerimport.hxx index 4834f85d19d9..d9797f0757ec 100644 --- a/include/xmloff/formlayerimport.hxx +++ b/include/xmloff/formlayerimport.hxx @@ -29,6 +29,7 @@ namespace com::sun::star::beans { class XPropertySet; } namespace com::sun::star::drawing { class XDrawPage; } namespace com::sun::star::xml::sax { class XAttributeList; } +namespace com::sun::star::xml::sax { class XFastAttributeList; } class SvXMLImport; class SvXMLImportContext; @@ -68,6 +69,8 @@ namespace xmloff SvXMLImport& _rImport, sal_uInt16 _nPrefix, const OUString& _rLocalName); + static SvXMLImportContext* createOfficeFormsContext( + SvXMLImport& _rImport); /** create an SvXMLImportContext instance which is able to import the <form:form> element. @@ -78,9 +81,8 @@ namespace xmloff @see endPage */ SvXMLImportContext* createContext( - const sal_uInt16 _nPrefix, - const OUString& _rLocalName, - const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttribs); + const sal_Int32 _nElement, + const css::uno::Reference< css::xml::sax::XFastAttributeList >& _rxAttribs); /** lookup a control given by id. diff --git a/include/xmloff/xformsimport.hxx b/include/xmloff/xformsimport.hxx index b580af57608b..b6b86044ce1b 100644 --- a/include/xmloff/xformsimport.hxx +++ b/include/xmloff/xformsimport.hxx @@ -39,6 +39,8 @@ XMLOFF_DLLPUBLIC SvXMLImportContext* createXFormsModelContext( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName ); +XMLOFF_DLLPUBLIC SvXMLImportContext* createXFormsModelContext( + SvXMLImport& rImport ); /** perform the actual binding of an XForms-binding with the suitable control * @param document which contains the XForms-model(s) diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx index 6b2fed011a39..e0f3ef898c65 100644 --- a/include/xmloff/xmltoken.hxx +++ b/include/xmloff/xmltoken.hxx @@ -217,6 +217,9 @@ namespace xmloff::token { XML_ALIGN, XML_ALL, XML_ALLOW_EMPTY_CELL, + XML_ALLOW_DELETES, + XML_ALLOW_INSERTS, + XML_ALLOW_UPDATES, XML_ALPHABETICAL_INDEX, XML_ALPHABETICAL_INDEX_AUTO_MARK_FILE, XML_ALPHABETICAL_INDEX_ENTRY_TEMPLATE, @@ -365,6 +368,7 @@ namespace xmloff::token { XML_BUTTON3, XML_BUTTON4, XML_BUTTONS, + XML_BUTTON_TYPE, XML_BVAR, XML_C, XML_CALCULATION_SETTINGS, @@ -488,6 +492,7 @@ namespace xmloff::token { XML_CONTROL, XML_CONVERSION_MODE, XML_CONVERSION_TYPE, + XML_CONVERT_EMPTY_TO_NULL, XML_COPY_BACK, XML_COPY_FORMULAS, XML_COPY_OUTLINE_LEVELS, @@ -612,6 +617,7 @@ namespace xmloff::token { XML_DECORATIVE, XML_DEEP, XML_DEFAULT, + XML_DEFAULT_BUTTON, XML_DEFAULT_CELL_STYLE_NAME, XML_DEFAULT_STYLE, XML_DEFAULT_STYLE_NAME, @@ -684,6 +690,7 @@ namespace xmloff::token { XML_DROPDOWN, XML_DROP_CAP, XML_DYNAMIC, + XML_ECHO_CHAR, XML_EDGE_ROUNDING, XML_EDITABLE, XML_EDITING_CYCLES, @@ -702,6 +709,7 @@ namespace xmloff::token { XML_ENABLE_NUMBERING, XML_ENABLED, XML_ENCODING, + XML_ENCTYPE, XML_END, XML_END_ANGLE, XML_END_CELL_ADDRESS, @@ -809,6 +817,7 @@ namespace xmloff::token { XML_FLOOR, XML_FN, XML_FOCAL_LENGTH, + XML_FOCUS_ON_CLICK, XML_FONT_CHAR_WIDTH, XML_FONT_CHARSET, XML_FONT_CHARSET_ASIAN, @@ -880,6 +889,7 @@ namespace xmloff::token { XML_FOOTNOTE_SEP, XML_FOOTNOTES_CONFIGURATION, XML_FOOTNOTES_POSITION, + XML_FOR, XML_FORALL, XML_FORCE_MANUAL, XML_FOREGROUND, @@ -1021,6 +1031,7 @@ namespace xmloff::token { XML_IDEOGRAPH_ALPHA, XML_IGNORE_CASE, XML_IGNORE_EMPTY_ROWS, + XML_IGNORE_RESULT, XML_IGNORE_SELECTED_PAGE, // used for ODF compatibility XML_ILLUSTRATION_INDEX, XML_ILLUSTRATION_INDEX_ENTRY_TEMPLATE, @@ -1055,6 +1066,7 @@ namespace xmloff::token { XML_INFORMATION, XML_INITIAL_CREATOR, XML_INPROCEEDINGS, + XML_INPUT_REQUIRED, XML_INSERT_COLUMNS, XML_INSERT_ROWS, XML_INSERTION, @@ -1078,6 +1090,7 @@ namespace xmloff::token { XML_IS_SELECTION, XML_ISBN, XML_ITALIC, + XML_ITEM, XML_ITERATION, XML_JOURNAL, XML_JUSTIFIED, @@ -1302,6 +1315,8 @@ namespace xmloff::token { XML_MTEXT, XML_MTR, XML_MULTI_DELETION_SPANNED, + XML_MULTI_LINE, + XML_MULTIPLE, XML_MUNDER, XML_MUNDEROVER, XML_NAME, @@ -1309,6 +1324,7 @@ namespace xmloff::token { XML_NAMED_EXPRESSION, XML_NAMED_EXPRESSIONS, XML_NAMED_RANGE, + XML_NAVIGATION_MODE, XML_NAVY, XML_NEGATIVE_COLOR, XML_NEQ, @@ -1416,6 +1432,7 @@ namespace xmloff::token { XML_PAGE_NUMBER, XML_PAGE_NUMBER_VISIBLE, XML_PAGE_START_MARGIN, + XML_PAGE_STEP_SIZE, XML_PAGE_STYLE_NAME, XML_PAGE_THUMBNAIL, XML_PAGE_USAGE, @@ -1769,6 +1786,7 @@ namespace xmloff::token { XML_START_TABLE, XML_START_VALUE, XML_START_WITH_NAVIGATOR, + XML_STATE, XML_STATISTICS, XML_STATUS, XML_STAY_ON_TOP, @@ -1823,6 +1841,8 @@ namespace xmloff::token { XML_SYMBOL_WIDTH, XML_SYSTEM, XML_TAB_COLOR, + XML_TAB_CYCLE, + XML_TAB_INDEX, XML_TAB_STOP, XML_TAB_STOP_DISTANCE, XML_TAB_STOPS, @@ -1930,6 +1950,7 @@ namespace xmloff::token { XML_TOC_MARK, XML_TOC_MARK_END, XML_TOC_MARK_START, + XML_TOGGLE, XML_TOP, XML_TOP_LEFT, XML_TOP_PERCENT, @@ -2012,6 +2033,7 @@ namespace xmloff::token { XML_USER_INDEX_SOURCE, XML_USER_TRANSFORMED, XML_USERNAME, + XML_VALIDATION, XML_VALUE, XML_VALUE_TYPE, XML_VALUES_CELL_RANGE_ADDRESS, @@ -2051,6 +2073,7 @@ namespace xmloff::token { XML_VISIBLE_AREA_TOP, XML_VISIBLE_AREA_WIDTH, XML_VISITED_STYLE_NAME, + XML_VISUAL_EFFECT, XML_VOLATILE, XML_VOLUME, XML_VPN, |