diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-11-20 22:09:45 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-11-20 22:15:29 -0500 |
commit | 22ea573b7417db0392c006dff06cde50ddbcd469 (patch) | |
tree | 649ac5ae9315710f213f82ea0c983a4062922e48 /oox | |
parent | f9041c386c2193c7d669691927261e0fd7608e3e (diff) |
Expose raw char array and use it to avoid OUString allocations.
In SheetDataContext::importCell().
Change-Id: I52db64219f672ea5fbbda17686bf1173ceac5926
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/helper/attributelist.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/oox/source/helper/attributelist.cxx b/oox/source/helper/attributelist.cxx index 7c41d8e967d2..e57dd1d26cf3 100644 --- a/oox/source/helper/attributelist.cxx +++ b/oox/source/helper/attributelist.cxx @@ -261,6 +261,18 @@ OUString AttributeList::getXString( sal_Int32 nAttrToken, const OUString& rDefau return getXString( nAttrToken ).get( rDefault ); } +AttributeList::Char AttributeList::getChar( sal_Int32 nAttrToken ) const +{ + Char aRet; + bool bValid = getAttribList()->getAsChar(nAttrToken, aRet.mpPos, aRet.mnSize); + if (!bValid) + { + aRet.mpPos = NULL; + aRet.mnSize = 0; + } + return aRet; +} + double AttributeList::getDouble( sal_Int32 nAttrToken, double fDefault ) const { return getDouble( nAttrToken ).get( fDefault ); |