diff options
author | Mohammed Abdul Azeem <azeemmysore@gmail.com> | 2017-06-29 13:49:18 +0530 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2017-06-29 17:50:12 +0200 |
commit | b3b6ce3febbf3073dd9e16d908137e41ab473dca (patch) | |
tree | bb1bd13c01468ab103e0427a9c51ad8b1b6b60c8 /sc | |
parent | 8a828ee75d4f5d0fd2abcd7d74130e57e5c3bd71 (diff) |
Added find function to FastAttributeList:
It returns a FastAttributeIter, which can be used to
obtain value in different formats directly. Also, avoids
one unnecessary iteration.
Change-Id: Ic28e0177100738bbd71a3a89634cae9f1f7ee996
Reviewed-on: https://gerrit.libreoffice.org/39380
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/xmlrowi.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx index ab5fdf5eefa2..8903287504ac 100644 --- a/sc/source/filter/xml/xmlrowi.cxx +++ b/sc/source/filter/xml/xmlrowi.cxx @@ -227,11 +227,13 @@ ScXMLTableRowsContext::ScXMLTableRowsContext( ScXMLImport& rImport, { nGroupStartRow = rImport.GetTables().GetCurrentRow(); ++nGroupStartRow; - if ( xAttrList.is() && - xAttrList->hasAttribute( XML_ELEMENT( TABLE, XML_DISPLAY ) ) ) + if ( xAttrList.is() ) { - bGroupDisplay = IsXMLToken( xAttrList->getValue( - XML_ELEMENT( TABLE, XML_DISPLAY ) ), XML_TRUE ); + sax_fastparser::FastAttributeList *pAttribList = + static_cast< sax_fastparser::FastAttributeList *>( xAttrList.get() ); + auto &aIter( pAttribList->find( XML_ELEMENT( TABLE, XML_DISPLAY ) ) ); + if( aIter != pAttribList->end() ) + bGroupDisplay = IsXMLToken( aIter.toCString(), XML_TRUE ); } } } |