From f9dacc6d9e542c4257757eee4824647c9587c1e1 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 --- include/oox/helper/attributelist.hxx | 8 +------- include/sax/fastattribs.hxx | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/oox/helper/attributelist.hxx b/include/oox/helper/attributelist.hxx index 78ea83e28ab2..e22e8164caf1 100644 --- a/include/oox/helper/attributelist.hxx +++ b/include/oox/helper/attributelist.hxx @@ -75,12 +75,6 @@ public: class OOX_DLLPUBLIC AttributeList { public: - struct Char - { - const char* mpPos; - size_t mnSize; - }; - explicit AttributeList( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs ); @@ -138,7 +132,7 @@ public: passed default string if the attribute is missing. */ OUString getXString( sal_Int32 nAttrToken, const OUString& rDefault ) const; - Char getChar( sal_Int32 nAttrToken ) const; + const char* getChar( sal_Int32 nAttrToken ) const; /** Returns the double value of the specified attribute, or the passed diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx index f47da070c1fc..42b285c9e847 100644 --- a/include/sax/fastattribs.hxx +++ b/include/sax/fastattribs.hxx @@ -76,7 +76,7 @@ public: // performance sensitive shortcuts to avoid allocation ... bool getAsInteger( sal_Int32 nToken, sal_Int32 &rInt); bool getAsDouble( sal_Int32 nToken, double &rDouble); - bool getAsChar( sal_Int32 nToken, const char*& rPos, size_t& rLen ) const; + bool getAsChar( sal_Int32 nToken, const char*& rPos ) const; // XFastAttributeList virtual ::sal_Bool SAL_CALL hasAttribute( ::sal_Int32 Token ) throw (::com::sun::star::uno::RuntimeException); -- cgit