Kaydet (Commit) 4ec9f5d7 authored tarafından Chr. Rossmanith's avatar Chr. Rossmanith

Remove RTL_CONSTASCII_(U)STRINGPARAM in odk(Developersguide)

Change-Id: Ic2a2cf04a691f628e862e81579d3d55d261fc492
üst 61651ece
......@@ -197,10 +197,10 @@ void SAL_CALL Addon::removeStatusListener( const Reference< XStatusListener >& x
//#### Helper functions for the implementation of UNO component interfaces #########################
//##################################################################################################
::rtl::OUString Addon_getImplementationName()
OUString Addon_getImplementationName()
throw (RuntimeException)
{
return ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( IMPLEMENTATION_NAME ) );
return OUString ( IMPLEMENTATION_NAME );
}
sal_Bool SAL_CALL Addon_supportsService( const ::rtl::OUString& ServiceName )
......@@ -214,7 +214,7 @@ throw (RuntimeException)
{
Sequence < ::rtl::OUString > aRet(1);
::rtl::OUString* pArray = aRet.getArray();
pArray[0] = ::rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME ) );
pArray[0] = OUString ( SERVICE_NAME );
return aRet;
}
......
......@@ -112,7 +112,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_C
{
Reference< XSingleComponentFactory > xFactory( createSingleComponentFactory(
Addon_createInstance,
OUString( RTL_CONSTASCII_USTRINGPARAM( IMPLEMENTATION_NAME ) ),
OUString( IMPLEMENTATION_NAME ),
Addon_getSupportedServiceNames() ) );
if (xFactory.is())
......
......@@ -208,15 +208,13 @@ OUString MyService1Impl::methodOne( OUString const & str )
throw (RuntimeException)
{
m_sData = str;
return OUString( RTL_CONSTASCII_USTRINGPARAM(
"called methodOne() of MyService1 implementation: ") ) + m_sData;
return OUString( "called methodOne() of MyService1 implementation: " ) + m_sData;
}
OUString MyService1Impl::methodTwo( )
throw (RuntimeException)
{
return OUString( RTL_CONSTASCII_USTRINGPARAM(
"called methodTwo() of MyService1 implementation: ") ) + m_sData;
return OUString( "called methodTwo() of MyService1 implementation: " ) + m_sData;
}
// XServiceInfo implementation
......
......@@ -134,15 +134,13 @@ OUString MyService2Impl::methodOne( OUString const & str )
throw (RuntimeException)
{
m_sData = str;
return OUString( RTL_CONSTASCII_USTRINGPARAM(
"called methodOne() of MyService2 implementation: ") ) + m_sData;
return OUString( "called methodOne() of MyService2 implementation: " ) + m_sData;
}
OUString MyService2Impl::methodTwo( )
throw (RuntimeException)
{
return OUString( RTL_CONSTASCII_USTRINGPARAM(
"called methodTwo() of MyService2 implementation: ") ) + m_sData;
return OUString( "called methodTwo() of MyService2 implementation: " ) + m_sData;
}
// XServiceInfo implementation
......
......@@ -189,15 +189,15 @@ void SAL_CALL FilterDetect::initialize( const Sequence< Any >& aArguments )
nLength = aAnySeq.getLength();
for ( sal_Int32 i = 0 ; i < nLength; i++)
{
if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "Type" ) ) )
if ( pValue[i].Name == "Type" )
{
pValue[i].Value >>= msFilterName;
}
else if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "UserData" ) ) )
else if ( pValue[i].Name == "UserData" )
{
pValue[i].Value >>= msUserData;
}
else if ( pValue[i].Name.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "TemplateName" ) ) )
else if ( pValue[i].Name == "TemplateName" )
{
pValue[i].Value>>=msTemplateName;
}
......@@ -224,7 +224,7 @@ Sequence< OUString > SAL_CALL FilterDetect_getSupportedServiceNames( )
{
Sequence < OUString > aRet(2);
OUString* pArray = aRet.getArray();
pArray[0] = OUString ( RTL_CONSTASCII_USTRINGPARAM ( SERVICE_NAME1 ) );
pArray[0] = OUString ( SERVICE_NAME1 );
return aRet;
}
#undef SERVICE_NAME1
......
......@@ -56,7 +56,7 @@ SAL_IMPLEMENT_MAIN()
OUStringBuffer buf( 128 );
// append an ascii string
buf.appendAscii( "pi ( here " );
buf.append( "pi ( here " );
// numbers can be simply appended
buf.append( pi );
......@@ -64,11 +64,11 @@ SAL_IMPLEMENT_MAIN()
// lets the compiler count the stringlength, so this is more efficient than
// the above appendAscii call, where length of the string must be calculated at
// runtime
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" ) multiplied with " ) );
buf.append( " ) multiplied with " );
buf.append( n );
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(" gives ") );
buf.append( " gives " );
buf.append( (double)( n * pi ) );
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( "." ) );
buf.append( "." );
// now transfer the buffer into the string.
// afterwards buffer is empty and may be reused again !
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment