oox/source/helper/attributelist.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit 1aafcb90209ebdfdeb974fad8bdc28ebfffaa486 Author: Michael Meeks <[email protected]> Date: Wed Nov 14 13:37:28 2012 +0000 oox: reduce exception count reading missing attributes. diff --git a/oox/source/helper/attributelist.cxx b/oox/source/helper/attributelist.cxx index 40bc8f3..1837942 100644 --- a/oox/source/helper/attributelist.cxx +++ b/oox/source/helper/attributelist.cxx @@ -228,6 +228,10 @@ sal_Int32 AttributeList::getToken( sal_Int32 nAttrToken, sal_Int32 nDefault ) co OUString AttributeList::getString( sal_Int32 nAttrToken, const OUString& rDefault ) const { + // try to avoid slow exception throw/catch if we can + if (rDefault.isEmpty()) + return mxAttribs->getOptionalValue( nAttrToken ); + try { return mxAttribs->getValue( nAttrToken ); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
