[Libreoffice-commits] core.git: odk/examples

Chr. Rossmanith ChrRossmanith at gmx.de
Sun Mar 31 07:50:53 PDT 2013


 odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx                |    6 +++---
 odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx            |    2 +-
 odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx                           |    6 ++----
 odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx                           |    6 ++----
 odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx |    8 ++++----
 odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx                               |    8 ++++----
 6 files changed, 16 insertions(+), 20 deletions(-)

New commits:
commit 4ec9f5d768455014a3c1a189b4168dd8a926a9bc
Author: Chr. Rossmanith <ChrRossmanith at gmx.de>
Date:   Sat Mar 30 21:28:56 2013 +0100

    Remove RTL_CONSTASCII_(U)STRINGPARAM in odk(Developersguide)
    
    Change-Id: Ic2a2cf04a691f628e862e81579d3d55d261fc492

diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx
index ce48345..a9d78f9 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx
@@ -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;
 }
 
diff --git a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
index 164cf64..d2eda76 100644
--- a/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
+++ b/odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/component.cxx
@@ -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())
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
index a43156a..a5cad0e 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
@@ -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
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
index ba6bf5d..ac86ea1 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
@@ -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
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx
index 66432c7..65cff20 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx
@@ -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
diff --git a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx
index c3c37e4..b5b7823 100644
--- a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx
+++ b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/string_samples.cxx
@@ -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 !


More information about the Libreoffice-commits mailing list