From 1d922012beecb3e94a1bbe521010d92486102d6c Mon Sep 17 00:00:00 2001 From: Gert Faller Date: Sat, 27 Nov 2010 09:28:39 +0100 Subject: RTL_CONSTASCII_USTRINGPARAM in sdk 2 --- unodevtools/source/skeletonmaker/cppcompskeleton.cxx | 12 ++++++------ unodevtools/source/skeletonmaker/cpptypemaker.cxx | 4 ++-- unodevtools/source/skeletonmaker/skeletoncommon.cxx | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'unodevtools') diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx index d76af17fba09..b8af603c0212 100644 --- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx +++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx @@ -536,13 +536,13 @@ void generateAddinConstructorAndHelper(std::ostream& o, " RTL_CONSTASCII_USTRINGPARAM(\n" " \"com.sun.star.configuration.ConfigurationAccess\"));\n\n"; - o << " ::rtl::OUStringBuffer sPath(::rtl::OUString::createFromAscii(\n" - " \"/org.openoffice.Office.CalcAddIns/AddInInfo/\"));\n" + o << " ::rtl::OUStringBuffer sPath(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\n" + " \"/org.openoffice.Office.CalcAddIns/AddInInfo/\")));\n" " sPath.appendAscii(sADDIN_SERVICENAME);\n" " sPath.appendAscii(\"/AddInFunctions\");\n\n" " // create arguments: nodepath\n" " css::beans::PropertyValue aArgument;\n" - " aArgument.Name = ::rtl::OUString::createFromAscii(\"nodepath\");\n" + " aArgument.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\"nodepath\"));\n" " aArgument.Value <<= sPath.makeStringAndClear();\n\n" " css::uno::Sequence< css::uno::Any > aArguments(1);\n" " aArguments[0] <<= aArgument;\n\n"; @@ -557,8 +557,8 @@ void generateAddinConstructorAndHelper(std::ostream& o, o << " // extend arguments to create a view for all locales to get " "simple\n // access to the compatibilityname property\n" - " aArgument.Name = ::rtl::OUString::createFromAscii(\"locale\");\n" - " aArgument.Value <<= ::rtl::OUString::createFromAscii(\"*\");\n" + " aArgument.Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\"locale\"));\n" + " aArgument.Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\"*\"));\n" " aArguments.realloc(2);\n" " aArguments[1] <<= aArgument;\n\n" " // create view for all locales\n" @@ -582,7 +582,7 @@ void generateAddinConstructorAndHelper(std::ostream& o, " m_xHAccess->getByHierarchicalName(\n" " buf.makeStringAndClear()), css::uno::UNO_QUERY);\n" " xPropSet->getPropertyValue(\n " - "::rtl::OUString::createFromAscii(propName)) >>= ret;\n }\n" + "::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(propName))) >>= ret;\n }\n" " catch ( css::uno::RuntimeException & e ) {\n throw e;\n }\n" " catch ( css::uno::Exception & ) {\n }\n return ret;\n"; } diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx index 15ae7ae95988..ce9f4b8d95a6 100644 --- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx +++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx @@ -420,8 +420,8 @@ void printMethods(std::ostream & o, o << "// ::com::sun::star::lang::XServiceName:\n" "::rtl::OUString SAL_CALL " << classname << "getServiceName() " "throw (css::uno::RuntimeException)\n{\n " - "return ::rtl::OUString::createFromAscii(" - "sADDIN_SERVICENAME);\n}\n"; + "return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" + "sADDIN_SERVICENAME));\n}\n"; generated.add(type); return; } else if (type.equals("com/sun/star/sheet/XAddIn")) { diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx index 188e0fa05101..6452bace295c 100644 --- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx +++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx @@ -669,9 +669,9 @@ void generateFunctionParamterMap(std::ostream& o, for ( sal_uInt16 p = 0; p < reader.getMethodParameterCount(m); ++p ) { if ( options.language == 2 ) { o << " fpm[" << p - << "] = ::rtl::OUString::createFromAscii(\"" + << "] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\"" << codemaker::convertString(reader.getMethodParameterName(m, p)) - << "\");\n"; + << "\"));\n"; } else { if ( options.java5 ) @@ -688,8 +688,8 @@ void generateFunctionParamterMap(std::ostream& o, } if ( options.language == 2 ) { - o << " m_functionMap[::rtl::OUString::createFromAscii(\"" - << sMethod << "\")] = fpm;\n\n"; + o << " m_functionMap[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\"" + << sMethod << "\"))] = fpm;\n\n"; } else { o << " m_functionMap.put(\"" << sMethod << "\", fpm);\n\n"; -- cgit