diff options
author | José Guilherme Vanz <guilherme.sft@gmail.com> | 2013-02-02 18:23:45 -0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-02-04 07:15:25 +0000 |
commit | 1749eac1d0e7983a39c32ace9da429a74f95695d (patch) | |
tree | 10c289e5c4903d643ebce45e31203dba74f8f412 /oox | |
parent | 423079fd4db3163f66ab38d053f60eeec1afc2e7 (diff) |
String cleanup in oox
Change-Id: Ib06b6defdb82c5d62be9cbd59f02827c07a320d8
Signed-off-by: José Guilherme Vanz <guilherme.sft@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/1969
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/mathml/importutils.cxx | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/oox/source/mathml/importutils.cxx b/oox/source/mathml/importutils.cxx index d3c47821a3ef..5350d5846bf1 100644 --- a/oox/source/mathml/importutils.cxx +++ b/oox/source/mathml/importutils.cxx @@ -41,7 +41,6 @@ #define CLOSING( token ) XML_STREAM_CLOSING( token ) using namespace com::sun::star; -using rtl::OUString; namespace oox { @@ -117,7 +116,7 @@ OUString& XmlStream::AttributeList::operator[] (int token) rtl::OUString XmlStream::AttributeList::attribute( int token, const rtl::OUString& def ) const { - std::map< int, rtl::OUString >::const_iterator find = attrs.find( token ); + std::map< int, OUString >::const_iterator find = attrs.find( token ); if( find != attrs.end()) return find->second; return def; @@ -125,19 +124,19 @@ rtl::OUString XmlStream::AttributeList::attribute( int token, const rtl::OUStrin bool XmlStream::AttributeList::attribute( int token, bool def ) const { - std::map< int, rtl::OUString >::const_iterator find = attrs.find( token ); + std::map< int, OUString >::const_iterator find = attrs.find( token ); if( find != attrs.end()) { - const rtl::OUString sValue = find->second; - if( sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("true")) || - sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("on")) || - sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("t")) || - sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("1")) ) + const OUString sValue = find->second; + if( sValue.equalsIgnoreAsciiCaseAscii("true") || + sValue.equalsIgnoreAsciiCaseAscii("on") || + sValue.equalsIgnoreAsciiCaseAscii("t") || + sValue.equalsIgnoreAsciiCaseAscii("1") ) return true; - if( sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("false")) || - sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("off")) || - sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("f")) || - sValue.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("0")) ) + if( sValue.equalsIgnoreAsciiCaseAscii("false") || + sValue.equalsIgnoreAsciiCaseAscii("off") || + sValue.equalsIgnoreAsciiCaseAscii("f") || + sValue.equalsIgnoreAsciiCaseAscii("0") ) return false; SAL_WARN( "oox.xmlstream", "Cannot convert \'" << sValue << "\' to bool." ); } @@ -146,7 +145,7 @@ bool XmlStream::AttributeList::attribute( int token, bool def ) const sal_Unicode XmlStream::AttributeList::attribute( int token, sal_Unicode def ) const { - std::map< int, rtl::OUString >::const_iterator find = attrs.find( token ); + std::map< int, OUString >::const_iterator find = attrs.find( token ); if( find != attrs.end()) { if( !find->second.isEmpty() ) |