[Libreoffice-commits] core.git: 4 commits - ucbhelper/source ucb/source unodevtools/source unotest/source unotools/source
Chr. Rossmanith
ChrRossmanith at gmx.de
Tue Mar 12 13:03:37 PDT 2013
ucb/source/core/cmdenv.cxx | 7
ucb/source/regexp/regexp.cxx | 25 +-
ucb/source/ucp/cmis/cmis_content.cxx | 91 ++++------
ucb/source/ucp/cmis/cmis_datasupplier.cxx | 2
ucb/source/ucp/cmis/cmis_provider.cxx | 6
ucb/source/ucp/cmis/cmis_repo_content.cxx | 26 +-
ucbhelper/source/client/fileidentifierconverter.cxx | 2
ucbhelper/source/provider/registerucb.cxx | 6
unodevtools/source/skeletonmaker/cpptypemaker.cxx | 2
unodevtools/source/skeletonmaker/javatypemaker.cxx | 4
unodevtools/source/skeletonmaker/skeletonmaker.cxx | 4
unodevtools/source/unodevtools/options.cxx | 10 -
unodevtools/source/unodevtools/typeblob.cxx | 23 +-
unodevtools/source/unodevtools/typemanager.cxx | 25 +-
unotest/source/cpp/filters-test.cxx | 6
unotest/source/cpp/getargument.cxx | 2
unotest/source/cpp/gettestargument.cxx | 2
unotest/source/cpp/macros_test.cxx | 2
unotest/source/cpp/officeconnection.cxx | 47 +----
unotest/source/cpp/toabsolutefileurl.cxx | 18 -
unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx | 4
unotools/source/i18n/localedatawrapper.cxx | 43 +---
unotools/source/ucbhelper/ucblockbytes.cxx | 16 -
unotools/source/ucbhelper/xtempfile.cxx | 4
24 files changed, 164 insertions(+), 213 deletions(-)
New commits:
commit ca6d048e81cd079e66f73db93c4758b4df53cc21
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date: Tue Mar 12 21:01:14 2013 +0100
Remove RTL_CONSTASCII_USTRINGPARAM in ucb/ucbhelper
Change-Id: I7419a328012962b6b72d2596df034ff912fc12cd
diff --git a/ucb/source/core/cmdenv.cxx b/ucb/source/core/cmdenv.cxx
index 34ea28a..43799db 100644
--- a/ucb/source/core/cmdenv.cxx
+++ b/ucb/source/core/cmdenv.cxx
@@ -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;
}
diff --git a/ucb/source/regexp/regexp.cxx b/ucb/source/regexp/regexp.cxx
index db3934b..58ba065 100644
--- a/ucb/source/regexp/regexp.cxx
+++ b/ucb/source/regexp/regexp.cxx
@@ -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,
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 2a78b4e..7b9dbfc 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -425,7 +425,7 @@ namespace cmis
uno::Any Content::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) );
}
@@ -961,8 +961,7 @@ namespace cmis
ucbhelper::cancelCommandExecution(
uno::makeAny(
ucb::InteractiveBadTransferURLException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "Unsupported URL scheme!" )),
+ rtl::OUString("Unsupported URL scheme!"),
static_cast< cppu::OWeakObject * >( this ) ) ),
xEnv );
}
@@ -1161,14 +1160,14 @@ namespace cmis
for ( sal_Int32 n = 0; n < nCount; ++n )
{
const beans::PropertyValue& rValue = pValues[ n ];
- if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ContentType" ) ) ||
- rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MediaType" ) ) ||
- rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) ||
- rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) ) ||
- rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Size" ) ) ||
- rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CreatableContentsInfo" ) ) )
+ if ( rValue.Name == "ContentType" ||
+ rValue.Name == "MediaType" ||
+ rValue.Name == "IsDocument" ||
+ rValue.Name == "IsFolder" ||
+ rValue.Name == "Size" ||
+ 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 ) );
aRet[ n ] <<= e;
}
@@ -1178,7 +1177,7 @@ namespace cmis
if (!( rValue.Value >>= aNewTitle ))
{
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 ) );
continue;
}
@@ -1186,7 +1185,7 @@ namespace cmis
if ( aNewTitle.getLength() <= 0 )
{
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 );
continue;
@@ -1198,7 +1197,7 @@ namespace cmis
else
{
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 ) );
aRet[ n ] <<= e;
}
@@ -1272,52 +1271,52 @@ 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( "TitleOnServer" ) ),
+ beans::Property( rtl::OUString( "TitleOnServer" ),
-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 ),
- beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DateCreated" ) ),
+ beans::Property( rtl::OUString( "DateCreated" ),
-1, getCppuType( static_cast< const util::DateTime * >( 0 ) ),
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 ) ),
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 ) ),
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 ) ),
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 ) ),
beans::PropertyAttribute::BOUND ),
- beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CmisPropertiesValues" ) ),
+ beans::Property( rtl::OUString( "CmisPropertiesValues" ),
-1, getCppuType( static_cast< const beans::PropertyValues * >( 0 ) ),
beans::PropertyAttribute::BOUND ),
- beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CmisPropertiesDisplayNames" ) ),
+ beans::Property( rtl::OUString( "CmisPropertiesDisplayNames" ),
-1, getCppuType( static_cast< const beans::PropertyValues * >( 0 ) ),
beans::PropertyAttribute::BOUND ),
- beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsVersionable" ) ),
+ beans::Property( rtl::OUString( "IsVersionable" ),
-1, getCppuBooleanType(),
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ),
- beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CanCheckOut" ) ),
+ beans::Property( rtl::OUString( "CanCheckOut" ),
-1, getCppuBooleanType(),
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ),
- beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CanCancelCheckOut" ) ),
+ beans::Property( rtl::OUString( "CanCancelCheckOut" ),
-1, getCppuBooleanType(),
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ),
- beans::Property( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "CanCheckIn" ) ),
+ beans::Property( rtl::OUString( "CanCheckIn" ),
-1, getCppuBooleanType(),
beans::PropertyAttribute::BOUND | beans::PropertyAttribute::READONLY ),
};
@@ -1333,27 +1332,27 @@ 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( "delete" ) ),
+ ( rtl::OUString( "delete" ),
-1, getCppuBooleanType() ),
ucb::CommandInfo
- ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "insert" ) ),
+ ( rtl::OUString( "insert" ),
-1, getCppuType( static_cast<ucb::InsertCommandArgument2 * >( 0 ) ) ),
ucb::CommandInfo
- ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "open" ) ),
+ ( rtl::OUString( "open" ),
-1, getCppuType( static_cast<ucb::OpenCommandArgument2 * >( 0 ) ) ),
// Mandatory CMIS-only commands
@@ -1364,10 +1363,10 @@ namespace cmis
// Folder Only, omitted if not a folder
ucb::CommandInfo
- ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "transfer" ) ),
+ ( rtl::OUString( "transfer" ),
-1, getCppuType( static_cast<ucb::TransferInfo * >( 0 ) ) ),
ucb::CommandInfo
- ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "createNewContent" ) ),
+ ( rtl::OUString( "createNewContent" ),
-1, getCppuType( static_cast<ucb::ContentInfo * >( 0 ) ) )
};
@@ -1446,22 +1445,22 @@ namespace cmis
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()
throw( uno::RuntimeException )
{
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;
}
rtl::OUString SAL_CALL Content::getContentType() throw( uno::RuntimeException )
{
return isFolder( uno::Reference< ucb::XCommandEnvironment >() )
- ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( CMIS_FOLDER_TYPE ))
- : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( CMIS_FILE_TYPE ));
+ ? rtl::OUString(CMIS_FOLDER_TYPE)
+ : rtl::OUString(CMIS_FILE_TYPE);
}
uno::Any SAL_CALL Content::execute(
@@ -1505,7 +1504,7 @@ namespace cmis
ucbhelper::cancelCommandExecution ( getBadArgExcept (), xEnv );
aRet <<= setPropertyValues( aProperties, xEnv );
}
- else if (aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "createNewContent" ) )
+ else if (aCommand.Name == "createNewContent"
&& isFolder( xEnv ) )
{
ucb::ContentInfo arg;
@@ -1673,19 +1672,19 @@ namespace cmis
// Minimum set of props we really need
uno::Sequence< beans::Property > props( 1 );
props[0] = beans::Property(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")),
+ rtl::OUString("Title"),
-1,
getCppuType( static_cast< rtl::OUString* >( 0 ) ),
beans::PropertyAttribute::MAYBEVOID | beans::PropertyAttribute::BOUND );
// 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 |
ucb::ContentInfoAttribute::KIND_DOCUMENT );
seq[0].Properties = props;
// 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].Properties = props;
diff --git a/ucb/source/ucp/cmis/cmis_datasupplier.cxx b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
index 79de059..9d8b504 100644
--- a/ucb/source/ucp/cmis/cmis_datasupplier.cxx
+++ b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
@@ -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(
diff --git a/ucb/source/ucp/cmis/cmis_provider.cxx b/ucb/source/ucp/cmis/cmis_provider.cxx
index 17c57a4..012e6c7 100644
--- a/ucb/source/ucp/cmis/cmis_provider.cxx
+++ b/ucb/source/ucp/cmis/cmis_provider.cxx
@@ -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 );
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx
index b76514c..18877c8 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx
@@ -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(
diff --git a/ucbhelper/source/client/fileidentifierconverter.cxx b/ucbhelper/source/client/fileidentifierconverter.cxx
index 4e0e288..1f53b4a 100644
--- a/ucbhelper/source/client/fileidentifierconverter.cxx
+++ b/ucbhelper/source/client/fileidentifierconverter.cxx
@@ -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:///");
}
//============================================================================
diff --git a/ucbhelper/source/provider/registerucb.cxx b/ucbhelper/source/provider/registerucb.cxx
index 8b2e5e0..bc7990d 100644
--- a/ucbhelper/source/provider/registerucb.cxx
+++ b/ucbhelper/source/provider/registerucb.cxx
@@ -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 >(
commit 4b2890453b2a9a99da3d690e6e70bffd711b6810
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date: Tue Mar 12 14:53:20 2013 +0100
Removed RTL_CONSTASCII_STRINGPARAM in unodevtools
Change-Id: I41ea9fe6fcac6cba0e12cd570b9971998717f401
diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
index 689b517..e95b503 100644
--- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
@@ -383,7 +383,7 @@ void printMethods(std::ostream & o,
return;
}
- static OString sd(RTL_CONSTASCII_STRINGPARAM("_"));
+ static OString sd("_");
bool body = !delegate.isEmpty();
bool defaultbody = ((delegate.equals(sd)) ? true : false);
diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx
index e2e4a6d..7e7f86c 100644
--- a/unodevtools/source/skeletonmaker/javatypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx
@@ -376,7 +376,7 @@ void printMethods(std::ostream & o,
}
}
- static OString sd(RTL_CONSTASCII_STRINGPARAM("_"));
+ static OString sd("_");
bool body = !delegate.isEmpty();
bool defaultbody = ((delegate.equals(sd)) ? true : false);
@@ -500,7 +500,7 @@ void printMethods(std::ostream & o,
o << ')';
printExceptionSpecification(o, options, manager, reader, method);
if ( body ) {
- static OUString s(RTL_CONSTASCII_USTRINGPARAM("void"));
+ static OUString s("void");
if ( defaultbody ) {
o << "\n" << indentation << "{\n";
if ( !reader.getMethodReturnTypeName(method).equals(s) ) {
diff --git a/unodevtools/source/skeletonmaker/skeletonmaker.cxx b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
index 1b20636..4884bd4 100644
--- a/unodevtools/source/skeletonmaker/skeletonmaker.cxx
+++ b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
@@ -270,9 +270,9 @@ SAL_IMPLEMENT_MAIN()
// else illegal argument
OUStringBuffer buf( 64 );
- buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("unexpected parameter \""));
+ buf.append("unexpected parameter \"");
buf.append(arg);
- buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("\"!"));
+ buf.append("\"!");
throw RuntimeException(buf.makeStringAndClear(),
Reference< XInterface >());
}
diff --git a/unodevtools/source/unodevtools/options.cxx b/unodevtools/source/unodevtools/options.cxx
index 34ad6db..534e87e 100644
--- a/unodevtools/source/unodevtools/options.cxx
+++ b/unodevtools/source/unodevtools/options.cxx
@@ -43,7 +43,7 @@ sal_Bool readOption( OUString * pValue, const sal_Char * pOpt,
sal_uInt32 * pnIndex, const OUString & aArg)
throw (RuntimeException)
{
- const OUString dash = OUString(RTL_CONSTASCII_USTRINGPARAM("-"));
+ const OUString dash = OUString("-");
if(aArg.indexOf(dash) != 0)
return sal_False;
@@ -61,9 +61,9 @@ sal_Bool readOption( OUString * pValue, const sal_Char * pOpt,
pValue->copy(1).equals(dash))
{
OUStringBuffer buf( 32 );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("incomplete option \"-") );
+ buf.append( "incomplete option \"-" );
buf.appendAscii( pOpt );
- buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" given!") );
+ buf.append( "\" given!" );
throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface >() );
} else {
#if OSL_DEBUG_LEVEL > 1
@@ -96,8 +96,8 @@ sal_Bool readOption( OUString * pValue, const sal_Char * pOpt,
sal_Bool readOption( sal_Bool * pbOpt, const sal_Char * pOpt,
sal_uInt32 * pnIndex, const OUString & aArg)
{
- const OUString dashdash(RTL_CONSTASCII_USTRINGPARAM("--"));
- const OUString dash(RTL_CONSTASCII_USTRINGPARAM("-"));
+ const OUString dashdash("--");
+ const OUString dash("-");
OUString aOpt = OUString::createFromAscii(pOpt);
if((aArg.indexOf(dash) == 0 && aOpt.equalsIgnoreAsciiCase(aArg.copy(1))) ||
diff --git a/unodevtools/source/unodevtools/typeblob.cxx b/unodevtools/source/unodevtools/typeblob.cxx
index b174ba0..e65fdf6 100644
--- a/unodevtools/source/unodevtools/typeblob.cxx
+++ b/unodevtools/source/unodevtools/typeblob.cxx
@@ -67,63 +67,63 @@ void writeConstantData(typereg::Writer& rWriter, sal_uInt16 fieldIndex,
{
case TypeClass_BOOLEAN:
{
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("boolean"));
+ uConstTypeName = "boolean";
constValue.m_type = RT_TYPE_BOOL;
aConstantAny >>= constValue.m_value.aBool;
}
break;
case TypeClass_BYTE:
{
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("byte"));
+ uConstTypeName = "byte";
constValue.m_type = RT_TYPE_BYTE;
aConstantAny >>= constValue.m_value.aByte;
}
break;
case TypeClass_SHORT:
{
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("short"));
+ uConstTypeName = "short";
constValue.m_type = RT_TYPE_INT16;
aConstantAny >>= constValue.m_value.aShort;
}
break;
case TypeClass_UNSIGNED_SHORT:
{
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("unsigned short"));
+ uConstTypeName = "unsigned short";
constValue.m_type = RT_TYPE_UINT16;
aConstantAny >>= constValue.m_value.aUShort;
}
break;
case TypeClass_LONG:
{
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("long"));
+ uConstTypeName = "long";
constValue.m_type = RT_TYPE_INT32;
aConstantAny >>= constValue.m_value.aLong;
}
break;
case TypeClass_UNSIGNED_LONG:
{
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("unsigned long"));
+ uConstTypeName = "unsigned long";
constValue.m_type = RT_TYPE_UINT32;
aConstantAny >>= constValue.m_value.aULong;
}
break;
case TypeClass_FLOAT:
{
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("float"));
+ uConstTypeName = "float";
constValue.m_type = RT_TYPE_FLOAT;
aConstantAny >>= constValue.m_value.aFloat;
}
break;
case TypeClass_DOUBLE:
{
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("double"));
+ uConstTypeName = "double";
constValue.m_type = RT_TYPE_DOUBLE;
aConstantAny >>= constValue.m_value.aDouble;
}
break;
case TypeClass_STRING:
{
- uConstTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("string"));
+ uConstTypeName = "string";
constValue.m_type = RT_TYPE_STRING;
constValue.m_value.aString = ((OUString*)aConstantAny.getValue())->getStr();
}
@@ -224,7 +224,7 @@ void writeAttributeMethodData(
if (seqExcp.getLength() > 0) {
rWriter.setMethodData(methodindex, OUString(), methodmode,
xAttr->getMemberName(),
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("void")),
+ rtl::OUString("void"),
0, (sal_uInt16)seqExcp.getLength());
for (sal_Int32 i=0; i < seqExcp.getLength(); i++) {
@@ -685,8 +685,7 @@ void* getTypeBlob(Reference< XHierarchicalNameAccess > xTDmgr,
writer.setMethodData(i, OUString(), RT_MODE_TWOWAY,
xConstructor->getName(),
- OUString(
- RTL_CONSTASCII_USTRINGPARAM("void")),
+ OUString("void"),
parameterCount, exceptionCount);
if ( !xConstructor->isDefaultConstructor() ) {
diff --git a/unodevtools/source/unodevtools/typemanager.cxx b/unodevtools/source/unodevtools/typemanager.cxx
index 017c265..c25bcac 100644
--- a/unodevtools/source/unodevtools/typemanager.cxx
+++ b/unodevtools/source/unodevtools/typemanager.cxx
@@ -91,19 +91,18 @@ sal_Bool UnoTypeManager::init(
defaultBootstrap_InitialComponentContext();
if ( !xContext.is() ) {
- OUString msg(RTL_CONSTASCII_USTRINGPARAM(
- "internal UNO problem, can't create initial UNO component context"));
+ OUString msg(
+ "internal UNO problem, can't create initial UNO component context");
throw RuntimeException( msg, Reference< XInterface >());
}
Any a = xContext->getValueByName(
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "/singletons/com.sun.star.reflection.theTypeDescriptionManager")));
+ OUString(
+ "/singletons/com.sun.star.reflection.theTypeDescriptionManager"));
a >>= m_pImpl->m_tdmgr;
if ( !m_pImpl->m_tdmgr.is() ) {
- OUString msg(RTL_CONSTASCII_USTRINGPARAM(
- "internal UNO problem, can't get TypeDescriptionManager"));
+ OUString msg("internal UNO problem, can't get TypeDescriptionManager");
throw RuntimeException( msg, Reference< XInterface >());
}
@@ -112,8 +111,7 @@ sal_Bool UnoTypeManager::init(
Reference< XMultiComponentFactory > xServiceManager(
xContext->getServiceManager() );
if ( !xServiceManager.is() ) {
- OUString msg(RTL_CONSTASCII_USTRINGPARAM(
- "internal UNO problem, can't get ServiceManager"));
+ OUString msg("internal UNO problem, can't get ServiceManager");
throw RuntimeException( msg, Reference< XInterface >());
}
@@ -125,8 +123,7 @@ sal_Bool UnoTypeManager::init(
{
Reference< XSimpleRegistry > xReg(
xServiceManager->createInstanceWithContext(
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.registry.SimpleRegistry")),
+ OUString("com.sun.star.registry.SimpleRegistry"),
xContext), UNO_QUERY);
xReg->open(convertToFileUrl(
OUStringToOString(*iter, RTL_TEXTENCODING_UTF8)),
@@ -138,14 +135,12 @@ sal_Bool UnoTypeManager::init(
Reference< XHierarchicalNameAccess > xTDProvider(
xServiceManager->createInstanceWithArgumentsAndContext(
- OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.reflection.TypeDescriptionProvider")),
+ OUString("com.sun.star.reflection.TypeDescriptionProvider"),
seqArgs, xContext),
UNO_QUERY);
if ( !xTDProvider.is() ) {
- OUString msg(RTL_CONSTASCII_USTRINGPARAM(
- "internal UNO problem, can't create local"
- " type description provider"));
+ OUString msg("internal UNO problem, can't create local"
+ " type description provider");
throw RuntimeException( msg, Reference< XInterface >());
}
commit 413fe6c65a8dfbb5549da200f4523ef2347e11f8
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date: Tue Mar 12 14:44:42 2013 +0100
Removed RTL_CONSTASCII_(U)STRINGPARAM in unotest
Change-Id: Iba14ed093bcb97ac1f6996e62e6191cf09574bfd
diff --git a/unotest/source/cpp/filters-test.cxx b/unotest/source/cpp/filters-test.cxx
index 07467a3..376118f 100644
--- a/unotest/source/cpp/filters-test.cxx
+++ b/unotest/source/cpp/filters-test.cxx
@@ -103,9 +103,9 @@ void FiltersTest::recursiveScan(filterStatus nExpected,
continue;
if (
- (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("BID"), nLastSlash+1)) ||
- (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("CVE"), nLastSlash+1)) ||
- (sURL.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("EDB"), nLastSlash+1))
+ (sURL.match("BID", nLastSlash+1)) ||
+ (sURL.match("CVE", nLastSlash+1)) ||
+ (sURL.match("EDB", nLastSlash+1))
)
{
bEncrypted = true;
diff --git a/unotest/source/cpp/getargument.cxx b/unotest/source/cpp/getargument.cxx
index 7b1945d..83a4a02 100644
--- a/unotest/source/cpp/getargument.cxx
+++ b/unotest/source/cpp/getargument.cxx
@@ -33,7 +33,7 @@ namespace detail {
bool getArgument(rtl::OUString const & name, rtl::OUString * value) {
OSL_ASSERT(value != 0);
return rtl::Bootstrap::get(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("arg-")) + name, *value);
+ rtl::OUString("arg-") + name, *value);
}
}
diff --git a/unotest/source/cpp/gettestargument.cxx b/unotest/source/cpp/gettestargument.cxx
index 509c1cf..ed27b44 100644
--- a/unotest/source/cpp/gettestargument.cxx
+++ b/unotest/source/cpp/gettestargument.cxx
@@ -29,7 +29,7 @@ namespace test {
bool getTestArgument(rtl::OUString const & name, rtl::OUString * value) {
return detail::getArgument(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("testarg.")) + name, value);
+ rtl::OUString("testarg.") + name, value);
}
}
diff --git a/unotest/source/cpp/macros_test.cxx b/unotest/source/cpp/macros_test.cxx
index be13798..b33492f 100644
--- a/unotest/source/cpp/macros_test.cxx
+++ b/unotest/source/cpp/macros_test.cxx
@@ -57,7 +57,7 @@ uno::Reference< com::sun::star::lang::XComponent > MacrosTest::loadFromDesktop(c
args[1].State = com::sun::star::beans::PropertyState_DIRECT_VALUE;
}
- uno::Reference< com::sun::star::lang::XComponent> xComponent= xLoader->loadComponentFromURL(rURL, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_default")), 0, args);
+ uno::Reference< com::sun::star::lang::XComponent> xComponent= xLoader->loadComponentFromURL(rURL, rtl::OUString("_default"), 0, args);
rtl::OUString sMessage = rtl::OUString( "loading failed: " ) + rURL;
CPPUNIT_ASSERT_MESSAGE(rtl::OUStringToOString( sMessage, RTL_TEXTENCODING_UTF8 ).getStr( ), xComponent.is());
return xComponent;
diff --git a/unotest/source/cpp/officeconnection.cxx b/unotest/source/cpp/officeconnection.cxx
index 4de06f6..e4b71ea 100644
--- a/unotest/source/cpp/officeconnection.cxx
+++ b/unotest/source/cpp/officeconnection.cxx
@@ -50,45 +50,34 @@ void OfficeConnection::setUp() {
rtl::OUString argSoffice;
CPPUNIT_ASSERT(
detail::getArgument(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("soffice")),
+ rtl::OUString("soffice"),
&argSoffice));
- if (argSoffice.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("path:"))) {
- desc = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pipe,name=")) +
- uniquePipeName(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("oootest")));
- rtl::OUString noquickArg(
- RTL_CONSTASCII_USTRINGPARAM("--quickstart=no"));
- rtl::OUString nofirstArg(
- RTL_CONSTASCII_USTRINGPARAM("--nofirststartwizard"));
- rtl::OUString norestoreArg(RTL_CONSTASCII_USTRINGPARAM("--norestore"));
- rtl::OUString nologoArg(RTL_CONSTASCII_USTRINGPARAM("--nologo"));
+ if (argSoffice.match("path:")) {
+ desc = "pipe,name=" + uniquePipeName(rtl::OUString("oootest"));
+ rtl::OUString noquickArg("--quickstart=no");
+ rtl::OUString nofirstArg("--nofirststartwizard");
+ rtl::OUString norestoreArg("--norestore");
+ rtl::OUString nologoArg("--nologo");
// disable use of the unix standalone splash screen app for the
// tests (probably not needed in combination with --headless?)
- rtl::OUString headlessArg(RTL_CONSTASCII_USTRINGPARAM("--headless"));
- rtl::OUString acceptArg(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("--accept=")) + desc +
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";urp")));
+ rtl::OUString headlessArg("--headless");
+ rtl::OUString acceptArg("--accept=" + desc + ";urp");
rtl::OUString argUser;
CPPUNIT_ASSERT(
- detail::getArgument(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user")), &argUser));
+ detail::getArgument(rtl::OUString("user"), &argUser));
rtl::OUString userArg(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM("-env:UserInstallation=")) +
+ rtl::OUString("-env:UserInstallation=") +
toAbsoluteFileUrl(argUser));
rtl::OUString jreArg(
- RTL_CONSTASCII_USTRINGPARAM("-env:UNO_JAVA_JFW_ENV_JREHOME=true"));
- rtl::OUString classpathArg(
- RTL_CONSTASCII_USTRINGPARAM(
- "-env:UNO_JAVA_JFW_ENV_CLASSPATH=true"));
+ "-env:UNO_JAVA_JFW_ENV_JREHOME=true");
+ rtl::OUString classpathArg("-env:UNO_JAVA_JFW_ENV_CLASSPATH=true");
rtl_uString * args[] = {
noquickArg.pData, nofirstArg.pData, norestoreArg.pData,
nologoArg.pData, headlessArg.pData, acceptArg.pData, userArg.pData,
jreArg.pData, classpathArg.pData };
rtl_uString ** envs = 0;
rtl::OUString argEnv;
- if (detail::getArgument(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("env")), &argEnv))
+ if (detail::getArgument(rtl::OUString("env"), &argEnv))
{
envs = &argEnv.pData;
}
@@ -99,7 +88,7 @@ void OfficeConnection::setUp() {
argSoffice.copy(RTL_CONSTASCII_LENGTH("path:"))).pData,
args, SAL_N_ELEMENTS(args), 0, 0, 0, envs, envs == 0 ? 0 : 1,
&process_));
- } else if (argSoffice.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("connect:"))) {
+ } else if (argSoffice.match("connect:")) {
desc = argSoffice.copy(RTL_CONSTASCII_LENGTH("connect:"));
} else {
CPPUNIT_FAIL(
@@ -111,11 +100,9 @@ void OfficeConnection::setUp() {
context_ =
css::uno::Reference< css::uno::XComponentContext >(
resolver->resolve(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("uno:")) +
+ rtl::OUString("uno:") +
desc +
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- ";urp;StarOffice.ComponentContext"))),
+ rtl::OUString(";urp;StarOffice.ComponentContext")),
css::uno::UNO_QUERY_THROW);
break;
} catch (css::connection::NoConnectException &) {}
diff --git a/unotest/source/cpp/toabsolutefileurl.cxx b/unotest/source/cpp/toabsolutefileurl.cxx
index 966dc3e..67c415e 100644
--- a/unotest/source/cpp/toabsolutefileurl.cxx
+++ b/unotest/source/cpp/toabsolutefileurl.cxx
@@ -34,9 +34,7 @@ rtl::OUString toAbsoluteFileUrl(rtl::OUString const & relativePathname) {
oslProcessError e1 = osl_getProcessWorkingDir(&cwd.pData);
if (e1 != osl_Process_E_None) {
throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "osl_getProcessWorkingDir failed with ")) +
+ (rtl::OUString("osl_getProcessWorkingDir failed with ") +
OUString::number(e1)),
css::uno::Reference< css::uno::XInterface >());
}
@@ -45,11 +43,9 @@ rtl::OUString toAbsoluteFileUrl(rtl::OUString const & relativePathname) {
relativePathname, url);
if (e2 != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "osl::FileBase::getFileURLFromSystemPath(")) +
+ (rtl::OUString("osl::FileBase::getFileURLFromSystemPath(") +
relativePathname +
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(") failed with ")) +
+ rtl::OUString(") failed with ") +
OUString::number(e2)),
css::uno::Reference< css::uno::XInterface >());
}
@@ -57,11 +53,9 @@ rtl::OUString toAbsoluteFileUrl(rtl::OUString const & relativePathname) {
e2 = osl::FileBase::getAbsoluteFileURL(cwd, url, absUrl);
if (e2 != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- (rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "osl::FileBase::getAbsoluteFileURL(")) +
- cwd + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(", ")) + url +
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(") failed with ")) +
+ (rtl::OUString("osl::FileBase::getAbsoluteFileURL(") +
+ cwd + rtl::OUString(", ") + url +
+ rtl::OUString(") failed with ") +
OUString::number(e2)),
css::uno::Reference< css::uno::XInterface >());
}
diff --git a/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx b/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
index 3cd43f4..3265f88 100644
--- a/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
+++ b/unotest/source/cpp/unoexceptionprotector/unoexceptionprotector.cxx
@@ -68,9 +68,7 @@ bool Prot::protect(
context,
CppUnit::Message(
convert(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "An uncaught exception of type "))
+ rtl::OUString("An uncaught exception of type ")
+ a.getValueTypeName()),
convert(e.Message)));
}
commit 32ac07a9296ce2cfaaef57c177b3d88e75b28f23
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date: Tue Mar 12 13:16:41 2013 +0100
Remove RTL_CONSTASCII_STRINGPARAM (unotools)
Change-Id: Id6f9a357431a636c5982964452a0f067e884da96
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index 93c112b..d820c8e 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -339,13 +339,11 @@ void LocaleDataWrapper::invalidateData()
// && !aDebugLocale.EqualsAscii( "es-BR" ) // ?!? Brazil/es
)
{
- rtl::OUStringBuffer aMsg;
- aMsg.appendAscii(RTL_CONSTASCII_STRINGPARAM(
- "ConvertIsoNamesToLanguage/ConvertLanguageToIsoNames: ambiguous locale (MS-LCID?)\n"));
+ rtl::OUStringBuffer aMsg("ConvertIsoNamesToLanguage/ConvertLanguageToIsoNames: ambiguous locale (MS-LCID?)\n");
aMsg.append(aDebugLocale);
- aMsg.appendAscii(RTL_CONSTASCII_STRINGPARAM( " -> 0x"));
+ aMsg.appendAscii(" -> 0x");
aMsg.append(static_cast<sal_Int32>(eLang), 16);
- aMsg.appendAscii(RTL_CONSTASCII_STRINGPARAM( " -> "));
+ aMsg.appendAscii(" -> ");
aMsg.append(aBackLanguageTag.getBcp47());
outputCheckMessage( aMsg.makeStringAndClear() );
}
@@ -610,8 +608,7 @@ void LocaleDataWrapper::getCurrSymbolsImpl()
{
if (areChecksEnabled())
{
- rtl::OUString aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "LocaleDataWrapper::getCurrSymbolsImpl: no default currency"));
+ rtl::OUString aMsg( "LocaleDataWrapper::getCurrSymbolsImpl: no default currency" );
outputCheckMessage( appendLocaleInfo( aMsg ) );
}
nElem = 0;
@@ -720,8 +717,7 @@ void LocaleDataWrapper::getCurrFormatsImpl()
{ // bad luck
if (areChecksEnabled())
{
- rtl::OUString aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "LocaleDataWrapper::getCurrFormatsImpl: no currency formats"));
+ rtl::OUString aMsg( "LocaleDataWrapper::getCurrFormatsImpl: no currency formats" );
outputCheckMessage( appendLocaleInfo( aMsg ) );
}
nCurrPositiveFormat = nCurrNegativeFormat = nCurrFormatDefault;
@@ -769,8 +765,7 @@ void LocaleDataWrapper::getCurrFormatsImpl()
scanCurrFormatImpl( pFormatArr[nElem].Code, 0, nSign, nPar, nNum, nBlank, nSym );
if (areChecksEnabled() && (nNum == -1 || nSym == -1))
{
- rtl::OUString aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "LocaleDataWrapper::getCurrFormatsImpl: CurrPositiveFormat?"));
+ rtl::OUString aMsg( "LocaleDataWrapper::getCurrFormatsImpl: CurrPositiveFormat?" );
outputCheckMessage( appendLocaleInfo( aMsg ) );
}
if (nBlank == -1)
@@ -798,8 +793,7 @@ void LocaleDataWrapper::getCurrFormatsImpl()
scanCurrFormatImpl( rCode, nDelim+1, nSign, nPar, nNum, nBlank, nSym );
if (areChecksEnabled() && (nNum == -1 || nSym == -1 || (nPar == -1 && nSign == -1)))
{
- rtl::OUString aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "LocaleDataWrapper::getCurrFormatsImpl: CurrNegativeFormat?"));
+ rtl::OUString aMsg( "LocaleDataWrapper::getCurrFormatsImpl: CurrNegativeFormat?" );
outputCheckMessage( appendLocaleInfo( aMsg ) );
}
// NOTE: one of nPar or nSign are allowed to be -1
@@ -935,8 +929,7 @@ DateFormat LocaleDataWrapper::scanDateFormatImpl( const rtl::OUString& rCode )
{
if (areChecksEnabled())
{
- rtl::OUString aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "LocaleDataWrapper::scanDateFormat: not all DMY present"));
+ rtl::OUString aMsg( "LocaleDataWrapper::scanDateFormat: not all DMY present" );
outputCheckMessage( appendLocaleInfo( aMsg ) );
}
if (nDay == -1)
@@ -958,8 +951,7 @@ DateFormat LocaleDataWrapper::scanDateFormatImpl( const rtl::OUString& rCode )
{
if (areChecksEnabled())
{
- rtl::OUString aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "LocaleDataWrapper::scanDateFormat: no magic applyable"));
+ rtl::OUString aMsg( "LocaleDataWrapper::scanDateFormat: no magic applyable" );
outputCheckMessage( appendLocaleInfo( aMsg ) );
}
return DMY;
@@ -977,8 +969,7 @@ void LocaleDataWrapper::getDateFormatsImpl()
{ // bad luck
if (areChecksEnabled())
{
- rtl::OUString aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "LocaleDataWrapper::getDateFormatsImpl: no date formats"));
+ rtl::OUString aMsg( "LocaleDataWrapper::getDateFormatsImpl: no date formats" );
outputCheckMessage( appendLocaleInfo( aMsg ) );
}
nDateFormat = nLongDateFormat = DMY;
@@ -1022,16 +1013,14 @@ void LocaleDataWrapper::getDateFormatsImpl()
{
if (areChecksEnabled())
{
- rtl::OUString aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "LocaleDataWrapper::getDateFormatsImpl: no edit"));
+ rtl::OUString aMsg( "LocaleDataWrapper::getDateFormatsImpl: no edit" );
outputCheckMessage( appendLocaleInfo( aMsg ) );
}
if ( nDef == -1 )
{
if (areChecksEnabled())
{
- rtl::OUString aMsg( RTL_CONSTASCII_USTRINGPARAM(
- "LocaleDataWrapper::getDateFormatsImpl: no default"));
+ rtl::OUString aMsg( "LocaleDataWrapper::getDateFormatsImpl: no default" );
outputCheckMessage( appendLocaleInfo( aMsg ) );
}
if ( nMedium != -1 )
@@ -1078,8 +1067,8 @@ void LocaleDataWrapper::getDigitGroupingImpl()
if (!aGrouping[0])
{
i18n::LanguageCountryInfo aLCInfo( getLanguageCountryInfo());
- if (aLCInfo.Country.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("IN")) || // India
- aLCInfo.Country.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("BT")) ) // Bhutan
+ if (aLCInfo.Country.equalsIgnoreAsciiCase("IN") || // India
+ aLCInfo.Country.equalsIgnoreAsciiCase("BT") ) // Bhutan
{
aGrouping[0] = 3;
aGrouping[1] = 2;
@@ -1772,10 +1761,10 @@ rtl::OUString LocaleDataWrapper::appendLocaleInfo(const rtl::OUString& rDebugMsg
rtl::OUStringBuffer aDebugMsg(rDebugMsg);
aDebugMsg.append(static_cast<sal_Unicode>('\n'));
aDebugMsg.append(maLanguageTag.getBcp47());
- aDebugMsg.appendAscii(RTL_CONSTASCII_STRINGPARAM(" requested\n"));
+ aDebugMsg.appendAscii(" requested\n");
LanguageTag aLoaded = getLoadedLanguageTag();
aDebugMsg.append(aLoaded.getBcp47());
- aDebugMsg.appendAscii(RTL_CONSTASCII_STRINGPARAM(" loaded"));
+ aDebugMsg.appendAscii(" loaded");
return aDebugMsg.makeStringAndClear();
}
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index dc4a4a4..086ee70 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -186,7 +186,7 @@ void SAL_CALL UcbPropertiesChangeListener_Impl::propertiesChange ( const Sequenc
for (i = 0; i < n; i++)
{
PropertyChangeEvent evt (rEvent[i]);
- if (evt.PropertyName == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("DocumentHeader")))
+ if (evt.PropertyName == ::rtl::OUString("DocumentHeader"))
{
Sequence<DocumentHeaderField> aHead;
if (evt.NewValue >>= aHead)
@@ -211,12 +211,12 @@ void SAL_CALL UcbPropertiesChangeListener_Impl::propertiesChange ( const Sequenc
m_xLockBytes->SetStreamValid_Impl();
}
- else if (evt.PropertyName == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("PresentationURL")))
+ else if (evt.PropertyName == rtl::OUString("PresentationURL"))
{
::rtl::OUString aUrl;
if (evt.NewValue >>= aUrl)
{
- ::rtl::OUString aBad (RTL_CONSTASCII_USTRINGPARAM ("private:"));
+ ::rtl::OUString aBad ("private:");
if (!aUrl.startsWith(aBad))
{
// URL changed (Redirection).
@@ -224,7 +224,7 @@ void SAL_CALL UcbPropertiesChangeListener_Impl::propertiesChange ( const Sequenc
}
}
}
- else if (evt.PropertyName == ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM ("MediaType")))
+ else if (evt.PropertyName == ::rtl::OUString("MediaType"))
{
::rtl::OUString aContentType;
if (evt.NewValue >>= aContentType)
@@ -910,10 +910,10 @@ static sal_Bool UCBOpenContentSync(
aScheme = xContId->getContentProviderScheme();
// now determine whether we use a timeout or not;
- if( ! aScheme.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("http")) &&
- ! aScheme.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("https")) &&
- ! aScheme.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.webdav")) &&
- ! aScheme.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("ftp")))
+ if( ! aScheme.equalsIgnoreAsciiCase("http") &&
+ ! aScheme.equalsIgnoreAsciiCase("https") &&
+ ! aScheme.equalsIgnoreAsciiCase("vnd.sun.star.webdav") &&
+ ! aScheme.equalsIgnoreAsciiCase("ftp"))
return _UCBOpenContentSync(
xLockBytes,xContent,rArg,xSink,xInteract,xProgress,xHandler);
diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx
index 62d4fb7..94b1afa 100644
--- a/unotools/source/ucbhelper/xtempfile.cxx
+++ b/unotools/source/ucbhelper/xtempfile.cxx
@@ -446,12 +446,12 @@ throw ( ::css::uno::RuntimeException )
::rtl::OUString OTempFileService::getImplementationName_Static ()
{
- return ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.io.comp.TempFile" ) );
+ return ::rtl::OUString ( "com.sun.star.io.comp.TempFile" );
}
::css::uno::Sequence < ::rtl::OUString > OTempFileService::getSupportedServiceNames_Static()
{
::css::uno::Sequence < ::rtl::OUString > aNames ( 1 );
- aNames[0] = ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.io.TempFile" ) );
+ aNames[0] = "com.sun.star.io.TempFile";
return aNames;
}
::css::uno::Reference < ::css::uno::XInterface >SAL_CALL XTempFile_createInstance(
More information about the Libreoffice-commits
mailing list