Kaydet (Commit) 9865cc0a authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud

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
üst fd773e66
......@@ -96,8 +96,7 @@ static void addPluginsFromPath( const TCHAR * pPluginsPath, PluginLocationMap &
while (hFind != INVALID_HANDLE_VALUE)
{
OString aName( aFindData.cFileName );
aName.toAsciiLowerCase();
OString aName = OUString( aFindData.cFileName ).toAsciiLowerCase();
// no netscape default plugin anymore...
// and no double plugin dlls
......
......@@ -195,8 +195,7 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr
sDesktopName = ::rtl::OUString("base");
else
sDesktopName = ::rtl::OUString("startcenter");
sApplicationID = utl::ConfigManager::getProductName().
toAsciiLowerCase();
sApplicationID = utl::ConfigManager::getProductName().toAsciiLowerCase();
sApplicationID += ::rtl::OUString(sal_Unicode('-'));
sApplicationID += sDesktopName;
}
......
......@@ -450,8 +450,7 @@ ScFunctionList::ScFunctionList() :
pAddInFuncData->getParamDesc( aArgName, aArgDesc, 0 );
pDesc->nFIndex = nNextId++; // ??? OpCode vergeben
pDesc->nCategory = ID_FUNCTION_GRP_ADDINS;
pDesc->pFuncName = new ::rtl::OUString(pAddInFuncData->GetInternalName());
pDesc->pFuncName->toAsciiUpperCase();
pDesc->pFuncName = new OUString(pAddInFuncData->GetInternalName().toAsciiUpperCase());
::rtl::OUStringBuffer aBuf(aArgDesc);
aBuf.append(sal_Unicode('\n'));
......
......@@ -644,8 +644,8 @@ sal_Bool SdUnoSearchReplaceShape::Search( const OUString& rText, sal_Int32& nSta
if( !pDescr->IsCaseSensitive() )
{
aText.toAsciiLowerCase();
aSearchStr.toAsciiLowerCase();
aText = aText.toAsciiLowerCase();
aSearchStr = aSearchStr.toAsciiLowerCase();
}
sal_Int32 nFound = aText.indexOf( aSearchStr, nStartPos );
......
......@@ -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;
}
......
......@@ -672,8 +672,7 @@ void SwCreateAddressListDialog::UpdateButtons()
void SwCreateAddressListDialog::Find(const String& rSearch, sal_Int32 nColumn)
{
OUString sSearch = rSearch;
sSearch.toAsciiLowerCase();
OUString sSearch = OUString(rSearch).toAsciiLowerCase();
sal_uInt32 nCurrent = m_pAddressControl->GetCurrentDataSet();
//search forward
bool bFound = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment