From 6087da0dd402013b7d67fe6754081e647fdc5f8c Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 21 Nov 2013 20:32:46 -0500 Subject: getChar() to return a null-terminated char array. No need to fetch string size with this change. Change-Id: Iae5f6c60430fc57985a0fec5bfec59727e5a8f0f --- oox/source/helper/attributelist.cxx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'oox') diff --git a/oox/source/helper/attributelist.cxx b/oox/source/helper/attributelist.cxx index e57dd1d26cf3..2efc3a3ed4ba 100644 --- a/oox/source/helper/attributelist.cxx +++ b/oox/source/helper/attributelist.cxx @@ -261,16 +261,14 @@ OUString AttributeList::getXString( sal_Int32 nAttrToken, const OUString& rDefau return getXString( nAttrToken ).get( rDefault ); } -AttributeList::Char AttributeList::getChar( sal_Int32 nAttrToken ) const +const char* AttributeList::getChar( sal_Int32 nAttrToken ) const { - Char aRet; - bool bValid = getAttribList()->getAsChar(nAttrToken, aRet.mpPos, aRet.mnSize); + const char* p = NULL; + bool bValid = getAttribList()->getAsChar(nAttrToken, p); if (!bValid) - { - aRet.mpPos = NULL; - aRet.mnSize = 0; - } - return aRet; + p = NULL; + + return p; } double AttributeList::getDouble( sal_Int32 nAttrToken, double fDefault ) const -- cgit