Remove RTL_CONSTASCII_USTRINGPARAM in ucb/ucbhelper

Change-Id: I7419a328012962b6b72d2596df034ff912fc12cd
This commit is contained in:
Chr. Rossmanith
2013-03-12 21:01:14 +01:00
parent 4b2890453b
commit ca6d048e81
8 changed files with 77 additions and 88 deletions

View File

@@ -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 >
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;
} }

View File

@@ -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
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
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)
// 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,

View File

@@ -425,7 +425,7 @@ namespace cmis
uno::Any Content::getBadArgExcept() uno::Any Content::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) );
} }
@@ -961,8 +961,7 @@ namespace cmis
ucbhelper::cancelCommandExecution( ucbhelper::cancelCommandExecution(
uno::makeAny( uno::makeAny(
ucb::InteractiveBadTransferURLException( ucb::InteractiveBadTransferURLException(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( rtl::OUString("Unsupported URL scheme!"),
"Unsupported URL scheme!" )),
static_cast< cppu::OWeakObject * >( this ) ) ), static_cast< cppu::OWeakObject * >( this ) ) ),
xEnv ); xEnv );
} }
@@ -1161,14 +1160,14 @@ namespace cmis
for ( sal_Int32 n = 0; n < nCount; ++n ) for ( sal_Int32 n = 0; n < nCount; ++n )
{ {
const beans::PropertyValue& rValue = pValues[ n ]; const beans::PropertyValue& rValue = pValues[ n ];
if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ContentType" ) ) || if ( rValue.Name == "ContentType" ||
rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) || rValue.Name == "MediaType" ||
rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) || rValue.Name == "IsDocument" ||
rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) ) || rValue.Name == "IsFolder" ||
rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) || rValue.Name == "Size" ||
rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CreatableContentsInfo" ) ) ) rValue.Name == "CreatableContentsInfo" )
{ {
lang::IllegalAccessException e ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only!")), lang::IllegalAccessException e ( rtl::OUString("Property is read-only!"),
static_cast< cppu::OWeakObject* >( this ) ); static_cast< cppu::OWeakObject* >( this ) );
aRet[ n ] <<= e; aRet[ n ] <<= e;
} }
@@ -1178,7 +1177,7 @@ namespace cmis
if (!( rValue.Value >>= aNewTitle )) if (!( rValue.Value >>= aNewTitle ))
{ {
aRet[ n ] <<= beans::IllegalTypeException aRet[ n ] <<= beans::IllegalTypeException
( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property value has wrong type!")), ( rtl::OUString("Property value has wrong type!"),
static_cast< cppu::OWeakObject * >( this ) ); static_cast< cppu::OWeakObject * >( this ) );
continue; continue;
} }
@@ -1186,7 +1185,7 @@ namespace cmis
if ( aNewTitle.getLength() <= 0 ) if ( aNewTitle.getLength() <= 0 )
{ {
aRet[ n ] <<= lang::IllegalArgumentException aRet[ n ] <<= lang::IllegalArgumentException
( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Empty title not allowed!")), ( rtl::OUString("Empty title not allowed!"),
static_cast< cppu::OWeakObject * >( this ), -1 ); static_cast< cppu::OWeakObject * >( this ), -1 );
continue; continue;
@@ -1198,7 +1197,7 @@ namespace cmis
else else
{ {
SAL_INFO( "cmisucp", "Couln't set property: " << rValue.Name ); SAL_INFO( "cmisucp", "Couln't set property: " << rValue.Name );
lang::IllegalAccessException e ( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Property is read-only!")), lang::IllegalAccessException e ( rtl::OUString("Property is read-only!"),
static_cast< cppu::OWeakObject* >( this ) ); static_cast< cppu::OWeakObject* >( this ) );
aRet[ n ] <<= e; aRet[ n ] <<= e;
} }
@@ -1272,52 +1271,52 @@ 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( "TitleOnServer" ) ), beans::Property( rtl::OUString( "TitleOnServer" ),
-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 ),
beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateCreated" ) ), beans::Property( rtl::OUString( "DateCreated" ),
-1, getCppuType( static_cast< const util::DateTime * >( 0 ) ), -1, getCppuType( static_cast< const util::DateTime * >( 0 ) ),
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ),
beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateModified" ) ), beans::Property( rtl::OUString( "DateModified" ),
-1, getCppuType( static_cast< const util::DateTime * >( 0 ) ), -1, getCppuType( static_cast< const util::DateTime * >( 0 ) ),
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ),
beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Size" ) ), beans::Property( rtl::OUString( "Size" ),
-1, getCppuType( static_cast< const sal_Int64 * >( 0 ) ), -1, getCppuType( static_cast< const sal_Int64 * >( 0 ) ),
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ),
beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CreatableContentsInfo" ) ), beans::Property( rtl::OUString( "CreatableContentsInfo" ),
-1, getCppuType( static_cast< const uno::Sequence< ucb::ContentInfo > * >( 0 ) ), -1, getCppuType( static_cast< const uno::Sequence< ucb::ContentInfo > * >( 0 ) ),
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ),
beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ), beans::Property( rtl::OUString( "MediaType" ),
-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( "CmisPropertiesValues" ) ), beans::Property( rtl::OUString( "CmisPropertiesValues" ),
-1, getCppuType( static_cast< const beans::PropertyValues * >( 0 ) ), -1, getCppuType( static_cast< const beans::PropertyValues * >( 0 ) ),
beans::PropertyAttribute::BOUND ), beans::PropertyAttribute::BOUND ),
beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CmisPropertiesDisplayNames" ) ), beans::Property( rtl::OUString( "CmisPropertiesDisplayNames" ),
-1, getCppuType( static_cast< const beans::PropertyValues * >( 0 ) ), -1, getCppuType( static_cast< const beans::PropertyValues * >( 0 ) ),
beans::PropertyAttribute::BOUND ), beans::PropertyAttribute::BOUND ),
beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsVersionable" ) ), beans::Property( rtl::OUString( "IsVersionable" ),
-1, getCppuBooleanType(), -1, getCppuBooleanType(),
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ),
beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CanCheckOut" ) ), beans::Property( rtl::OUString( "CanCheckOut" ),
-1, getCppuBooleanType(), -1, getCppuBooleanType(),
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ),
beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CanCancelCheckOut" ) ), beans::Property( rtl::OUString( "CanCancelCheckOut" ),
-1, getCppuBooleanType(), -1, getCppuBooleanType(),
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ),
beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CanCheckIn" ) ), beans::Property( rtl::OUString( "CanCheckIn" ),
-1, getCppuBooleanType(), -1, getCppuBooleanType(),
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ), beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ),
}; };
@@ -1333,27 +1332,27 @@ 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( "delete" ) ), ( rtl::OUString( "delete" ),
-1, getCppuBooleanType() ), -1, getCppuBooleanType() ),
ucb::CommandInfo ucb::CommandInfo
( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "insert" ) ), ( rtl::OUString( "insert" ),
-1, getCppuType( static_cast<ucb::InsertCommandArgument2 * >( 0 ) ) ), -1, getCppuType( static_cast<ucb::InsertCommandArgument2 * >( 0 ) ) ),
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 ) ) ),
// Mandatory CMIS-only commands // Mandatory CMIS-only commands
@@ -1364,10 +1363,10 @@ namespace cmis
// Folder Only, omitted if not a folder // Folder Only, omitted if not a folder
ucb::CommandInfo ucb::CommandInfo
( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "transfer" ) ), ( rtl::OUString( "transfer" ),
-1, getCppuType( static_cast<ucb::TransferInfo * >( 0 ) ) ), -1, getCppuType( static_cast<ucb::TransferInfo * >( 0 ) ) ),
ucb::CommandInfo ucb::CommandInfo
( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "createNewContent" ) ), ( rtl::OUString( "createNewContent" ),
-1, getCppuType( static_cast<ucb::ContentInfo * >( 0 ) ) ) -1, getCppuType( static_cast<ucb::ContentInfo * >( 0 ) ) )
}; };
@@ -1446,22 +1445,22 @@ namespace cmis
rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException ) rtl::OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException )
{ {
return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.CmisContent")); return rtl::OUString("com.sun.star.comp.CmisContent");
} }
uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames() uno::Sequence< rtl::OUString > SAL_CALL Content::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.CmisContent")); aSNS.getArray()[ 0 ] = "com.sun.star.ucb.CmisContent";
return aSNS; return aSNS;
} }
rtl::OUString SAL_CALL Content::getContentType() throw( uno::RuntimeException ) rtl::OUString SAL_CALL Content::getContentType() throw( uno::RuntimeException )
{ {
return isFolder( uno::Reference< ucb::XCommandEnvironment >() ) return isFolder( uno::Reference< ucb::XCommandEnvironment >() )
? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( CMIS_FOLDER_TYPE )) ? rtl::OUString(CMIS_FOLDER_TYPE)
: rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( CMIS_FILE_TYPE )); : rtl::OUString(CMIS_FILE_TYPE);
} }
uno::Any SAL_CALL Content::execute( uno::Any SAL_CALL Content::execute(
@@ -1505,7 +1504,7 @@ namespace cmis
ucbhelper::cancelCommandExecution ( getBadArgExcept (), xEnv ); ucbhelper::cancelCommandExecution ( getBadArgExcept (), xEnv );
aRet <<= setPropertyValues( aProperties, xEnv ); aRet <<= setPropertyValues( aProperties, xEnv );
} }
else if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "createNewContent" ) ) else if (aCommand.Name == "createNewContent"
&& isFolder( xEnv ) ) && isFolder( xEnv ) )
{ {
ucb::ContentInfo arg; ucb::ContentInfo arg;
@@ -1673,19 +1672,19 @@ namespace cmis
// Minimum set of props we really need // Minimum set of props we really need
uno::Sequence< beans::Property > props( 1 ); uno::Sequence< beans::Property > props( 1 );
props[0] = beans::Property( props[0] = beans::Property(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")), rtl::OUString("Title"),
-1, -1,
getCppuType( static_cast< rtl::OUString* >( 0 ) ), getCppuType( static_cast< rtl::OUString* >( 0 ) ),
beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::BOUND ); beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::BOUND );
// file // file
seq[0].Type = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( CMIS_FILE_TYPE )); seq[0].Type = rtl::OUString(CMIS_FILE_TYPE);
seq[0].Attributes = ( ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM | seq[0].Attributes = ( ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM |
ucb::ContentInfoAttribute::KIND_DOCUMENT ); ucb::ContentInfoAttribute::KIND_DOCUMENT );
seq[0].Properties = props; seq[0].Properties = props;
// folder // folder
seq[1].Type = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( CMIS_FOLDER_TYPE )); seq[1].Type = rtl::OUString(CMIS_FOLDER_TYPE);
seq[1].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER; seq[1].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER;
seq[1].Properties = props; seq[1].Properties = props;

View File

@@ -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(

View File

@@ -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 );

View File

@@ -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
{ {
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
{ {
// 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
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(

View File

@@ -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:///");
} }
//============================================================================ //============================================================================

View File

@@ -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(
{ {
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 >(