From 4b2890453b2a9a99da3d690e6e70bffd711b6810 Mon Sep 17 00:00:00 2001 From: "Chr. Rossmanith" Date: Tue, 12 Mar 2013 14:53:20 +0100 Subject: [PATCH] Removed RTL_CONSTASCII_STRINGPARAM in unodevtools Change-Id: I41ea9fe6fcac6cba0e12cd570b9971998717f401 --- .../source/skeletonmaker/cpptypemaker.cxx | 2 +- .../source/skeletonmaker/javatypemaker.cxx | 4 +-- .../source/skeletonmaker/skeletonmaker.cxx | 4 +-- unodevtools/source/unodevtools/options.cxx | 10 ++++---- unodevtools/source/unodevtools/typeblob.cxx | 23 ++++++++--------- .../source/unodevtools/typemanager.cxx | 25 ++++++++----------- 6 files changed, 31 insertions(+), 37 deletions(-) diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx index 689b5170750a..e95b5039934f 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 e2e4a6dc9d8a..7e7f86c3825c 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 1b20636ed0ed..4884bd4f69ad 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 34ad6dbafc24..534e87eeae2b 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 b174ba02a68a..e65fdf69074b 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 017c265a2c85..c25bcac9964c 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 >()); }