summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-11-28 01:31:58 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-11-28 01:32:06 -0600
commit9865cc0aee96b6b19bf673df3efb0d9d1755744a (patch)
tree4f09800310b9fcc8e0cf3a5ed86d69c98aae2a0d /svl
parentfd773e669a0958f5f989e17a87ef815ecfd02476 (diff)
fix misuse of toAscii(Lower|Upper)Case
OUString are immutable so these api, contrary to what happen with String, do not change the object but create a new copy Change-Id: Ib48a8d11e485d4b8556f4427880aaaca32d4e82c
Diffstat (limited to 'svl')
-rw-r--r--svl/source/misc/inettype.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx
index b9f8bf3ae720..143a11a409c0 100644
--- a/svl/source/misc/inettype.cxx
+++ b/svl/source/misc/inettype.cxx
@@ -521,8 +521,7 @@ Registration::~Registration()
// static
TypeNameMapEntry * Registration::getExtensionEntry(OUString const & rTypeName)
{
- OUString aTheTypeName = rTypeName;
- aTheTypeName.toAsciiLowerCase();
+ OUString aTheTypeName = rTypeName.toAsciiLowerCase();;
Registration &rRegistration = theRegistration::get();
TypeNameMap::iterator it = rRegistration.m_aTypeNameMap.find(aTheTypeName);
if (it != rRegistration.m_aTypeNameMap.end())
@@ -543,8 +542,7 @@ INetContentType Registration::RegisterContentType(OUString const & rTypeName,
"Registration::RegisterContentType(): Already registered");
INetContentType eTypeID = INetContentType(rRegistration.m_nNextDynamicID++);
- OUString aTheTypeName = rTypeName;
- aTheTypeName.toAsciiLowerCase();
+ OUString aTheTypeName = rTypeName.toAsciiLowerCase();
TypeIDMapEntry * pTypeIDMapEntry = new TypeIDMapEntry;
pTypeIDMapEntry->m_aTypeName = aTheTypeName;
@@ -575,8 +573,7 @@ INetContentType Registration::GetContentType(OUString const & rTypeName)
{
Registration &rRegistration = theRegistration::get();
- OUString aTheTypeName = rTypeName;
- aTheTypeName.toAsciiLowerCase();
+ OUString aTheTypeName = rTypeName.toAsciiLowerCase();
TypeNameMap::iterator it = rRegistration.m_aTypeNameMap.find(aTheTypeName);
return it != rRegistration.m_aTypeNameMap.end()
? it->second->m_eTypeID
@@ -932,7 +929,7 @@ bool INetContentTypes::parse(OUString const & rMediaType,
return false;
rType = OUString(pToken, p - pToken);
if (bDowncase)
- rType.toAsciiLowerCase();
+ rType= rType.toAsciiLowerCase();
p = INetMIME::skipLinearWhiteSpaceComment(p, pEnd);
if (p == pEnd || *p++ != '/')
@@ -950,7 +947,7 @@ bool INetContentTypes::parse(OUString const & rMediaType,
return false;
rSubType = OUString(pToken, p - pToken);
if (bDowncase)
- rSubType.toAsciiLowerCase();
+ rSubType = rSubType.toAsciiLowerCase();
return INetMIME::scanParameters(p, pEnd, pParameters) == pEnd;
}