summaryrefslogtreecommitdiff
path: root/configmgr/source
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2001-05-11 18:29:21 +0000
committerPhilipp Lohmann <pl@openoffice.org>2001-05-11 18:29:21 +0000
commit5e50d8459912f8c15eaade43d393e8546325ea68 (patch)
treee20379a2b887efa05a65c0e5494d1fab5640053e /configmgr/source
parent38f2547e4047d9bc198d6caab31afafab38c49df (diff)
rtl string api changes
Diffstat (limited to 'configmgr/source')
-rw-r--r--configmgr/source/api2/accessimpl.cxx6
-rw-r--r--configmgr/source/api2/providerimpl.cxx16
-rw-r--r--configmgr/source/xml/matchlocale.cxx14
-rw-r--r--configmgr/source/xml/typeconverter.cxx60
-rw-r--r--configmgr/source/xml/valueconverter.cxx41
5 files changed, 69 insertions, 68 deletions
diff --git a/configmgr/source/api2/accessimpl.cxx b/configmgr/source/api2/accessimpl.cxx
index b200a1bba0fe..c4594f438a96 100644
--- a/configmgr/source/api2/accessimpl.cxx
+++ b/configmgr/source/api2/accessimpl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: accessimpl.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: dg $ $Date: 2000-11-23 13:42:38 $
+ * last change: $Author: pl $ $Date: 2001-05-11 19:29:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -327,7 +327,7 @@ namespace internal
// find inexact match (the first one, but the order is unspecified)
// TODO: Add support for node-type-specific element names
Name aNodeName = aNode.getName();
- if (aNodeName.toString().equalsIgnoreCase(pSearchComponent->toString()))
+ if (aNodeName.toString().equalsIgnoreAsciiCase(pSearchComponent->toString()))
{
*pSearchComponent = aNodeName;
return DONE; // for this level
diff --git a/configmgr/source/api2/providerimpl.cxx b/configmgr/source/api2/providerimpl.cxx
index 443b45c32afb..8c45882cee0d 100644
--- a/configmgr/source/api2/providerimpl.cxx
+++ b/configmgr/source/api2/providerimpl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: providerimpl.cxx,v $
*
- * $Revision: 1.29 $
+ * $Revision: 1.30 $
*
- * last change: $Author: jb $ $Date: 2001-04-19 15:46:27 $
+ * last change: $Author: pl $ $Date: 2001-05-11 19:29:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -594,17 +594,17 @@ namespace configmgr
if (*pCurrent >>= aCurrent)
{
sal_Bool bExtractSuccess = sal_True; // defaulted to TRUE, so we skip unknown arguments
- if (aCurrent.Name.equalsIgnoreCase(OProviderImpl::FactoryArguments::sNodePath))
+ if (aCurrent.Name.equalsIgnoreAsciiCase(OProviderImpl::FactoryArguments::sNodePath))
bExtractSuccess = (aCurrent.Value >>= sPath);
- else if (aCurrent.Name.equalsIgnoreCase(OProviderImpl::FactoryArguments::sUser))
+ else if (aCurrent.Name.equalsIgnoreAsciiCase(OProviderImpl::FactoryArguments::sUser))
bExtractSuccess = (aCurrent.Value >>= sUser);
- else if (aCurrent.Name.equalsIgnoreCase(OProviderImpl::FactoryArguments::sDepth))
+ else if (aCurrent.Name.equalsIgnoreAsciiCase(OProviderImpl::FactoryArguments::sDepth))
bExtractSuccess = (aCurrent.Value >>= nLevelDepth);
- else if (aCurrent.Name.equalsIgnoreCase(OProviderImpl::FactoryArguments::sLocale))
+ else if (aCurrent.Name.equalsIgnoreAsciiCase(OProviderImpl::FactoryArguments::sLocale))
bExtractSuccess = (aCurrent.Value >>= sLocale);
- else if (aCurrent.Name.equalsIgnoreCase(OProviderImpl::FactoryArguments::sNoCache))
+ else if (aCurrent.Name.equalsIgnoreAsciiCase(OProviderImpl::FactoryArguments::sNoCache))
bExtractSuccess = (aCurrent.Value >>= bNoCache);
- else if (aCurrent.Name.equalsIgnoreCase(OProviderImpl::FactoryArguments::sLazyWrite))
+ else if (aCurrent.Name.equalsIgnoreAsciiCase(OProviderImpl::FactoryArguments::sLazyWrite))
bExtractSuccess = (aCurrent.Value >>= bLazyWrite);
/*
#ifdef DBG_UTIL
diff --git a/configmgr/source/xml/matchlocale.cxx b/configmgr/source/xml/matchlocale.cxx
index d6e8957e6002..4c8e4e3b1b4b 100644
--- a/configmgr/source/xml/matchlocale.cxx
+++ b/configmgr/source/xml/matchlocale.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: matchlocale.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: jb $ $Date: 2001-04-10 14:04:38 $
+ * last change: $Author: pl $ $Date: 2001-05-11 19:25:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -137,16 +137,16 @@ namespace configmgr
sal_Int32 nCountryPos = countrySeparatorPos(aLocaleName_);
if (nCountryPos >= 0)
{
- rLanguage_ = aLocaleName_.copy(0,nCountryPos).toLowerCase();
+ rLanguage_ = aLocaleName_.copy(0,nCountryPos).toAsciiLowerCase();
++nCountryPos; // advance past separator
sal_Int32 nCountryLength = countryLength(aLocaleName_, nCountryPos);
- rCountry_ = aLocaleName_.copy(nCountryPos,nCountryLength).toUpperCase();
+ rCountry_ = aLocaleName_.copy(nCountryPos,nCountryLength).toAsciiUpperCase();
}
else
{
- rLanguage_ = aLocaleName_.toLowerCase();
+ rLanguage_ = aLocaleName_.toAsciiLowerCase();
rCountry_ = OUString();
}
}
@@ -165,8 +165,8 @@ Locale makeLocale(OUString const& sLocaleName_)
Locale makeLocale(lang::Locale const& aUnoLocale_)
{
Locale aResult;
- aResult.aLanguage = aUnoLocale_.Language.toLowerCase();
- aResult.aCountry = aUnoLocale_.Country.toUpperCase();
+ aResult.aLanguage = aUnoLocale_.Language.toAsciiLowerCase();
+ aResult.aCountry = aUnoLocale_.Country.toAsciiUpperCase();
return aResult;
}
static
diff --git a/configmgr/source/xml/typeconverter.cxx b/configmgr/source/xml/typeconverter.cxx
index 3018db972a87..7e6d6da59efc 100644
--- a/configmgr/source/xml/typeconverter.cxx
+++ b/configmgr/source/xml/typeconverter.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: typeconverter.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: jb $ $Date: 2001-04-05 09:19:37 $
+ * last change: $Author: pl $ $Date: 2001-05-11 19:25:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -185,15 +185,15 @@ namespace configmgr
{
uno::TypeClass aRet = uno::TypeClass_VOID;
- if (_rType.equalsIgnoreCase(TYPE_BOOLEAN)) aRet = uno::TypeClass_BOOLEAN;
- else if(_rType.equalsIgnoreCase(TYPE_SHORT)) aRet = uno::TypeClass_SHORT;
- else if(_rType.equalsIgnoreCase(TYPE_INT)) aRet = uno::TypeClass_LONG;
- else if(_rType.equalsIgnoreCase(::rtl::OUString::createFromAscii("integer"))) aRet = uno::TypeClass_LONG;
- else if(_rType.equalsIgnoreCase(TYPE_LONG)) aRet = uno::TypeClass_HYPER;
- else if(_rType.equalsIgnoreCase(TYPE_DOUBLE)) aRet = uno::TypeClass_DOUBLE;
- else if(_rType.equalsIgnoreCase(TYPE_STRING)) aRet = uno::TypeClass_STRING;
- else if(_rType.equalsIgnoreCase(TYPE_BINARY)) aRet = uno::TypeClass_SEQUENCE;
- else if(_rType.equalsIgnoreCase(TYPE_ANY)) aRet = uno::TypeClass_ANY;
+ if (_rType.equalsIgnoreAsciiCase(TYPE_BOOLEAN)) aRet = uno::TypeClass_BOOLEAN;
+ else if(_rType.equalsIgnoreAsciiCase(TYPE_SHORT)) aRet = uno::TypeClass_SHORT;
+ else if(_rType.equalsIgnoreAsciiCase(TYPE_INT)) aRet = uno::TypeClass_LONG;
+ else if(_rType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("integer"))) aRet = uno::TypeClass_LONG;
+ else if(_rType.equalsIgnoreAsciiCase(TYPE_LONG)) aRet = uno::TypeClass_HYPER;
+ else if(_rType.equalsIgnoreAsciiCase(TYPE_DOUBLE)) aRet = uno::TypeClass_DOUBLE;
+ else if(_rType.equalsIgnoreAsciiCase(TYPE_STRING)) aRet = uno::TypeClass_STRING;
+ else if(_rType.equalsIgnoreAsciiCase(TYPE_BINARY)) aRet = uno::TypeClass_SEQUENCE;
+ else if(_rType.equalsIgnoreAsciiCase(TYPE_ANY)) aRet = uno::TypeClass_ANY;
else
{
::rtl::OString aStr("Wrong typeclass! ");
@@ -277,20 +277,20 @@ namespace configmgr
{
uno::Type aRet;
- if (_rType.equalsIgnoreCase(::rtl::OUString::createFromAscii("boolean"))) aRet = getBooleanType();
+ if (_rType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("boolean"))) aRet = getBooleanType();
- else if(_rType.equalsIgnoreCase(::rtl::OUString::createFromAscii("short"))) aRet = getShortType();
- else if(_rType.equalsIgnoreCase(::rtl::OUString::createFromAscii("int"))) aRet = getIntType();
- else if(_rType.equalsIgnoreCase(::rtl::OUString::createFromAscii("integer"))) aRet = getIntType();
- else if(_rType.equalsIgnoreCase(::rtl::OUString::createFromAscii("long"))) aRet = getLongType();
+ else if(_rType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("short"))) aRet = getShortType();
+ else if(_rType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("int"))) aRet = getIntType();
+ else if(_rType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("integer"))) aRet = getIntType();
+ else if(_rType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("long"))) aRet = getLongType();
- else if(_rType.equalsIgnoreCase(::rtl::OUString::createFromAscii("double"))) aRet = getDoubleType();
+ else if(_rType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("double"))) aRet = getDoubleType();
- else if(_rType.equalsIgnoreCase(::rtl::OUString::createFromAscii("string"))) aRet = getStringType();
- else if(_rType.equalsIgnoreCase(::rtl::OUString::createFromAscii("binary"))) aRet = getBinaryType();
-// else if(_rType.equalsIgnoreCase(::rtl::OUString::createFromAscii("sequence"))) aRet = uno::TypeClass_SEQUENCE;
+ else if(_rType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("string"))) aRet = getStringType();
+ else if(_rType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("binary"))) aRet = getBinaryType();
+// else if(_rType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("sequence"))) aRet = uno::TypeClass_SEQUENCE;
- else if(_rType.equalsIgnoreCase(::rtl::OUString::createFromAscii("any"))) aRet = getAnyType();
+ else if(_rType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("any"))) aRet = getAnyType();
else
{
::rtl::OString aStr("Unknown type! ");
@@ -304,30 +304,30 @@ namespace configmgr
{
uno::Type aRet;
- if (_rsElementType.equalsIgnoreCase(::rtl::OUString::createFromAscii("boolean")))
+ if (_rsElementType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("boolean")))
aRet = ::getCppuType(static_cast<uno::Sequence<sal_Bool> const*>(0));
- else if(_rsElementType.equalsIgnoreCase(::rtl::OUString::createFromAscii("short")))
+ else if(_rsElementType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("short")))
aRet = ::getCppuType(static_cast<uno::Sequence<sal_Int16> const*>(0));
- else if(_rsElementType.equalsIgnoreCase(::rtl::OUString::createFromAscii("int")))
+ else if(_rsElementType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("int")))
aRet = ::getCppuType(static_cast<uno::Sequence<sal_Int32> const*>(0));
- else if(_rsElementType.equalsIgnoreCase(::rtl::OUString::createFromAscii("integer")))
+ else if(_rsElementType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("integer")))
aRet = ::getCppuType(static_cast<uno::Sequence<sal_Int32> const*>(0));
- else if(_rsElementType.equalsIgnoreCase(::rtl::OUString::createFromAscii("long")))
+ else if(_rsElementType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("long")))
aRet = ::getCppuType(static_cast<uno::Sequence<sal_Int64> const*>(0));
- else if(_rsElementType.equalsIgnoreCase(::rtl::OUString::createFromAscii("double")))
+ else if(_rsElementType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("double")))
aRet = ::getCppuType(static_cast<uno::Sequence<double> const*>(0));
- else if(_rsElementType.equalsIgnoreCase(::rtl::OUString::createFromAscii("string")))
+ else if(_rsElementType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("string")))
aRet = ::getCppuType(static_cast<uno::Sequence<rtl::OUString> const*>(0));
- else if(_rsElementType.equalsIgnoreCase(::rtl::OUString::createFromAscii("binary")))
+ else if(_rsElementType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("binary")))
aRet = ::getCppuType(static_cast<uno::Sequence<uno::Sequence<sal_Int8> > const*>(0));
-// else if(_rsElementType.equalsIgnoreCase(::rtl::OUString::createFromAscii("sequence"))) aRet = uno::TypeClass_SEQUENCE;
+// else if(_rsElementType.equalsIgnoreAsciiCase(::rtl::OUString::createFromAscii("sequence"))) aRet = uno::TypeClass_SEQUENCE;
else
{
::rtl::OString aStr("Unknown type! ");
diff --git a/configmgr/source/xml/valueconverter.cxx b/configmgr/source/xml/valueconverter.cxx
index 7e191f66dbbc..fb3a53cad49d 100644
--- a/configmgr/source/xml/valueconverter.cxx
+++ b/configmgr/source/xml/valueconverter.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: valueconverter.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: lla $ $Date: 2001-05-04 10:13:46 $
+ * last change: $Author: pl $ $Date: 2001-05-11 19:25:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,9 +66,10 @@
#include "msc_msg.hxx"
-#ifndef _RTL_CHAR_H_
-#include <rtl/char.h>
-#endif
+inline sal_Bool rtl_ascii_isWhitespace( sal_Unicode ch )
+{
+ return ch <= 0x20 && ch;
+}
// #define ASCII(x) OUString::createFromAscii(x)
namespace configmgr
@@ -172,12 +173,12 @@ namespace Encoding {
eEncoding = Encoding::DEFAULT;
}
- else if (sEncoding.equalsIgnoreCase(ENCODING_HEX))
+ else if (sEncoding.equalsIgnoreAsciiCase(ENCODING_HEX))
{
eEncoding = Encoding::hex;
}
- else if (sEncoding.equalsIgnoreCase(ENCODING_BASE64))
+ else if (sEncoding.equalsIgnoreAsciiCase(ENCODING_BASE64))
{
eEncoding = Encoding::base64;
}
@@ -260,12 +261,12 @@ bool OValueConverter::convertScalarToAny(OUString const& aContent, uno::Any& rVa
CFG_THROW( ( script::CannotConvertException, uno::RuntimeException ) )
{
OSL_PRECOND(!m_aValueDesc.isNull,"OValueConverter::convertScalarToAny - check for NULL before calling");
- OSL_ENSURE(!m_aValueDesc.sType.equalsIgnoreCase(TYPE_ANY),"'Any' values must be NULL");
+ OSL_ENSURE(!m_aValueDesc.sType.equalsIgnoreAsciiCase(TYPE_ANY),"'Any' values must be NULL");
bool bResult = false;
// check for Binary
- if (m_aValueDesc.sType.equalsIgnoreCase(TYPE_BINARY))
+ if (m_aValueDesc.sType.equalsIgnoreAsciiCase(TYPE_BINARY))
{
Sequence<sal_Int8> aBinarySeq = parseBinary(aContent);
rValue <<= aBinarySeq;
@@ -280,14 +281,14 @@ bool OValueConverter::convertScalarToAny(OUString const& aContent, uno::Any& rVa
if (!bResult)
{
- if (m_aValueDesc.sType.equalsIgnoreCase(TYPE_STRING))
+ if (m_aValueDesc.sType.equalsIgnoreAsciiCase(TYPE_STRING))
{
OSL_ENSURE(m_xTypeConverter.is(), "Warning: OValueConverter has no TypeConverter");
rValue <<= aContent;
bResult = true;
}
- else if (m_aValueDesc.sType.equalsIgnoreCase(TYPE_ANY))
+ else if (m_aValueDesc.sType.equalsIgnoreAsciiCase(TYPE_ANY))
{
rValue.clear();
bResult = false;
@@ -371,45 +372,45 @@ bool OValueConverter::convertListToAny(StringList const& aContentList, uno::Any&
CFG_THROW( ( script::CannotConvertException, uno::RuntimeException ) )
{
OSL_PRECOND(!m_aValueDesc.isNull,"OValueConverter::convertListToAny - check for NULL before calling");
- OSL_ENSURE(!m_aValueDesc.sType.equalsIgnoreCase(TYPE_ANY),"'Any' not allowed for lists");
+ OSL_ENSURE(!m_aValueDesc.sType.equalsIgnoreAsciiCase(TYPE_ANY),"'Any' not allowed for lists");
- if (m_aValueDesc.sType.equalsIgnoreCase(TYPE_STRING))
+ if (m_aValueDesc.sType.equalsIgnoreAsciiCase(TYPE_STRING))
{
Sequence< OUString > aSequence;
convertListToSequence(aContentList,aSequence,*this);
rValue <<= aSequence;
}
- else if (m_aValueDesc.sType.equalsIgnoreCase(TYPE_BOOLEAN))
+ else if (m_aValueDesc.sType.equalsIgnoreAsciiCase(TYPE_BOOLEAN))
{
Sequence< sal_Bool > aSequence;
convertListToSequence(aContentList,aSequence,*this);
rValue <<= aSequence;
}
- else if (m_aValueDesc.sType.equalsIgnoreCase(TYPE_SHORT))
+ else if (m_aValueDesc.sType.equalsIgnoreAsciiCase(TYPE_SHORT))
{
Sequence< sal_Int16 > aSequence;
convertListToSequence(aContentList,aSequence,*this);
rValue <<= aSequence;
}
- else if (m_aValueDesc.sType.equalsIgnoreCase(TYPE_INT))
+ else if (m_aValueDesc.sType.equalsIgnoreAsciiCase(TYPE_INT))
{
Sequence< sal_Int32 > aSequence;
convertListToSequence(aContentList,aSequence,*this);
rValue <<= aSequence;
}
- else if (m_aValueDesc.sType.equalsIgnoreCase(TYPE_LONG))
+ else if (m_aValueDesc.sType.equalsIgnoreAsciiCase(TYPE_LONG))
{
Sequence< sal_Int64 > aSequence;
convertListToSequence(aContentList,aSequence,*this);
rValue <<= aSequence;
}
- else if (m_aValueDesc.sType.equalsIgnoreCase(TYPE_DOUBLE))
+ else if (m_aValueDesc.sType.equalsIgnoreAsciiCase(TYPE_DOUBLE))
{
Sequence< double > aSequence;
convertListToSequence(aContentList,aSequence,*this);
rValue <<= aSequence;
}
- else if (m_aValueDesc.sType.equalsIgnoreCase(TYPE_BINARY))
+ else if (m_aValueDesc.sType.equalsIgnoreAsciiCase(TYPE_BINARY))
{
Sequence< Sequence<sal_Int8> > aSequence;
convertListToSequence(aContentList,aSequence,*this);
@@ -446,7 +447,7 @@ namespace
if (ch == 0xA) return true;
return (ch == c_chWhite0) || (ch == c_chWhite1);
*/
- return rtl_char_isWhitespace(ch) ? true : false;
+ return rtl_ascii_isWhitespace(ch) ? true : false;
}
sal_Int32 findFirstTokenStart(OUString const& sText) const throw()