[Libreoffice-commits] .: oox/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Nov 14 05:37:38 PST 2012
oox/source/helper/attributelist.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 1aafcb90209ebdfdeb974fad8bdc28ebfffaa486
Author: Michael Meeks <michael.meeks at suse.com>
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 );
More information about the Libreoffice-commits
mailing list