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