summaryrefslogtreecommitdiff
path: root/stoc
diff options
context:
space:
mode:
Diffstat (limited to 'stoc')
-rw-r--r--stoc/source/implementationregistration/implreg.cxx24
-rw-r--r--stoc/source/implementationregistration/mergekeys.cxx8
-rw-r--r--stoc/source/invocation_adapterfactory/iafactory.cxx24
-rw-r--r--stoc/source/javavm/javavm.cxx11
-rw-r--r--stoc/source/loader/dllcomponentloader.cxx4
-rw-r--r--stoc/source/proxy_factory/proxyfac.cxx9
-rw-r--r--stoc/source/security/access_controller.cxx35
-rw-r--r--stoc/source/security/file_policy.cxx29
-rw-r--r--stoc/source/security/permissions.cxx6
-rw-r--r--stoc/source/servicemanager/servicemanager.cxx14
-rw-r--r--stoc/source/tdmanager/tdmgr.cxx10
-rw-r--r--stoc/source/tdmanager/tdmgr_check.cxx78
-rw-r--r--stoc/source/tdmanager/tdmgr_common.hxx1
-rw-r--r--stoc/test/javavm/jvm_interaction/interactionhandler.cxx3
14 files changed, 119 insertions, 137 deletions
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index f5d435f238e5..07b4129726cb 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -51,8 +51,6 @@
#include <io.h>
#endif
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
-
using namespace com::sun::star;
using namespace com::sun::star::uno;
@@ -797,7 +795,7 @@ static void delete_all_singleton_entries(
{
Reference< registry::XRegistryKey > const & xSingleton = subkeys[ nPos ];
Reference< registry::XRegistryKey > xRegisteredImplNames(
- xSingleton->openKey( OUSTR("REGISTERED_BY") ) );
+ xSingleton->openKey( "REGISTERED_BY" ) );
if (xRegisteredImplNames.is() && xRegisteredImplNames->isValid())
{
Sequence< OUString > registered_implnames;
@@ -833,7 +831,7 @@ static void delete_all_singleton_entries(
{
// remove whole entry
xRegisteredImplNames->closeKey();
- xSingleton->deleteKey( OUSTR("REGISTERED_BY") );
+ xSingleton->deleteKey( "REGISTERED_BY" );
// registry key cannot provide its relative name, only absolute :(
OUString abs( xSingleton->getKeyName() );
xSingletons_section->deleteKey( abs.copy( abs.lastIndexOf( '/' ) +1 ) );
@@ -953,7 +951,7 @@ static void insert_singletons(
// throw( registry::InvalidRegistryException, registry::CannotRegisterImplementationException, RuntimeException )
{
// singletons
- Reference< registry::XRegistryKey > xKey( xImplKey->openKey( OUSTR("UNO/SINGLETONS") ) );
+ Reference< registry::XRegistryKey > xKey( xImplKey->openKey( "UNO/SINGLETONS" ) );
if (xKey.is() && xKey->isValid())
{
OUString implname( xImplKey->getKeyName().copy( sizeof ("/IMPLEMENTATIONS/") -1 ) );
@@ -968,7 +966,7 @@ static void insert_singletons(
implname.getLength() + sizeof ("/IMPLEMENTATIONS//UNO/SINGLETONS/") -1 ) );
OUString service_name( xSingleton->getStringValue() );
- OUString keyname( OUSTR("/SINGLETONS/") + singleton_name );
+ OUString keyname( "/SINGLETONS/" + singleton_name );
Reference< registry::XRegistryKey > xKey2( xDest->getRootKey()->openKey( keyname ) );
if (xKey2.is() && xKey2->isValid())
{
@@ -979,12 +977,12 @@ static void insert_singletons(
{
Reference< container::XHierarchicalNameAccess > xTDMgr;
OUString the_tdmgr =
- OUSTR("/singletons/com.sun.star.reflection.theTypeDescriptionManager");
+ "/singletons/com.sun.star.reflection.theTypeDescriptionManager";
xContext->getValueByName( the_tdmgr ) >>= xTDMgr;
if (! xTDMgr.is())
{
throw RuntimeException(
- OUSTR("cannot get singleton ") + the_tdmgr,
+ "cannot get singleton " + the_tdmgr,
Reference< XInterface >() );
}
try
@@ -994,7 +992,7 @@ static void insert_singletons(
if (! xExistingService_td.is())
{
throw RuntimeException(
- OUSTR("cannot get service type description: ") + existing_name,
+ "cannot get service type description: " + existing_name,
Reference< XInterface >() );
}
@@ -1018,7 +1016,7 @@ static void insert_singletons(
catch (const container::NoSuchElementException & exc)
{
throw RuntimeException(
- OUSTR("cannot get service type description: ") + exc.Message,
+ "cannot get service type description: " + exc.Message,
Reference< XInterface >() );
}
}
@@ -1037,11 +1035,11 @@ static void insert_singletons(
}
Reference< registry::XRegistryKey > xRegisteredImplNames(
- xKey2->openKey( OUSTR("REGISTERED_BY") ) );
+ xKey2->openKey( "REGISTERED_BY" ) );
if (!xRegisteredImplNames.is() || !xRegisteredImplNames->isValid())
{
// create
- xRegisteredImplNames = xKey2->createKey( OUSTR("REGISTERED_BY") );
+ xRegisteredImplNames = xKey2->createKey( "REGISTERED_BY" );
}
Sequence< OUString > implnames;
@@ -1776,7 +1774,7 @@ void ImplementationRegistration::doRevoke(
}
}
- xKey = xRootKey->openKey( OUSTR("/SINGLETONS") );
+ xKey = xRootKey->openKey( "/SINGLETONS" );
if (xKey.is() && xKey->isValid())
{
delete_all_singleton_entries( xKey, aNames );
diff --git a/stoc/source/implementationregistration/mergekeys.cxx b/stoc/source/implementationregistration/mergekeys.cxx
index 5ebb2ddbdf39..489a27b4b37c 100644
--- a/stoc/source/implementationregistration/mergekeys.cxx
+++ b/stoc/source/implementationregistration/mergekeys.cxx
@@ -25,8 +25,6 @@
#include "mergekeys.hxx"
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
-
using namespace ::rtl;
using namespace ::osl;
using namespace ::com::sun::star::uno;
@@ -56,12 +54,12 @@ static void mergeKeys(
{
if (!xSource.is() || !xSource->isValid()) {
throw registry::InvalidRegistryException(
- OUSTR("source key is null or invalid!"),
+ "source key is null or invalid!",
Reference<XInterface>() );
}
if (!xDest.is() || !xDest->isValid()) {
throw registry::InvalidRegistryException(
- OUSTR("destination key is null or invalid!"),
+ "destination key is null or invalid!",
Reference<XInterface>() );
}
@@ -151,7 +149,7 @@ void mergeKeys(
{
if (!xDest.is() || !xDest->isValid()) {
throw registry::InvalidRegistryException(
- OUSTR("destination key is null or invalid!"),
+ "destination key is null or invalid!",
Reference<XInterface>() );
}
if (xDest->isReadOnly())
diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx
index cd53f327054f..5e49a5e22c10 100644
--- a/stoc/source/invocation_adapterfactory/iafactory.cxx
+++ b/stoc/source/invocation_adapterfactory/iafactory.cxx
@@ -46,8 +46,6 @@
#include <com/sun/star/reflection/InvocationTargetException.hpp>
#include "com/sun/star/uno/RuntimeException.hpp"
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
-
#define SERVICENAME "com.sun.star.script.InvocationAdapterFactory"
#define IMPLNAME "com.sun.star.comp.stoc.InvocationAdapterFactory"
@@ -291,7 +289,7 @@ bool AdapterImpl::coerce_assign(
{
// set runtime exception
constructRuntimeException(
- pOutExc, OUSTR("type coercion failed: ") +
+ pOutExc, "type coercion failed: " +
reinterpret_cast< Exception const * >(
p_exc->pData )->Message );
}
@@ -311,8 +309,8 @@ bool AdapterImpl::coerce_assign(
// set runtime exception
constructRuntimeException(
pOutExc,
- OUSTR("type coercion failed: "
- "conversion succeeded, but assignment failed?!") );
+ "type coercion failed: "
+ "conversion succeeded, but assignment failed?!" );
}
return succ;
}
@@ -362,7 +360,7 @@ static void handleInvokExc( uno_Any * pDest, uno_Any * pSource )
else
{
constructRuntimeException(
- pDest, OUSTR("no exception has been thrown via invocation?!") );
+ pDest, "no exception has been thrown via invocation?!" );
}
}
}
@@ -555,7 +553,7 @@ void AdapterImpl::invoke(
// set runtime exception
constructRuntimeException(
*ppException,
- OUSTR("out params lengths differ after invocation call!") );
+ "out params lengths differ after invocation call!" );
}
// cleanup invok out params
::uno_destructData( &pOutIndices, m_pFactory->m_pShortSeqTD, 0 );
@@ -679,7 +677,7 @@ AdapterImpl::AdapterImpl(
}
delete [] m_pInterfaces;
throw RuntimeException(
- OUSTR("cannot retrieve all interface type infos!"),
+ "cannot retrieve all interface type infos!",
Reference< XInterface >() );
}
}
@@ -691,7 +689,7 @@ AdapterImpl::AdapterImpl(
if (! m_pReceiver)
{
throw RuntimeException(
- OUSTR("cannot map receiver!"), Reference< XInterface >() );
+ "cannot map receiver!", Reference< XInterface >() );
}
m_pFactory->acquire();
@@ -708,8 +706,8 @@ FactoryImpl::FactoryImpl( Reference< XComponentContext > const & xContext )
m_pConvertToTD( 0 )
{
// C++/UNO bridge
- OUString aCppEnvTypeName = OUSTR(CPPU_CURRENT_LANGUAGE_BINDING_NAME);
- OUString aUnoEnvTypeName = OUSTR(UNO_LB_UNO);
+ OUString aCppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+ OUString aUnoEnvTypeName = UNO_LB_UNO;
m_aUno2Cpp = Mapping( aUnoEnvTypeName, aCppEnvTypeName );
m_aCpp2Uno = Mapping( aCppEnvTypeName, aUnoEnvTypeName );
OSL_ENSURE(
@@ -763,7 +761,7 @@ FactoryImpl::FactoryImpl( Reference< XComponentContext > const & xContext )
!m_pAnySeqTD || !m_pShortSeqTD)
{
throw RuntimeException(
- OUSTR("missing type descriptions!"), Reference< XInterface >() );
+ "missing type descriptions!", Reference< XInterface >() );
}
g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt );
@@ -888,7 +886,7 @@ Reference< XInterface > FactoryImpl::createAdapter(
if (! xRet.is())
{
throw RuntimeException(
- OUSTR("mapping UNO to C++ failed!"),
+ "mapping UNO to C++ failed!",
Reference< XInterface >() );
}
}
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index a8e85748a15a..e0ac281de0c6 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -80,7 +80,6 @@
#include <vector>
#include "boost/noncopyable.hpp"
#include "boost/scoped_array.hpp"
-#define OUSTR(x) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( x ))
// Properties of the javavm can be put
// as a komma separated list in this
@@ -372,15 +371,15 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm,
}
// read socks settings
-/* Reference<XRegistryKey> socksProxy_name = xRegistryRootKey->openKey(OUSTR("Settings/ooInetSOCKSProxyName"));
+/* Reference<XRegistryKey> socksProxy_name = xRegistryRootKey->openKey("Settings/ooInetSOCKSProxyName");
if (socksProxy_name.is() && httpProxy_name->getStringValue().getLength()) {
- OUString socksHost = OUSTR("socksProxyHost=");
+ OUString socksHost = "socksProxyHost=";
socksHost += socksProxy_name->getStringValue();
// read http proxy port
- Reference<XRegistryKey> socksProxy_port = xRegistryRootKey->openKey(OUSTR("Settings/ooInetSOCKSProxyPort"));
+ Reference<XRegistryKey> socksProxy_port = xRegistryRootKey->openKey("Settings/ooInetSOCKSProxyPort");
if (socksProxy_port.is() && socksProxy_port->getLongValue()) {
- OUString socksPort = OUSTR("socksProxyPort=");
+ OUString socksPort = "socksProxyPort=";
socksPort += OUString::valueOf(socksProxy_port->getLongValue());
pjvm->pushProp(socksHost);
@@ -1329,7 +1328,7 @@ void SAL_CALL JavaVirtualMachine::elementReplaced(
// this code was executed. Maybe it is a security feature. However, all attempts to debug the
// SandboxSecurity class (maybe the VM invokes checkPackageAccess) failed.
// jclass jcSandboxSec= pJNIEnv->FindClass("com.sun.star.lib.sandbox.SandboxSecurity");
-// if(pJNIEnv->ExceptionOccurred()) throw RuntimeException(OUSTR("JNI:FindClass com.sun.star.lib.sandbox.SandboxSecurity"), Reference<XInterface>());
+// if(pJNIEnv->ExceptionOccurred()) throw RuntimeException("JNI:FindClass com.sun.star.lib.sandbox.SandboxSecurity", Reference<XInterface>());
// jboolean bIsSand= pJNIEnv->IsInstanceOf( joSecur, jcSandboxSec);
// The SecurityManagers class Name must be com.sun.star.lib.sandbox.SandboxSecurity
jclass jcSec= pJNIEnv->GetObjectClass( joSecur);
diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx
index bc7f8e03ea08..038fc3cfcccb 100644
--- a/stoc/source/loader/dllcomponentloader.cxx
+++ b/stoc/source/loader/dllcomponentloader.cxx
@@ -45,8 +45,6 @@
#define SERVICENAME "com.sun.star.loader.SharedLibrary"
#define IMPLNAME "com.sun.star.comp.stoc.DLLComponentLoader"
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
-
using namespace com::sun::star;
using namespace com::sun::star::uno;
@@ -204,7 +202,7 @@ Reference<XInterface> SAL_CALL DllComponentLoader::activate(
{
aPrefix = xPrefixKey->getAsciiValue();
if( !aPrefix.isEmpty() )
- aPrefix = aPrefix + OUSTR("_");
+ aPrefix = aPrefix + "_";
}
}
}
diff --git a/stoc/source/proxy_factory/proxyfac.cxx b/stoc/source/proxy_factory/proxyfac.cxx
index cf211e017b85..34d060c95371 100644
--- a/stoc/source/proxy_factory/proxyfac.cxx
+++ b/stoc/source/proxy_factory/proxyfac.cxx
@@ -37,7 +37,6 @@
#include "com/sun/star/reflection/XProxyFactory.hpp"
#include "com/sun/star/uno/RuntimeException.hpp"
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
#define SERVICE_NAME "com.sun.star.reflection.ProxyFactory"
#define IMPL_NAME "com.sun.star.comp.reflection.ProxyFactory"
@@ -54,12 +53,12 @@ static rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
static OUString proxyfac_getImplementationName()
{
- return OUSTR(IMPL_NAME);
+ return OUString(IMPL_NAME);
}
static Sequence< OUString > proxyfac_getSupportedServiceNames()
{
- OUString str_name = OUSTR(SERVICE_NAME);
+ OUString str_name = SERVICE_NAME;
return Sequence< OUString >( &str_name, 1 );
}
@@ -402,8 +401,8 @@ Any ProxyRoot::queryAggregation( Type const & rType )
//______________________________________________________________________________
FactoryImpl::FactoryImpl()
{
- OUString uno = OUSTR(UNO_LB_UNO);
- OUString cpp = OUSTR(CPPU_CURRENT_LANGUAGE_BINDING_NAME);
+ OUString uno = UNO_LB_UNO;
+ OUString cpp = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
uno_getEnvironment(
reinterpret_cast< uno_Environment ** >( &m_uno_env ), uno.pData, 0 );
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index 09ffc70cfb32..987d6ec6c57f 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -50,7 +50,6 @@
#include "bootstrapservices.hxx"
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
#define SERVICE_NAME "com.sun.star.security.AccessController"
#define IMPL_NAME "com.sun.star.security.comp.stoc.AccessController"
#define USER_CREDS "access-control.user-credentials"
@@ -70,7 +69,7 @@ extern ::rtl_StandardModuleCount g_moduleCount;
namespace stoc_sec
{
// static stuff initialized when loading lib
-static OUString s_envType = OUSTR(CPPU_CURRENT_LANGUAGE_BINDING_NAME);
+static OUString s_envType = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
const char s_acRestriction[] = "access-control.restriction";
//##################################################################################################
@@ -477,7 +476,7 @@ AccessController::AccessController( Reference< XComponentContext > const & xComp
// to something other than "off" depending on various UNO_AC* bootstrap
// variables that are no longer supported, so this is mostly dead code now:
OUString mode;
- if (m_xComponentContext->getValueByName( OUSTR("/services/" SERVICE_NAME "/mode") ) >>= mode)
+ if (m_xComponentContext->getValueByName( "/services/" SERVICE_NAME "/mode" ) >>= mode)
{
if ( mode == "off" )
{
@@ -494,12 +493,12 @@ AccessController::AccessController( Reference< XComponentContext > const & xComp
else if ( mode == "single-user" )
{
m_xComponentContext->getValueByName(
- OUSTR("/services/" SERVICE_NAME "/single-user-id") ) >>= m_singleUserId;
+ "/services/" SERVICE_NAME "/single-user-id" ) >>= m_singleUserId;
if (m_singleUserId.isEmpty())
{
throw RuntimeException(
- OUSTR("expected a user id in component context entry "
- "\"/services/" SERVICE_NAME "/single-user-id\"!"),
+ "expected a user id in component context entry "
+ "\"/services/" SERVICE_NAME "/single-user-id\"!",
(OWeakObject *)this );
}
m_mode = SINGLE_USER;
@@ -515,7 +514,7 @@ AccessController::AccessController( Reference< XComponentContext > const & xComp
{
sal_Int32 cacheSize = 0; // multi-user cache size
if (! (m_xComponentContext->getValueByName(
- OUSTR("/services/" SERVICE_NAME "/user-cache-size") ) >>= cacheSize))
+ "/services/" SERVICE_NAME "/user-cache-size" ) >>= cacheSize))
{
cacheSize = 128; // reasonable default?
}
@@ -550,14 +549,14 @@ void AccessController::initialize(
if (SINGLE_USER != m_mode) // only if in single-user mode
{
throw RuntimeException(
- OUSTR("invalid call: ac must be in \"single-user\" mode!"), (OWeakObject *)this );
+ "invalid call: ac must be in \"single-user\" mode!", (OWeakObject *)this );
}
OUString userId;
arguments[ 0 ] >>= userId;
if ( userId.isEmpty() )
{
throw RuntimeException(
- OUSTR("expected a user-id as first argument!"), (OWeakObject *)this );
+ "expected a user-id as first argument!", (OWeakObject *)this );
}
// assured that no sync is necessary: no check happens at this forking time
m_singleUserId = userId;
@@ -573,7 +572,7 @@ Reference< security::XPolicy > const & AccessController::getPolicy()
{
Reference< security::XPolicy > xPolicy;
m_xComponentContext->getValueByName(
- OUSTR("/singletons/com.sun.star.security.thePolicy") ) >>= xPolicy;
+ "/singletons/com.sun.star.security.thePolicy" ) >>= xPolicy;
if (xPolicy.is())
{
MutexGuard guard( m_mutex );
@@ -585,7 +584,7 @@ Reference< security::XPolicy > const & AccessController::getPolicy()
else
{
throw SecurityException(
- OUSTR("cannot get policy singleton!"), (OWeakObject *)this );
+ "cannot get policy singleton!", (OWeakObject *)this );
}
}
return m_xPolicy;
@@ -719,12 +718,12 @@ PermissionCollection AccessController::getEffectivePermissions(
{
if (xContext.is())
{
- xContext->getValueByName( OUSTR(USER_CREDS ".id") ) >>= userId;
+ xContext->getValueByName( USER_CREDS ".id" ) >>= userId;
}
if ( userId.isEmpty() )
{
throw SecurityException(
- OUSTR("cannot determine current user in multi-user ac!"), (OWeakObject *)this );
+ "cannot determine current user in multi-user ac!", (OWeakObject *)this );
}
// lookup policy for user
@@ -880,7 +879,7 @@ void AccessController::checkPermission(
if (rBHelper.bDisposed)
{
throw lang::DisposedException(
- OUSTR("checkPermission() call on disposed AccessController!"), (OWeakObject *)this );
+ "checkPermission() call on disposed AccessController!", (OWeakObject *)this );
}
if (OFF == m_mode)
@@ -910,7 +909,7 @@ Any AccessController::doRestricted(
if (rBHelper.bDisposed)
{
throw lang::DisposedException(
- OUSTR("doRestricted() call on disposed AccessController!"), (OWeakObject *)this );
+ "doRestricted() call on disposed AccessController!", (OWeakObject *)this );
}
if (OFF == m_mode) // optimize this way, because no dynamic check will be performed
@@ -943,7 +942,7 @@ Any AccessController::doPrivileged(
if (rBHelper.bDisposed)
{
throw lang::DisposedException(
- OUSTR("doPrivileged() call on disposed AccessController!"), (OWeakObject *)this );
+ "doPrivileged() call on disposed AccessController!", (OWeakObject *)this );
}
if (OFF == m_mode) // no dynamic check will be performed
@@ -978,7 +977,7 @@ Reference< security::XAccessControlContext > AccessController::getContext()
if (rBHelper.bDisposed)
{
throw lang::DisposedException(
- OUSTR("getContext() call on disposed AccessController!"), (OWeakObject *)this );
+ "getContext() call on disposed AccessController!", (OWeakObject *)this );
}
if (OFF == m_mode) // optimize this way, because no dynamic check will be performed
@@ -1042,7 +1041,7 @@ Sequence< OUString > ac_getSupportedServiceNames() SAL_THROW(())
//--------------------------------------------------------------------------------------------------
OUString ac_getImplementationName() SAL_THROW(())
{
- return OUSTR(IMPL_NAME);
+ return OUString(IMPL_NAME);
}
//--------------------------------------------------------------------------------------------------
Reference< XInterface > SAL_CALL filepolicy_create(
diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx
index d7fa8c4899d6..c05bd884733c 100644
--- a/stoc/source/security/file_policy.cxx
+++ b/stoc/source/security/file_policy.cxx
@@ -40,7 +40,6 @@
#include "bootstrapservices.hxx"
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
#define SERVICE_NAME "com.sun.star.security.Policy"
#define IMPL_NAME "com.sun.star.security.comp.stoc.FilePolicy"
@@ -236,7 +235,7 @@ OUString PolicyReader::assureQuotedToken()
{
OUString token( getQuotedToken() );
if (token.isEmpty())
- error( OUSTR("unexpected end of file!") );
+ error( "unexpected end of file!" );
return token;
}
//__________________________________________________________________________________________________
@@ -247,7 +246,7 @@ OUString PolicyReader::getQuotedToken()
OUStringBuffer buf( 32 );
sal_Unicode c = get();
if ('\"' != c)
- error( OUSTR("expected quoting >\"< character!") );
+ error( "expected quoting >\"< character!" );
c = get();
while ('\0' != c && '\"' != c)
{
@@ -262,7 +261,7 @@ OUString PolicyReader::assureToken()
{
OUString token( getToken() );
if ( token.isEmpty())
- error( OUSTR("unexpected end of file!") );
+ error( "unexpected end of file!" );
return token;
}
//__________________________________________________________________________________________________
@@ -326,7 +325,7 @@ void PolicyReader::skipWhiteSpace()
}
else
{
- error( OUSTR("expected C/C++ like comment!") );
+ error( "expected C/C++ like comment!" );
}
}
else if ('#' == c) // script like comment
@@ -364,13 +363,13 @@ sal_Unicode PolicyReader::get()
sal_Bool eof;
oslFileError rc = ::osl_isEndOfFile( m_file, &eof );
if (osl_File_E_None != rc)
- error( OUSTR("checking eof failed!") );
+ error( "checking eof failed!" );
if (eof)
return '\0';
rc = ::osl_readLine( m_file, reinterpret_cast< sal_Sequence ** >( &m_line ) );
if (osl_File_E_None != rc)
- error( OUSTR("read line failed!") );
+ error( "read line failed!" );
++m_linepos;
if (! m_line.getLength()) // empty line read
{
@@ -404,7 +403,7 @@ PolicyReader::PolicyReader( OUString const & fileName, AccessControl & ac )
, m_pos( 1 ) // force readline
, m_back( '\0' )
{
- ac.checkFilePermission( m_fileName, OUSTR("read") );
+ ac.checkFilePermission( m_fileName, "read" );
if (osl_File_E_None != ::osl_openFile( m_fileName.pData, &m_file, osl_File_OpenFlag_Read ))
{
OUStringBuffer buf( 32 );
@@ -444,11 +443,11 @@ void FilePolicy::refresh()
// supported, so this is effectively dead code):
OUString fileName;
m_xComponentContext->getValueByName(
- OUSTR("/implementations/" IMPL_NAME "/file-name") ) >>= fileName;
+ "/implementations/" IMPL_NAME "/file-name" ) >>= fileName;
if ( fileName.isEmpty() )
{
throw RuntimeException(
- OUSTR("name of policy file unknown!"),
+ "name of policy file unknown!",
(OWeakObject *)this );
}
@@ -462,7 +461,7 @@ void FilePolicy::refresh()
while (!token.isEmpty())
{
if ( token != s_grant )
- reader.error( OUSTR("expected >grant< token!") );
+ reader.error( "expected >grant< token!" );
OUString userId;
token = reader.assureToken();
if ( token == s_user ) // next token is user-id
@@ -471,13 +470,13 @@ void FilePolicy::refresh()
token = reader.assureToken();
}
if ( token != s_openBrace )
- reader.error( OUSTR("expected opening brace >{<!") );
+ reader.error( "expected opening brace >{<!" );
token = reader.assureToken();
// permissions list
while ( token != s_closingBrace )
{
if ( token != s_permission )
- reader.error( OUSTR("expected >permission< or closing brace >}<!") );
+ reader.error( "expected >permission< or closing brace >}<!" );
token = reader.assureToken(); // permission type
Any perm;
@@ -506,7 +505,7 @@ void FilePolicy::refresh()
}
else
{
- reader.error( OUSTR("expected permission type!") );
+ reader.error( "expected permission type!" );
}
reader.assureToken( ';' );
@@ -588,7 +587,7 @@ Sequence< OUString > filepolicy_getSupportedServiceNames() SAL_THROW(())
//--------------------------------------------------------------------------------------------------
OUString filepolicy_getImplementationName() SAL_THROW(())
{
- return OUSTR(IMPL_NAME);
+ return OUString(IMPL_NAME);
}
}
diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx
index 704158b3e1d8..e97e379ef56a 100644
--- a/stoc/source/security/permissions.cxx
+++ b/stoc/source/security/permissions.cxx
@@ -35,8 +35,6 @@
#include "permissions.h"
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
-
using namespace ::std;
using namespace ::osl;
@@ -353,7 +351,7 @@ FilePermission::FilePermission(
// correct win drive letters
if (9 < m_url.getLength() && '|' == m_url[ 9 ]) // file:///X|
{
- static OUString s_colon = OUSTR(":");
+ static OUString s_colon = ":";
// common case in API is a ':' (sal), so convert '|' to ':'
m_url = m_url.replaceAt( 9, 1, s_colon );
}
@@ -483,7 +481,7 @@ bool AllPermission::implies( Permission const & ) const SAL_THROW(())
//__________________________________________________________________________________________________
OUString AllPermission::toString() const SAL_THROW(())
{
- return OUSTR("com.sun.star.security.AllPermission");
+ return OUString("com.sun.star.security.AllPermission");
}
//##################################################################################################
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index abcbffa498bd..c58e065ae69b 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -59,8 +59,6 @@
#include <bootstrapservices.hxx>
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
-
using namespace com::sun::star;
using namespace com::sun::star::uno;
@@ -284,7 +282,7 @@ beans::Property PropertySetInfo_Impl::getPropertyByName( OUString const & name )
return p[ nPos ];
}
throw beans::UnknownPropertyException(
- OUSTR("unknown property: ") + name, Reference< XInterface >() );
+ "unknown property: " + name, Reference< XInterface >() );
}
//__________________________________________________________________________________________________
sal_Bool PropertySetInfo_Impl::hasPropertyByName( OUString const & name )
@@ -574,7 +572,7 @@ inline void OServiceManager::check_undisposed() const
if (is_disposed())
{
throw lang::DisposedException(
- OUSTR("service manager instance has already been disposed!"),
+ "service manager instance has already been disposed!",
(OWeakObject *)this );
}
}
@@ -597,7 +595,7 @@ class OServiceManagerWrapper : public OServiceManagerMutex, public t_OServiceMan
if (! m_root.is())
{
throw lang::DisposedException(
- OUSTR("service manager instance has already been disposed!"),
+ "service manager instance has already been disposed!",
Reference< XInterface >() );
}
return m_root;
@@ -954,7 +952,7 @@ Reference<XPropertySetInfo > OServiceManager::getPropertySetInfo()
{
Sequence< beans::Property > seq( 1 );
seq[ 0 ] = beans::Property(
- OUSTR("DefaultContext"), -1, ::getCppuType( &m_xContext ), 0 );
+ "DefaultContext", -1, ::getCppuType( &m_xContext ), 0 );
Reference< beans::XPropertySetInfo > xInfo( new PropertySetInfo_Impl( seq ) );
MutexGuard aGuard( m_mutex );
@@ -1835,9 +1833,9 @@ Reference<XPropertySetInfo > ORegistryServiceManager::getPropertySetInfo()
{
Sequence< beans::Property > seq( 2 );
seq[ 0 ] = beans::Property(
- OUSTR("DefaultContext"), -1, ::getCppuType( &m_xContext ), 0 );
+ "DefaultContext", -1, ::getCppuType( &m_xContext ), 0 );
seq[ 1 ] = beans::Property(
- OUSTR("Registry"), -1, ::getCppuType( &m_xRegistry ),
+ "Registry", -1, ::getCppuType( &m_xRegistry ),
beans::PropertyAttribute::READONLY );
Reference< beans::XPropertySetInfo > xInfo( new PropertySetInfo_Impl( seq ) );
diff --git a/stoc/source/tdmanager/tdmgr.cxx b/stoc/source/tdmanager/tdmgr.cxx
index 2047f4a69042..b1c5976ba77c 100644
--- a/stoc/source/tdmanager/tdmgr.cxx
+++ b/stoc/source/tdmanager/tdmgr.cxx
@@ -463,7 +463,7 @@ void SAL_CALL ManagerImpl::insert( const Any & rElement )
catch (const container::NoSuchElementException & exc)
{
throw lang::IllegalArgumentException(
- OUSTR("NoSuchElementException occurred: ") +
+ "NoSuchElementException occurred: " +
exc.Message, static_cast<OWeakObject *>(this),
-1 /* unknown */ );
}
@@ -484,8 +484,8 @@ void SAL_CALL ManagerImpl::insert( const Any & rElement )
catch (const IncompatibleTypeException & exc)
{
throw lang::IllegalArgumentException(
- OUSTR("Rejecting types due to "
- "incompatibility! ") + exc.m_cause,
+ "Rejecting types due to "
+ "incompatibility! " + exc.m_cause,
static_cast<OWeakObject *>(this), 0 );
}
}
@@ -499,13 +499,13 @@ void SAL_CALL ManagerImpl::insert( const Any & rElement )
catch (const reflection::NoSuchTypeNameException & exc)
{
throw lang::IllegalArgumentException(
- OUSTR("NoSuchTypeNameException occurred: ") + exc.Message,
+ "NoSuchTypeNameException occurred: " + exc.Message,
static_cast<OWeakObject *>(this), -1 /* unknown */ );
}
catch (const reflection::InvalidTypeNameException & exc)
{
throw lang::IllegalArgumentException(
- OUSTR("InvalidTypeNameException occurred: ") + exc.Message,
+ "InvalidTypeNameException occurred: " + exc.Message,
static_cast<OWeakObject *>(this), -1 /* unknown */ );
}
}
diff --git a/stoc/source/tdmanager/tdmgr_check.cxx b/stoc/source/tdmanager/tdmgr_check.cxx
index 416cd0340166..c9679dd22bdf 100644
--- a/stoc/source/tdmanager/tdmgr_check.cxx
+++ b/stoc/source/tdmanager/tdmgr_check.cxx
@@ -44,12 +44,12 @@ namespace {
OUString getTypeClassName( TypeClass tc )
{
typelib_EnumTypeDescription * typeDescr = 0;
- OUString name = OUSTR("com.sun.star.uno.TypeClass");
+ OUString name = "com.sun.star.uno.TypeClass";
typelib_typedescription_getByName(
reinterpret_cast<typelib_TypeDescription **>(&typeDescr), name.pData );
OSL_ASSERT( typeDescr != 0 );
if (typeDescr == 0)
- return OUSTR("Cannot get type description of ") + name;
+ return "Cannot get type description of " + name;
typelib_typedescription_complete(
reinterpret_cast<typelib_TypeDescription **>(&typeDescr) );
@@ -63,7 +63,7 @@ OUString getTypeClassName( TypeClass tc )
if (nPos >= 0)
name = typeDescr->ppEnumNames[ nPos ];
else
- name = OUSTR("unknown TypeClass value: ") +
+ name = "unknown TypeClass value: " +
OUString::valueOf( (sal_Int32) tc );
typelib_typedescription_release(
@@ -119,7 +119,7 @@ void checkSeq( Sequence< Reference<T> > const & newTypes,
if (len != existingTypes.getLength())
{
if (!optionalMode || len < newTypes.getLength())
- typeError( OUSTR("Different number of types!"), context );
+ typeError( "Different number of types!", context );
len = existingTypes.getLength();
}
@@ -141,9 +141,9 @@ void checkEnum(
Reference<reflection::XEnumTypeDescription> const & xExistingTD )
{
if (xNewTD->getEnumNames() != xExistingTD->getEnumNames())
- typeError( OUSTR("ENUM names don't match!"), xNewTD->getName() );
+ typeError( "ENUM names don't match!", xNewTD->getName() );
if (xNewTD->getEnumValues() != xExistingTD->getEnumValues())
- typeError( OUSTR("ENUM values don't match!"), xNewTD->getName() );
+ typeError( "ENUM values don't match!", xNewTD->getName() );
}
void checkStruct(
@@ -151,12 +151,12 @@ void checkStruct(
Reference<reflection::XCompoundTypeDescription> const & xExistingTD )
{
check( xNewTD->getBaseType(), xExistingTD->getBaseType(),
- xNewTD->getName() + OUSTR(", base type") );
+ xNewTD->getName() + ", base type" );
checkSeq( xNewTD->getMemberTypes(), xExistingTD->getMemberTypes(),
- xNewTD->getName() + OUSTR(", member types") );
+ xNewTD->getName() + ", member types" );
if (xNewTD->getMemberNames() != xExistingTD->getMemberNames())
- typeError( OUSTR("Different member names!"), xNewTD->getName() );
+ typeError( "Different member names!", xNewTD->getName() );
if (xNewTD->getTypeClass() == TypeClass_STRUCT)
{
@@ -168,15 +168,15 @@ void checkStruct(
{
if (xNewStructTD->getTypeParameters() !=
xExistingStructTD->getTypeParameters())
- typeError( OUSTR("Different type parameters of instantiated "
- "polymorphic STRUCT!"), xNewTD->getName() );
+ typeError( "Different type parameters of instantiated "
+ "polymorphic STRUCT!", xNewTD->getName() );
checkSeq( xNewStructTD->getTypeArguments(),
xExistingStructTD->getTypeArguments(),
- xNewTD->getName() + OUSTR(", argument types") );
+ xNewTD->getName() + ", argument types" );
}
else if (xNewStructTD.is() || xExistingStructTD.is())
- typeError( OUSTR("Mixing polymorphic STRUCT types "
- "with non-polymorphic!"), xNewTD->getName() );
+ typeError( "Mixing polymorphic STRUCT types "
+ "with non-polymorphic!", xNewTD->getName() );
}
}
@@ -185,11 +185,11 @@ void checkInterface(
Reference<reflection::XInterfaceTypeDescription2> const & xExistingTD )
{
checkSeq( xNewTD->getBaseTypes(), xExistingTD->getBaseTypes(),
- xNewTD->getName() + OUSTR(", base types") );
+ xNewTD->getName() + ", base types" );
checkSeq(xNewTD->getOptionalBaseTypes(),xExistingTD->getOptionalBaseTypes(),
- xNewTD->getName() + OUSTR(", optional base types") );
+ xNewTD->getName() + ", optional base types" );
checkSeq( xNewTD->getMembers(), xExistingTD->getMembers(),
- xNewTD->getName() + OUSTR(", members") );
+ xNewTD->getName() + ", members" );
}
void checkRestParam( Reference<reflection::XParameter> const & xNewParam,
@@ -197,7 +197,7 @@ void checkRestParam( Reference<reflection::XParameter> const & xNewParam,
OUString const & context )
{
if (xNewParam->isRestParameter() != xExistingParam->isRestParameter())
- typeError( OUSTR("Different ... parameters specified!"), context );
+ typeError( "Different ... parameters specified!", context );
}
void checkRestParam(
@@ -213,7 +213,7 @@ void checkParameters( Sequence< Reference<T> > const & newParams,
{
sal_Int32 len = newParams.getLength();
if (len != existingParams.getLength())
- typeError( OUSTR("Different number of parameters!"), context_ );
+ typeError( "Different number of parameters!", context_ );
Reference<T> const * pNewParams = newParams.getConstArray();
Reference<T> const * pExistingParams = existingParams.getConstArray();
for ( sal_Int32 pos = 0; pos < len; ++pos )
@@ -240,9 +240,9 @@ void checkParameters( Sequence< Reference<T> > const & newParams,
check( xNewParam->getType(), xExistingParam->getType(), context );
if (xNewParam->isIn() != xExistingParam->isIn())
- typeError( OUSTR("IN attribute differs!"), context );
+ typeError( "IN attribute differs!", context );
if (xNewParam->isOut() != xExistingParam->isOut())
- typeError( OUSTR("OUT attribute differs!"), context );
+ typeError( "OUT attribute differs!", context );
checkRestParam( xNewParam, xExistingParam, context );
}
}
@@ -255,14 +255,14 @@ static void checkMethod(
xNewTD->getName() );
if (xNewTD->isOneway() != xExistingTD->isOneway())
- typeError( OUSTR("Methods have differing OneWay attribute!"),
+ typeError( "Methods have differing OneWay attribute!",
xNewTD->getName() );
checkParameters( xNewTD->getParameters(), xExistingTD->getParameters(),
xNewTD->getName() );
checkSeq( xNewTD->getExceptions(), xExistingTD->getExceptions(),
- xNewTD->getName() + OUSTR(", declared exceptions") );
+ xNewTD->getName() + ", declared exceptions" );
}
void checkAttribute(
@@ -271,18 +271,18 @@ void checkAttribute(
const & xExistingTD )
{
if (xNewTD->isReadOnly() != xExistingTD->isReadOnly())
- typeError( OUSTR("ReadOnly attribute differs!"), xNewTD->getName() );
+ typeError( "ReadOnly attribute differs!", xNewTD->getName() );
check( xNewTD->getType(), xExistingTD->getType(),
- xNewTD->getName() + OUSTR(", attribute type") );
+ xNewTD->getName() + ", attribute type" );
if (xNewTD->isBound() != xExistingTD->isBound())
- typeError( OUSTR("Bound attribute differs!"), xNewTD->getName() );
+ typeError( "Bound attribute differs!", xNewTD->getName() );
checkSeq( xNewTD->getGetExceptions(), xExistingTD->getGetExceptions(),
- xNewTD->getName() + OUSTR(", getter exceptions") );
+ xNewTD->getName() + ", getter exceptions" );
checkSeq( xNewTD->getSetExceptions(), xExistingTD->getSetExceptions(),
- xNewTD->getName() + OUSTR(", setter exceptions") );
+ xNewTD->getName() + ", setter exceptions" );
}
void checkProperty(
@@ -315,7 +315,7 @@ void checkSingleton(
sal_Bool ifaceBased = xNewTD->isInterfaceBased();
if (ifaceBased != xExistingTD->isInterfaceBased())
typeError(
- OUSTR("Mixing interface and NON-interface based singletons!"),
+ "Mixing interface and NON-interface based singletons!",
xNewTD->getName() );
if (ifaceBased)
check( xNewTD->getInterface(), xExistingTD->getInterface(),
@@ -331,7 +331,7 @@ void checkService(
{
sal_Bool singleIfaceBased = xNewTD->isSingleInterfaceBased();
if (singleIfaceBased != xExistingTD->isSingleInterfaceBased())
- typeError( OUSTR("Mixing interface and NON-interface based services!"),
+ typeError( "Mixing interface and NON-interface based services!",
xNewTD->getName() );
if (singleIfaceBased)
{
@@ -343,7 +343,7 @@ void checkService(
existingCtors( xExistingTD->getConstructors() );
sal_Int32 len = newCtors.getLength();
if (len != existingCtors.getLength())
- typeError( OUSTR("Different number of service constructors!"),
+ typeError( "Different number of service constructors!",
xNewTD->getName() );
Reference<reflection::XServiceConstructorDescription> const *
pNewCtors = newCtors.getConstArray();
@@ -377,24 +377,24 @@ void checkService(
xExistingCtor->getParameters(),
context );
checkSeq( xNewCtor->getExceptions(), xExistingCtor->getExceptions(),
- context + OUSTR(", exceptions") );
+ context + ", exceptions" );
}
}
else // old-style service descriptions:
{
checkSeq( xNewTD->getMandatoryServices(),
xExistingTD->getMandatoryServices(),
- xNewTD->getName() + OUSTR(", mandatory services") );
+ xNewTD->getName() + ", mandatory services" );
checkSeq( xNewTD->getOptionalServices(),
xExistingTD->getOptionalServices(),
- xNewTD->getName() + OUSTR(", optional services"),
+ xNewTD->getName() + ", optional services",
true /* optionalMode */ );
checkSeq( xNewTD->getMandatoryInterfaces(),
xExistingTD->getMandatoryInterfaces(),
- xNewTD->getName() + OUSTR(", mandatory interfaces") );
+ xNewTD->getName() + ", mandatory interfaces" );
checkSeq( xNewTD->getOptionalInterfaces(),
xExistingTD->getOptionalInterfaces(),
- xNewTD->getName() + OUSTR(", optional interfaces"),
+ xNewTD->getName() + ", optional interfaces",
true /* optionalMode */ );
Sequence< Reference<reflection::XPropertyTypeDescription> >
@@ -402,7 +402,7 @@ void checkService(
Sequence< Reference<reflection::XPropertyTypeDescription> >
existingProperties( xExistingTD->getProperties() );
checkSeq( newProperties, existingProperties,
- xNewTD->getName() + OUSTR(", properties"),
+ xNewTD->getName() + ", properties",
true /* optionalMode */ );
if (newProperties.getLength() > existingProperties.getLength())
{
@@ -414,7 +414,7 @@ void checkService(
{
if ((pNewProperties[pos]->getPropertyFlags() &
beans::PropertyAttribute::OPTIONAL) == 0)
- typeError( OUSTR("New property is not OPTIONAL!"),
+ typeError( "New property is not OPTIONAL!",
pNewProperties[pos]->getName() );
}
}
@@ -521,7 +521,7 @@ void check( Reference<reflection::XTypeDescription> const & xNewTD,
xNewTD, UNO_QUERY_THROW )->getConstantValue() !=
Reference<reflection::XConstantTypeDescription>(
xExistingTD, UNO_QUERY_THROW )->getConstantValue())
- typeError( OUSTR("Different constant value!"), xNewTD->getName() );
+ typeError( "Different constant value!", xNewTD->getName() );
break;
case TypeClass_CONSTANTS:
checkSeq( Reference<reflection::XConstantsTypeDescription>(
diff --git a/stoc/source/tdmanager/tdmgr_common.hxx b/stoc/source/tdmanager/tdmgr_common.hxx
index a4830a70d1a9..33f1a2ad307b 100644
--- a/stoc/source/tdmanager/tdmgr_common.hxx
+++ b/stoc/source/tdmanager/tdmgr_common.hxx
@@ -24,7 +24,6 @@
#include "com/sun/star/reflection/XTypeDescription.hpp"
-#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
#define ARLEN(x) (sizeof (x) / sizeof *(x))
diff --git a/stoc/test/javavm/jvm_interaction/interactionhandler.cxx b/stoc/test/javavm/jvm_interaction/interactionhandler.cxx
index 51771e07df25..5fca937a54f1 100644
--- a/stoc/test/javavm/jvm_interaction/interactionhandler.cxx
+++ b/stoc/test/javavm/jvm_interaction/interactionhandler.cxx
@@ -62,7 +62,6 @@ using ::rtl::OUString;
using ::rtl::OUStringToOString;
using ::rtl::OString;
-#define OUSTR( x ) OUString(RTL_CONSTASCII_USTRINGPARAM( x ))
#define INTERACTION_HANDLER_NAME "java-vm.interaction-handler"
class Context: public WeakImplHelper1<XCurrentContext>
@@ -79,7 +78,7 @@ class InteractionHandler: public WeakImplHelper1<XInteractionHandler>
Any SAL_CALL Context::getValueByName( const OUString& Name) throw (RuntimeException)
{
Any retVal;
- if( Name.equals( OUSTR(INTERACTION_HANDLER_NAME)))
+ if( Name.equals( INTERACTION_HANDLER_NAME))
{
Reference<XInteractionHandler> handler( static_cast<XWeak*>(new InteractionHandler()),
UNO_QUERY);