Removed RTL_CONSTASCII_STRINGPARAM in unodevtools

Change-Id: I41ea9fe6fcac6cba0e12cd570b9971998717f401
This commit is contained in:
Chr. Rossmanith 2013-03-12 14:53:20 +01:00
parent 413fe6c65a
commit 4b2890453b
6 changed files with 31 additions and 37 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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