diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-29 11:19:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-07 08:52:49 +0100 |
commit | 5080bb930de3ecfce8ab78bbd23a9d48c2f2bfa0 (patch) | |
tree | 9f92d184627177dbd83dedda40d4a4abb531381e /xmloff/source/text/txtvfldi.cxx | |
parent | 121464be43830a6f6bfbc27a17c8e0bc7577f455 (diff) |
convert SvXMLImport to fastparser, drop slowparser paths
Change-Id: I0f880a7680373043fecf083cdf4de8b0bb7041a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103775
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/text/txtvfldi.cxx')
-rw-r--r-- | xmloff/source/text/txtvfldi.cxx | 71 |
1 files changed, 25 insertions, 46 deletions
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx index abcbb51622fe..246ba52db6a8 100644 --- a/xmloff/source/text/txtvfldi.cxx +++ b/xmloff/source/text/txtvfldi.cxx @@ -80,14 +80,13 @@ using namespace ::xmloff::token; XMLVarFieldImportContext::XMLVarFieldImportContext( SvXMLImport& rImport, XMLTextImportHelper& rHlp, - const char* pServiceName, sal_uInt16 nPrfx, - const OUString& rLocalName, + const char* pServiceName, bool bFormula, bool bFormulaDefault, bool bDescription, bool bHelp, bool bHint, bool bVisible, bool bIsDisplayFormula, bool bType, bool bStyle, bool bValue, bool bPresentation) : - XMLTextFieldImportContext(rImport, rHlp, pServiceName, nPrfx, rLocalName), + XMLTextFieldImportContext(rImport, rHlp, pServiceName), aValueHelper(rImport, rHlp, bType, bStyle, bValue, false), bDisplayFormula(false), bDisplayNone(false), @@ -112,7 +111,7 @@ void XMLVarFieldImportContext::ProcessAttribute( const OUString& sAttrValue ) { switch (nAttrToken) - { + { case XML_ELEMENT(TEXT, XML_NAME): sName = sAttrValue; bValid = true; // we assume: field with name is valid! @@ -169,7 +168,7 @@ void XMLVarFieldImportContext::ProcessAttribute( // delegate all others to value helper aValueHelper.ProcessAttribute(nAttrToken, sAttrValue); break; - } + } } void XMLVarFieldImportContext::PrepareField( @@ -247,13 +246,11 @@ void XMLVarFieldImportContext::PrepareField( XMLSetVarFieldImportContext::XMLSetVarFieldImportContext( SvXMLImport& rImport, XMLTextImportHelper& rHlp, - const char* pServiceName, sal_uInt16 nPrfx, - const OUString& rLocalName, VarType eVarType, + const char* pServiceName, VarType eVarType, bool bFormula, bool bFormulaDefault, bool bDescription, bool bHelp, bool bHint, bool bVisible, bool bIsDisplayFormula, bool bType, bool bStyle, bool bValue, bool bPresentation) : XMLVarFieldImportContext(rImport, rHlp, pServiceName, - nPrfx, rLocalName, bFormula, bFormulaDefault, bDescription, bHelp, bHint, bVisible, bIsDisplayFormula, bType, bStyle, bValue, bPresentation), @@ -330,10 +327,9 @@ bool XMLSetVarFieldImportContext::FindFieldMaster( XMLSequenceFieldImportContext::XMLSequenceFieldImportContext( - SvXMLImport& rImport, XMLTextImportHelper& rHlp, - sal_uInt16 nPrfx, const OUString& rLocalName) : + SvXMLImport& rImport, XMLTextImportHelper& rHlp) : XMLSetVarFieldImportContext(rImport, rHlp, sAPI_set_expression, - nPrfx, rLocalName, VarTypeSequence, + VarTypeSequence, // formula true, true, false, false, false, false, @@ -395,10 +391,9 @@ void XMLSequenceFieldImportContext::PrepareField( XMLVariableSetFieldImportContext::XMLVariableSetFieldImportContext( - SvXMLImport& rImport, XMLTextImportHelper& rHlp, - sal_uInt16 nPrfx, const OUString& rLocalName) : + SvXMLImport& rImport, XMLTextImportHelper& rHlp) : XMLSetVarFieldImportContext(rImport, rHlp, sAPI_set_expression, - nPrfx, rLocalName, VarTypeSimple, + VarTypeSimple, // formula, value&type, style, // display none true, true, @@ -426,10 +421,9 @@ void XMLVariableSetFieldImportContext::PrepareField( XMLVariableInputFieldImportContext::XMLVariableInputFieldImportContext( - SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx, - const OUString& rLocalName) : + SvXMLImport& rImport, XMLTextImportHelper& rHlp) : XMLSetVarFieldImportContext(rImport, rHlp, sAPI_set_expression, - nPrfx, rLocalName, VarTypeSimple, + VarTypeSimple, // description, display none/formula, // value&type, style, formula true, true, @@ -460,10 +454,9 @@ void XMLVariableInputFieldImportContext::PrepareField( XMLUserFieldImportContext::XMLUserFieldImportContext( - SvXMLImport& rImport, XMLTextImportHelper& rHlp, - sal_uInt16 nPrfx, const OUString& rLocalName) : - XMLSetVarFieldImportContext(rImport, rHlp, sAPI_user, nPrfx, - rLocalName, VarTypeUserField, + SvXMLImport& rImport, XMLTextImportHelper& rHlp) : + XMLSetVarFieldImportContext(rImport, rHlp, sAPI_user, + VarTypeUserField, // display none/formula, style false, false, false, false, false, true, @@ -479,10 +472,8 @@ XMLUserFieldImportContext::XMLUserFieldImportContext( // bug: doesn't work (SO API lacking) XMLUserFieldInputImportContext::XMLUserFieldInputImportContext( - SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx, - const OUString& rLocalName) : + SvXMLImport& rImport, XMLTextImportHelper& rHlp) : XMLVarFieldImportContext(rImport, rHlp, "InputUser", - nPrfx, rLocalName, // description, style false, false, true, false, false, @@ -506,10 +497,8 @@ void XMLUserFieldInputImportContext::PrepareField( XMLVariableGetFieldImportContext::XMLVariableGetFieldImportContext( - SvXMLImport& rImport, XMLTextImportHelper& rHlp, - sal_uInt16 nPrfx, const OUString& rLocalName) : + SvXMLImport& rImport, XMLTextImportHelper& rHlp) : XMLVarFieldImportContext(rImport, rHlp, sAPI_get_expression, - nPrfx, rLocalName, // style, display formula false, false, false, false, false, @@ -534,10 +523,8 @@ void XMLVariableGetFieldImportContext::PrepareField( XMLExpressionFieldImportContext::XMLExpressionFieldImportContext( - SvXMLImport& rImport, XMLTextImportHelper& rHlp, - sal_uInt16 nPrfx, const OUString& rLocalName) : + SvXMLImport& rImport, XMLTextImportHelper& rHlp) : XMLVarFieldImportContext(rImport, rHlp, sAPI_get_expression, - nPrfx, rLocalName, // formula, type, style, display formula true, true, false, false, false, @@ -563,10 +550,8 @@ void XMLExpressionFieldImportContext::PrepareField( XMLTextInputFieldImportContext::XMLTextInputFieldImportContext( - SvXMLImport& rImport, XMLTextImportHelper& rHlp, - sal_uInt16 nPrfx, const OUString& sLocalName) : + SvXMLImport& rImport, XMLTextImportHelper& rHlp) : XMLVarFieldImportContext(rImport, rHlp, "Input", - nPrfx, sLocalName, // description false, false, true, true, true, @@ -591,11 +576,8 @@ void XMLTextInputFieldImportContext::PrepareField( XMLTableFormulaImportContext::XMLTableFormulaImportContext( SvXMLImport& rImport, - XMLTextImportHelper& rHlp, - sal_uInt16 nPrfx, - const OUString& rLocalName) : - XMLTextFieldImportContext(rImport, rHlp, "TableFormula", - nPrfx, rLocalName), + XMLTextImportHelper& rHlp) : + XMLTextFieldImportContext(rImport, rHlp, "TableFormula"), aValueHelper(rImport, rHlp, false, true, false, true), bIsShowFormula(false) { @@ -651,9 +633,8 @@ void XMLTableFormulaImportContext::PrepareField( XMLVariableDeclsImportContext::XMLVariableDeclsImportContext( - SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx, - const OUString& rLocalName, enum VarType eVarType) : - SvXMLImportContext(rImport, nPrfx, rLocalName), + SvXMLImport& rImport, XMLTextImportHelper& rHlp, enum VarType eVarType) : + SvXMLImportContext(rImport), eVarDeclsContextType(eVarType), rImportHelper(rHlp) { @@ -922,10 +903,8 @@ bool XMLVariableDeclImportContext::FindFieldMaster( XMLDatabaseDisplayImportContext::XMLDatabaseDisplayImportContext( - SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx, - const OUString& rLocalName) : - XMLDatabaseFieldImportContext(rImport, rHlp, sAPI_database, - nPrfx, rLocalName, false), + SvXMLImport& rImport, XMLTextImportHelper& rHlp) : + XMLDatabaseFieldImportContext(rImport, rHlp, sAPI_database, false), aValueHelper(rImport, rHlp, false, true, false, false), bColumnOK(false), bDisplay( true ), @@ -1104,7 +1083,7 @@ void XMLValueImportHelper::ProcessAttribute( { switch (nAttrToken) { - case XML_ELEMENT(TEXT, XML_VALUE_TYPE): + case XML_ELEMENT(TEXT, XML_VALUE_TYPE): // #i32362#: src680m48++ saves text:value-type case XML_ELEMENT(OFFICE, XML_VALUE_TYPE): { // convert enum |