summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-11-27 07:00:28 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-11-27 23:00:05 -0600
commitae0fa7cc62e1f57d22e68b2ef45086aeb1dfe41c (patch)
treee3047e9be982840f258498d2195074508b3893e1 /desktop
parente55f0825c39c2d4f6991f40bcebadaef4f75337f (diff)
String=>OUString in svl's inettype and fall-out
Change-Id: I7d64d117183738b86d1869ed629d73675de9c679
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx2
-rw-r--r--desktop/source/deployment/registry/component/dp_component.cxx12
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx10
-rw-r--r--desktop/source/deployment/registry/executable/dp_executable.cxx6
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx7
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx42
-rw-r--r--desktop/source/deployment/registry/script/dp_script.cxx8
-rw-r--r--desktop/source/deployment/registry/sfwk/dp_sfwk.cxx6
8 files changed, 41 insertions, 52 deletions
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 8f469ed545c9..ba67f9ebadb0 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -1001,7 +1001,7 @@ Reference<deployment::XPackage> PackageManagerImpl::getDeployedPackage_(
{
if (ignoreAlienPlatforms)
{
- String type, subType;
+ OUString type, subType;
INetContentTypeParameterList params;
if (INetContentTypes::parse( data.mediaType, type, subType, &params ))
{
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index 163ac4087af8..5d7082ab34ae 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -679,11 +679,11 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
}
- String type, subType;
+ OUString type, subType;
INetContentTypeParameterList params;
if (INetContentTypes::parse( mediaType, type, subType, &params ))
{
- if (type.EqualsIgnoreCaseAscii("application"))
+ if (type.equalsIgnoreAsciiCaseAscii("application"))
{
OUString name;
if (!bRemoved)
@@ -692,7 +692,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
name = StrTitle::getTitle( ucbContent );
}
- if (subType.EqualsIgnoreCaseAscii("vnd.sun.star.uno-component"))
+ if (subType.equalsIgnoreAsciiCaseAscii("vnd.sun.star.uno-component"))
{
// xxx todo: probe and evaluate component xml description
@@ -738,8 +738,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
}
}
- else if (subType.EqualsIgnoreCaseAscii(
- "vnd.sun.star.uno-components"))
+ else if (subType.equalsIgnoreAsciiCaseAscii("vnd.sun.star.uno-components"))
{
INetContentTypeParameter const * param = params.find(
rtl::OString(RTL_CONSTASCII_STRINGPARAM("platform")));
@@ -749,8 +748,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
identifier);
}
}
- else if (subType.EqualsIgnoreCaseAscii(
- "vnd.sun.star.uno-typelibrary"))
+ else if (subType.equalsIgnoreAsciiCaseAscii( "vnd.sun.star.uno-typelibrary"))
{
INetContentTypeParameter const * param = params.find(
rtl::OString(RTL_CONSTASCII_STRINGPARAM("type")));
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index e53e3e26ee2d..4fa4763cce4e 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -330,11 +330,11 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
}
- String type, subType;
+ OUString type, subType;
INetContentTypeParameterList params;
if (INetContentTypes::parse( mediaType, type, subType, &params ))
{
- if (type.EqualsIgnoreCaseAscii("application"))
+ if (type.equalsIgnoreAsciiCaseAscii("application"))
{
OUString name;
if (!bRemoved)
@@ -344,15 +344,13 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
}
::ucbhelper::Content ucbContent( url, xCmdEnv, m_xComponentContext );
- if (subType.EqualsIgnoreCaseAscii(
- "vnd.sun.star.configuration-data"))
+ if (subType.equalsIgnoreAsciiCaseAscii( "vnd.sun.star.configuration-data"))
{
return new PackageImpl(
this, url, name, m_xConfDataTypeInfo, false /* data file */,
bRemoved, identifier);
}
- else if (subType.EqualsIgnoreCaseAscii(
- "vnd.sun.star.configuration-schema")) {
+ else if (subType.equalsIgnoreAsciiCaseAscii( "vnd.sun.star.configuration-schema")) {
return new PackageImpl(
this, url, name, m_xConfSchemaTypeInfo, true /* schema file */,
bRemoved, identifier);
diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx
index 5aba0f693335..18cf752e2333 100644
--- a/desktop/source/deployment/registry/executable/dp_executable.cxx
+++ b/desktop/source/deployment/registry/executable/dp_executable.cxx
@@ -169,11 +169,11 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
}
- String type, subType;
+ OUString type, subType;
INetContentTypeParameterList params;
if (INetContentTypes::parse( mediaType, type, subType, &params ))
{
- if (type.EqualsIgnoreCaseAscii("application"))
+ if (type.equalsIgnoreAsciiCaseAscii("application"))
{
OUString name;
if (!bRemoved)
@@ -182,7 +182,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
url, xCmdEnv, getComponentContext() );
name = StrTitle::getTitle( ucbContent );
}
- if (subType.EqualsIgnoreCaseAscii("vnd.sun.star.executable"))
+ if (subType.equalsIgnoreAsciiCaseAscii("vnd.sun.star.executable"))
{
return new BackendImpl::ExecutablePackageImpl(
this, url, name, m_xExecutableTypeInfo, bRemoved,
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 9a72be8a73b6..c31b1de3fcef 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -183,11 +183,11 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
StrCannotDetectMediaType::get() + url,
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
- String type, subType;
+ OUString type, subType;
INetContentTypeParameterList params;
if (INetContentTypes::parse( mediaType_, type, subType, &params ))
{
- if (type.EqualsIgnoreCaseAscii("application"))
+ if (type.equalsIgnoreAsciiCaseAscii("application"))
{
OUString name;
if (!bRemoved)
@@ -197,8 +197,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
name = StrTitle::getTitle( ucbContent );
}
- if (subType.EqualsIgnoreCaseAscii(
- "vnd.sun.star.help"))
+ if (subType.equalsIgnoreAsciiCaseAscii( "vnd.sun.star.help"))
{
return new PackageImpl(
this, url, name, m_xHelpTypeInfo, bRemoved,
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 36a4a49537b7..3e2615bb3385 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -416,11 +416,11 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
}
- String type, subType;
+ OUString type, subType;
INetContentTypeParameterList params;
if (INetContentTypes::parse( mediaType, type, subType, &params ))
{
- if (type.EqualsIgnoreCaseAscii("application"))
+ if (type.equalsIgnoreAsciiCaseAscii("application"))
{
//In case a XPackage is created for a removed extension, we cannot
@@ -432,13 +432,14 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
url, xCmdEnv, getComponentContext() );
name = StrTitle::getTitle( ucbContent );
}
- if (subType.EqualsIgnoreCaseAscii("vnd.sun.star.package-bundle")) {
+ if (subType.equalsIgnoreAsciiCaseAscii("vnd.sun.star.package-bundle"))
+ {
return new PackageImpl(
this, url, name, m_xBundleTypeInfo, false, bRemoved,
identifier);
}
- else if (subType.EqualsIgnoreCaseAscii(
- "vnd.sun.star.legacy-package-bundle")) {
+ else if (subType.equalsIgnoreAsciiCaseAscii( "vnd.sun.star.legacy-package-bundle"))
+ {
return new PackageImpl(
this, url, name, m_xLegacyBundleTypeInfo, true, bRemoved,
identifier);
@@ -1311,17 +1312,15 @@ Sequence< Reference<deployment::XPackage> > BackendImpl::PackageImpl::getBundle(
const Reference<deployment::XPackageTypeInfo> xPackageType(
(*iPos)->getPackageType() );
OSL_ASSERT( xPackageType.is() );
- if (xPackageType.is()) {
+ if (xPackageType.is())
+ {
const OUString mediaType( xPackageType->getMediaType() );
- String type, subType;
+ OUString type, subType;
INetContentTypeParameterList params;
- if (INetContentTypes::parse(
- mediaType, type, subType, &params ) &&
- type.EqualsIgnoreCaseAscii("application") &&
- (subType.EqualsIgnoreCaseAscii(
- "vnd.sun.star.uno-component") ||
- subType.EqualsIgnoreCaseAscii(
- "vnd.sun.star.configuration-data")))
+ if (INetContentTypes::parse( mediaType, type, subType, &params ) &&
+ type.equalsIgnoreAsciiCaseAscii("application") &&
+ (subType.equalsIgnoreAsciiCaseAscii( "vnd.sun.star.uno-component") ||
+ subType.equalsIgnoreAsciiCaseAscii( "vnd.sun.star.configuration-data")))
{
--upper_end;
pret[ upper_end ] = *iPos;
@@ -1352,12 +1351,8 @@ inline bool isBundle_( OUString const & mediaType )
{
// xxx todo: additional parsing?
return !mediaType.isEmpty() &&
- (mediaType.matchIgnoreAsciiCaseAsciiL(
- RTL_CONSTASCII_STRINGPARAM(
- "application/vnd.sun.star.package-bundle") ) ||
- mediaType.matchIgnoreAsciiCaseAsciiL(
- RTL_CONSTASCII_STRINGPARAM(
- "application/vnd.sun.star.legacy-package-bundle") ));
+ (mediaType.matchIgnoreAsciiCase( "application/vnd.sun.star.package-bundle") ||
+ mediaType.matchIgnoreAsciiCase( "application/vnd.sun.star.legacy-package-bundle"));
}
//______________________________________________________________________________
@@ -1456,7 +1451,7 @@ void BackendImpl::PackageImpl::scanBundle(
if ( fullPath.isEmpty() || mediaType.isEmpty() || mediaType == "text/xml" )// opt: exclude common text/xml
continue;
- String type, subType;
+ OUString type, subType;
INetContentTypeParameterList params;
if (! INetContentTypes::parse( mediaType, type, subType, &params ))
continue;
@@ -1468,9 +1463,8 @@ void BackendImpl::PackageImpl::scanBundle(
const OUString url( makeURL( packageRootURL, fullPath ) );
// check for bundle description:
- if (type.EqualsIgnoreCaseAscii("application") &&
- subType.EqualsIgnoreCaseAscii(
- "vnd.sun.star.package-bundle-description"))
+ if (type.equalsIgnoreAsciiCaseAscii("application") &&
+ subType.equalsIgnoreAsciiCaseAscii( "vnd.sun.star.package-bundle-description"))
{
// check locale:
param = params.find(rtl::OString(RTL_CONSTASCII_STRINGPARAM("locale")));
diff --git a/desktop/source/deployment/registry/script/dp_script.cxx b/desktop/source/deployment/registry/script/dp_script.cxx
index a8f8c0945b5b..3f061f130ad1 100644
--- a/desktop/source/deployment/registry/script/dp_script.cxx
+++ b/desktop/source/deployment/registry/script/dp_script.cxx
@@ -245,11 +245,11 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
}
- String type, subType;
+ OUString type, subType;
INetContentTypeParameterList params;
if (INetContentTypes::parse( mediaType, type, subType, &params ))
{
- if (type.EqualsIgnoreCaseAscii("application"))
+ if (type.equalsIgnoreAsciiCaseAscii("application"))
{
OUString dialogURL( makeURL( url, OUSTR("dialog.xlb") ) );
if (! create_ucb_content(
@@ -257,7 +257,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
dialogURL = OUString();
}
- if (subType.EqualsIgnoreCaseAscii("vnd.sun.star.basic-library"))
+ if (subType.equalsIgnoreAsciiCaseAscii("vnd.sun.star.basic-library"))
{
OUString scriptURL( makeURL( url, OUSTR("script.xlb")));
if (! create_ucb_content(
@@ -269,7 +269,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
this, url, xCmdEnv, scriptURL,
dialogURL, bRemoved, identifier);
}
- else if (subType.EqualsIgnoreCaseAscii(
+ else if (subType.equalsIgnoreAsciiCaseAscii(
"vnd.sun.star.dialog-library")) {
return new PackageImpl(
this, url, xCmdEnv,
diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
index 7445cfa9ec19..f28b12cad32f 100644
--- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
+++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
@@ -219,13 +219,13 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
}
- String type, subType;
+ OUString type, subType;
INetContentTypeParameterList params;
if (INetContentTypes::parse( mediaType, type, subType, &params ))
{
- if (type.EqualsIgnoreCaseAscii("application"))
+ if (type.equalsIgnoreAsciiCaseAscii("application"))
{
- if (subType.EqualsIgnoreCaseAscii("vnd.sun.star.framework-script"))
+ if (subType.equalsIgnoreAsciiCaseAscii("vnd.sun.star.framework-script"))
{
OUString lang = OUString("Script");
OUString sParcelDescURL = makeURL(