Kaydet (Commit) ca6d048e authored tarafından Chr. Rossmanith's avatar Chr. Rossmanith

Remove RTL_CONSTASCII_USTRINGPARAM in ucb/ucbhelper

Change-Id: I7419a328012962b6b72d2596df034ff912fc12cd
üst 4b289045
...@@ -111,8 +111,7 @@ UcbCommandEnvironment::getSupportedServiceNames() ...@@ -111,8 +111,7 @@ UcbCommandEnvironment::getSupportedServiceNames()
// static // static
rtl::OUString UcbCommandEnvironment::getImplementationName_Static() rtl::OUString UcbCommandEnvironment::getImplementationName_Static()
{ {
return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( return rtl::OUString( "com.sun.star.comp.ucb.CommandEnvironment" );
"com.sun.star.comp.ucb.CommandEnvironment" ) );
} }
//========================================================================= //=========================================================================
...@@ -121,9 +120,7 @@ uno::Sequence< rtl::OUString > ...@@ -121,9 +120,7 @@ uno::Sequence< rtl::OUString >
UcbCommandEnvironment::getSupportedServiceNames_Static() UcbCommandEnvironment::getSupportedServiceNames_Static()
{ {
uno::Sequence< rtl::OUString > aSNS( 1 ); uno::Sequence< rtl::OUString > aSNS( 1 );
aSNS.getArray()[ 0 ] aSNS.getArray()[ 0 ] = "com.sun.star.ucb.CommandEnvironment";
= rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.ucb.CommandEnvironment" ) );
return aSNS; return aSNS;
} }
......
...@@ -235,24 +235,22 @@ rtl::OUString Regexp::getRegexp(bool bReverse) const ...@@ -235,24 +235,22 @@ rtl::OUString Regexp::getRegexp(bool bReverse) const
switch (m_eKind) switch (m_eKind)
{ {
case KIND_PREFIX: case KIND_PREFIX:
aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("(.*)")); aBuffer.append("(.*)");
break; break;
case KIND_AUTHORITY: case KIND_AUTHORITY:
aBuffer. aBuffer.append("(([/?#].*)?)");
appendAscii(RTL_CONSTASCII_STRINGPARAM("(([/?#].*)?)"));
break; break;
case KIND_DOMAIN: case KIND_DOMAIN:
aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("([^/?#]")); aBuffer.append("([^/?#]");
aBuffer.append(sal_Unicode(m_bEmptyDomain ? '*' : '+')); aBuffer.append(sal_Unicode(m_bEmptyDomain ? '*' : '+'));
if (!m_aInfix.isEmpty()) if (!m_aInfix.isEmpty())
appendStringLiteral(&aBuffer, m_aInfix); appendStringLiteral(&aBuffer, m_aInfix);
aBuffer. aBuffer.append("([/?#].*)?)");
appendAscii(RTL_CONSTASCII_STRINGPARAM("([/?#].*)?)"));
break; break;
} }
aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("->")); aBuffer.append("->");
if (bReverse) if (bReverse)
{ {
if (!m_aPrefix.isEmpty()) if (!m_aPrefix.isEmpty())
...@@ -263,7 +261,7 @@ rtl::OUString Regexp::getRegexp(bool bReverse) const ...@@ -263,7 +261,7 @@ rtl::OUString Regexp::getRegexp(bool bReverse) const
if (!m_aReversePrefix.isEmpty()) if (!m_aReversePrefix.isEmpty())
appendStringLiteral(&aBuffer, m_aReversePrefix); appendStringLiteral(&aBuffer, m_aReversePrefix);
} }
aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("\\1")); aBuffer.append("\\1");
return aBuffer.makeStringAndClear(); return aBuffer.makeStringAndClear();
} }
else if (m_eKind == KIND_PREFIX && isScheme(m_aPrefix, true)) else if (m_eKind == KIND_PREFIX && isScheme(m_aPrefix, true))
...@@ -276,19 +274,19 @@ rtl::OUString Regexp::getRegexp(bool bReverse) const ...@@ -276,19 +274,19 @@ rtl::OUString Regexp::getRegexp(bool bReverse) const
switch (m_eKind) switch (m_eKind)
{ {
case KIND_PREFIX: case KIND_PREFIX:
aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM(".*")); aBuffer.append(".*");
break; break;
case KIND_AUTHORITY: case KIND_AUTHORITY:
aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("([/?#].*)?")); aBuffer.append("([/?#].*)?");
break; break;
case KIND_DOMAIN: case KIND_DOMAIN:
aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("[^/?#]")); aBuffer.append("[^/?#]");
aBuffer.append(sal_Unicode(m_bEmptyDomain ? '*' : '+')); aBuffer.append(sal_Unicode(m_bEmptyDomain ? '*' : '+'));
if (!m_aInfix.isEmpty()) if (!m_aInfix.isEmpty())
appendStringLiteral(&aBuffer, m_aInfix); appendStringLiteral(&aBuffer, m_aInfix);
aBuffer.appendAscii(RTL_CONSTASCII_STRINGPARAM("([/?#].*)?")); aBuffer.append("([/?#].*)?");
break; break;
} }
return aBuffer.makeStringAndClear(); return aBuffer.makeStringAndClear();
...@@ -361,8 +359,7 @@ Regexp Regexp::parse(rtl::OUString const & rRegexp) ...@@ -361,8 +359,7 @@ Regexp Regexp::parse(rtl::OUString const & rRegexp)
// where <scheme> is as defined in RFC 2396: // where <scheme> is as defined in RFC 2396:
if (isScheme(rRegexp, false)) if (isScheme(rRegexp, false))
return Regexp(Regexp::KIND_PREFIX, return Regexp(Regexp::KIND_PREFIX,
rRegexp rRegexp + ":",
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":")),
false, false,
rtl::OUString(), rtl::OUString(),
false, false,
......
...@@ -136,7 +136,7 @@ namespace cmis ...@@ -136,7 +136,7 @@ namespace cmis
xContent, uno::UNO_QUERY_THROW ); xContent, uno::UNO_QUERY_THROW );
sal_Int32 nCmdId( xCmdProc->createCommandIdentifier() ); sal_Int32 nCmdId( xCmdProc->createCommandIdentifier() );
ucb::Command aCmd; ucb::Command aCmd;
aCmd.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertyValues")); aCmd.Name = rtl::OUString("getPropertyValues");
aCmd.Handle = -1; aCmd.Handle = -1;
aCmd.Argument <<= getResultSet()->getProperties(); aCmd.Argument <<= getResultSet()->getProperties();
uno::Any aResult( xCmdProc->execute( uno::Any aResult( xCmdProc->execute(
......
...@@ -117,10 +117,8 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, ...@@ -117,10 +117,8 @@ XTYPEPROVIDER_IMPL_3( ContentProvider,
com::sun::star::ucb::XContentProvider ); com::sun::star::ucb::XContentProvider );
XSERVICEINFO_IMPL_1_CTX( ContentProvider, XSERVICEINFO_IMPL_1_CTX( ContentProvider,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( rtl::OUString("com.sun.star.comp.CmisContentProvider"),
"com.sun.star.comp.CmisContentProvider" )), rtl::OUString("com.sun.star.ucb.CmisContentProvider") );
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"com.sun.star.ucb.CmisContentProvider" )) );
ONE_INSTANCE_SERVICE_FACTORY_IMPL( ContentProvider ); ONE_INSTANCE_SERVICE_FACTORY_IMPL( ContentProvider );
......
...@@ -84,7 +84,7 @@ namespace cmis ...@@ -84,7 +84,7 @@ namespace cmis
uno::Any RepoContent::getBadArgExcept() uno::Any RepoContent::getBadArgExcept()
{ {
return uno::makeAny( lang::IllegalArgumentException( return uno::makeAny( lang::IllegalArgumentException(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wrong argument type!")), rtl::OUString("Wrong argument type!"),
static_cast< cppu::OWeakObject * >( this ), -1) ); static_cast< cppu::OWeakObject * >( this ), -1) );
} }
...@@ -203,16 +203,16 @@ namespace cmis ...@@ -203,16 +203,16 @@ namespace cmis
{ {
static const beans::Property aGenericProperties[] = static const beans::Property aGenericProperties[] =
{ {
beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsDocument" ) ), beans::Property( rtl::OUString( "IsDocument" ),
-1, getCppuBooleanType(), -1, getCppuBooleanType(),
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ),
beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) ), beans::Property( rtl::OUString( "IsFolder" ),
-1, getCppuBooleanType(), -1, getCppuBooleanType(),
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ),
beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ), beans::Property( rtl::OUString( "Title" ),
-1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ), -1, getCppuType( static_cast< const rtl::OUString * >( 0 ) ),
beans::PropertyAttribute::BOUND ), beans::PropertyAttribute::BOUND ),
beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsReadOnly" ) ), beans::Property( rtl::OUString( "IsReadOnly" ),
-1, getCppuBooleanType(), -1, getCppuBooleanType(),
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ),
}; };
...@@ -228,21 +228,21 @@ namespace cmis ...@@ -228,21 +228,21 @@ namespace cmis
{ {
// Required commands // Required commands
ucb::CommandInfo ucb::CommandInfo
( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getCommandInfo" ) ), ( rtl::OUString( "getCommandInfo" ),
-1, getCppuVoidType() ), -1, getCppuVoidType() ),
ucb::CommandInfo ucb::CommandInfo
( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getPropertySetInfo" ) ), ( rtl::OUString( "getPropertySetInfo" ),
-1, getCppuVoidType() ), -1, getCppuVoidType() ),
ucb::CommandInfo ucb::CommandInfo
( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "getPropertyValues" ) ), ( rtl::OUString( "getPropertyValues" ),
-1, getCppuType( static_cast<uno::Sequence< beans::Property > * >( 0 ) ) ), -1, getCppuType( static_cast<uno::Sequence< beans::Property > * >( 0 ) ) ),
ucb::CommandInfo ucb::CommandInfo
( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "setPropertyValues" ) ), ( rtl::OUString( "setPropertyValues" ),
-1, getCppuType( static_cast<uno::Sequence< beans::PropertyValue > * >( 0 ) ) ), -1, getCppuType( static_cast<uno::Sequence< beans::PropertyValue > * >( 0 ) ) ),
// Optional standard commands // Optional standard commands
ucb::CommandInfo ucb::CommandInfo
( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ), ( rtl::OUString( "open" ),
-1, getCppuType( static_cast<ucb::OpenCommandArgument2 * >( 0 ) ) ), -1, getCppuType( static_cast<ucb::OpenCommandArgument2 * >( 0 ) ) ),
}; };
...@@ -280,20 +280,20 @@ namespace cmis ...@@ -280,20 +280,20 @@ namespace cmis
rtl::OUString SAL_CALL RepoContent::getImplementationName() throw( uno::RuntimeException ) rtl::OUString SAL_CALL RepoContent::getImplementationName() throw( uno::RuntimeException )
{ {
return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.CmisRepoContent")); return rtl::OUString("com.sun.star.comp.CmisRepoContent");
} }
uno::Sequence< rtl::OUString > SAL_CALL RepoContent::getSupportedServiceNames() uno::Sequence< rtl::OUString > SAL_CALL RepoContent::getSupportedServiceNames()
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{ {
uno::Sequence< rtl::OUString > aSNS( 1 ); uno::Sequence< rtl::OUString > aSNS( 1 );
aSNS.getArray()[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.Content")); aSNS.getArray()[ 0 ] = "com.sun.star.ucb.Content";
return aSNS; return aSNS;
} }
rtl::OUString SAL_CALL RepoContent::getContentType() throw( uno::RuntimeException ) rtl::OUString SAL_CALL RepoContent::getContentType() throw( uno::RuntimeException )
{ {
return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMIS_REPO_TYPE ) ); return rtl::OUString( CMIS_REPO_TYPE );
} }
uno::Any SAL_CALL RepoContent::execute( uno::Any SAL_CALL RepoContent::execute(
......
...@@ -44,7 +44,7 @@ getLocalFileURL() SAL_THROW((uno::RuntimeException)) ...@@ -44,7 +44,7 @@ getLocalFileURL() SAL_THROW((uno::RuntimeException))
// "vnd.sun.star.wfs:///"), this code should query all relevant UCPs for // "vnd.sun.star.wfs:///"), this code should query all relevant UCPs for
// their com.sun.star.ucb.XFileIdentifierConverter.getFileProviderLocality // their com.sun.star.ucb.XFileIdentifierConverter.getFileProviderLocality
// and return the most local one: // and return the most local one:
return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///")); return rtl::OUString("file:///");
} }
//============================================================================ //============================================================================
......
...@@ -52,9 +52,7 @@ registerAtUcb( ...@@ -52,9 +52,7 @@ registerAtUcb(
OSL_ENSURE(rServiceFactory.is(), OSL_ENSURE(rServiceFactory.is(),
"ucb::registerAtUcb(): No service factory"); "ucb::registerAtUcb(): No service factory");
bool bNoProxy bool bNoProxy = rArguments.compareTo("{noproxy}") == 0;
= rArguments.compareToAscii(RTL_CONSTASCII_STRINGPARAM("{noproxy}"))
== 0;
rtl::OUString rtl::OUString
aProviderArguments(bNoProxy ? aProviderArguments(bNoProxy ?
rArguments. rArguments.
...@@ -70,7 +68,7 @@ registerAtUcb( ...@@ -70,7 +68,7 @@ registerAtUcb(
{ {
uno::Reference< beans::XPropertySet > xFactoryProperties( rServiceFactory, uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xFactoryProperties( rServiceFactory, uno::UNO_QUERY_THROW );
uno::Reference< uno::XComponentContext > xContext = uno::Reference< uno::XComponentContext >( uno::Reference< uno::XComponentContext > xContext = uno::Reference< uno::XComponentContext >(
xFactoryProperties->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) ) ), xFactoryProperties->getPropertyValue( ::rtl::OUString( "DefaultContext" ) ),
uno::UNO_QUERY ); uno::UNO_QUERY );
xProxyFactory xProxyFactory
= uno::Reference< ucb::XContentProviderFactory >( = uno::Reference< ucb::XContentProviderFactory >(
......
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