summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml/xmlrowi.cxx
diff options
context:
space:
mode:
authorMohammed Abdul Azeem <azeemmysore@gmail.com>2017-06-29 13:49:18 +0530
committerMichael Meeks <michael.meeks@collabora.com>2017-06-29 17:50:12 +0200
commitb3b6ce3febbf3073dd9e16d908137e41ab473dca (patch)
treebb1bd13c01468ab103e0427a9c51ad8b1b6b60c8 /sc/source/filter/xml/xmlrowi.cxx
parent8a828ee75d4f5d0fd2abcd7d74130e57e5c3bd71 (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/source/filter/xml/xmlrowi.cxx')
-rw-r--r--sc/source/filter/xml/xmlrowi.cxx10
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 );
}
}
}