[Libreoffice-commits] .: odk/examples

Gert Faller gfaller at kemper.freedesktop.org
Sat Nov 27 00:11:37 PST 2010


 odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx                             |    6 
 odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.cxx                       |    2 
 odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx                                 |    6 
 odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx                              |    6 
 odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.cxx                      |    2 
 odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx                               |    5 
 odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx       |    2 
 odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx |   16 +-
 odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx           |    4 
 odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx                               |    2 
 odk/examples/cpp/DocumentLoader/DocumentLoader.cxx                                               |    4 
 odk/examples/cpp/complextoolbarcontrols/MyJob.cxx                                                |    4 
 odk/examples/cpp/complextoolbarcontrols/MyListener.cxx                                           |    8 -
 odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx                                    |   80 +++++-----
 odk/examples/cpp/counter/countermain.cxx                                                         |   14 -
 odk/examples/cpp/remoteclient/remoteclient.cxx                                                   |    4 
 16 files changed, 82 insertions(+), 83 deletions(-)

New commits:
commit c057538b74822114620ffb631f4c818b4986f402
Author: Gert Faller <gertfaller at aliceadsl.fr>
Date:   Sat Nov 27 09:10:56 2010 +0100

    RTL_CONSTASCII_USTRINGPARAM in sdk 1

diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx
index 62c7035..d9cfb33 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SConnection.cxx
@@ -109,12 +109,12 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
         else if(!pBegin->Name.compareToAscii(pUser))
         {
             pBegin->Value >>= aUID;
-            aDSN = aDSN + ::rtl::OUString::createFromAscii(";UID=") + aUID;
+            aDSN = aDSN + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";UID=")) + aUID;
         }
         else if(!pBegin->Name.compareToAscii(pPwd))
         {
             pBegin->Value >>= aPWD;
-            aDSN = aDSN + ::rtl::OUString::createFromAscii(";PWD=") + aPWD;
+            aDSN = aDSN + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";PWD=")) + aPWD;
         }
         else if(!pBegin->Name.compareToAscii(pUseCatalog))
         {
@@ -123,7 +123,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
         else if(!pBegin->Name.compareToAscii(pSysDrv))
         {
             pBegin->Value >>= aSysDrvSettings;
-            aDSN += ::rtl::OUString::createFromAscii(";");
+            aDSN += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";"));
             aDSN += aSysDrvSettings;
         }
     }
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.cxx
index b17b805..9f71895 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDatabaseMetaData.cxx
@@ -557,7 +557,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL(  ) throw(SQL
 // -------------------------------------------------------------------------
 ::rtl::OUString SAL_CALL ODatabaseMetaData::getURL(  ) throw(SQLException, RuntimeException)
 {
-    ::rtl::OUString aValue = ::rtl::OUString::createFromAscii("sdbc:skeleton:");
+    ::rtl::OUString aValue(RTL_CONSTASCII_USTRINGPARAM("sdbc:skeleton:"));
     return aValue;
 }
 // -------------------------------------------------------------------------
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx
index d0f435e..39d006d 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx
@@ -79,7 +79,7 @@ void SkeletonDriver::disposing()
 //------------------------------------------------------------------------------
 rtl::OUString SkeletonDriver::getImplementationName_Static(  ) throw(RuntimeException)
 {
-    return rtl::OUString::createFromAscii("com.sun.star.comp.sdbc.SkeletonDriver");
+    return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sdbc.SkeletonDriver"));
         // this name is referenced in the configuration and in the skeleton.xml
         // Please take care when changing it.
 }
@@ -89,7 +89,7 @@ Sequence< ::rtl::OUString > SkeletonDriver::getSupportedServiceNames_Static(  )
     // which service is supported 
     // for more information @see com.sun.star.sdbc.Driver
     Sequence< ::rtl::OUString > aSNS( 1 );
-    aSNS[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.Driver");
+    aSNS[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.Driver"));
     return aSNS;
 }
 
@@ -134,7 +134,7 @@ sal_Bool SAL_CALL SkeletonDriver::acceptsURL( const ::rtl::OUString& url )
 {
     // here we have to look if we support this url format
     // change the URL format to your needs, but please aware that the first on who accepts the URl wins.
-    return (!url.compareTo(::rtl::OUString::createFromAscii("sdbc:skeleton:"),14));
+    return (!url.compareTo(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:skeleton:")),14));
 }
 // --------------------------------------------------------------------------------
 Sequence< DriverPropertyInfo > SAL_CALL SkeletonDriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException)
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx
index 72c23a4..aea4dc6 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx
@@ -57,14 +57,14 @@ using namespace com::sun::star::util;
 //	IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet");
 ::rtl::OUString SAL_CALL OResultSet::getImplementationName(  ) throw ( RuntimeException)	\
 {
-    return ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.skeleton.ResultSet");
+    return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.skeleton.ResultSet"));
 }
 // -------------------------------------------------------------------------
  Sequence< ::rtl::OUString > SAL_CALL OResultSet::getSupportedServiceNames(  ) throw( RuntimeException)
 {
      Sequence< ::rtl::OUString > aSupported(2);
-    aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.ResultSet");
-    aSupported[1] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.ResultSet");
+    aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.ResultSet"));
+    aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.ResultSet"));
     return aSupported;
 }
 // -------------------------------------------------------------------------
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.cxx
index 0f7af1f..53423d5 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSetMetaData.cxx
@@ -80,7 +80,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw(
 
 ::rtl::OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException)
 {
-    return ::rtl::OUString::createFromAscii("Column") + ::rtl::OUString::valueOf(column);
+    return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Column")) + ::rtl::OUString::valueOf(column);
 }
 // -------------------------------------------------------------------------
 ::rtl::OUString SAL_CALL OResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException)
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx
index 2de009d..ecea9b2 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SServices.cxx
@@ -66,10 +66,9 @@ void REGISTER_PROVIDER(
         const Sequence< OUString>& Services, 
         const Reference< ::com::sun::star::registry::XRegistryKey > & xKey)
 {
-    OUString aMainKeyName;
-    aMainKeyName = OUString::createFromAscii("/");
+    OUString aMainKeyName(RTL_CONSTASCII_USTRINGPARAM("/"));
     aMainKeyName += aServiceImplName;
-    aMainKeyName += OUString::createFromAscii("/UNO/SERVICES");
+    aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
 
     Reference< ::com::sun::star::registry::XRegistryKey >  xNewKey( xKey->createKey(aMainKeyName) );
     OSL_ENSURE(xNewKey.is(), "SKELETON::component_writeInfo : could not create a registry key !");
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx
index bf62c39..b2efd83 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/fdcomp.cxx
@@ -67,7 +67,7 @@ sal_Bool SAL_CALL component_writeInfo(
         {
             Reference< XRegistryKey > xNewKey(
                 reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( FilterDetect_getImplementationName() ) ); 
-            xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
+            xNewKey = xNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES")) );
             
             const Sequence< OUString > & rSNL = FilterDetect_getSupportedServiceNames();
             const OUString * pArray = rSNL.getConstArray();
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx
index b9fbd7c..a9fca2f 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection/filterdetect.cxx
@@ -96,7 +96,7 @@ OUString SAL_CALL FilterDetect::detect(Sequence< PropertyValue >& aArguments )
     {
         // open the stream if it was not suplied by the framework
         Reference< XSimpleFileAccess > xSFI(mxMSF->createInstance(
-            OUString::createFromAscii("com.sun.star.ucb.SimpleFileAccess" )), UNO_QUERY);
+            OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess"))), UNO_QUERY);
         if (sURL.getLength() > 0 && xSFI.is())
         {
             try
@@ -151,25 +151,25 @@ OUString SAL_CALL FilterDetect::detect(Sequence< PropertyValue >& aArguments )
             // return type for class found
             if      (aMimeType.equals("application/x-vnd.oasis.opendocument.text") ||
                        aMimeType.equals("application/vnd.oasis.opendocument.text")) 
-                sTypeName = OUString::createFromAscii("devguide_FlatXMLType_Cpp_writer");
+                sTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("devguide_FlatXMLType_Cpp_writer"));
             else if (aMimeType.equals("application/x-vnd.oasis.opendocument.text-master") ||
                        aMimeType.equals("application/vnd.oasis.opendocument.text-master")) 
-                sTypeName = OUString::createFromAscii("devguide_FlatXMLType_Cpp_master"); 
+                sTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("devguide_FlatXMLType_Cpp_master"));
            else if (aMimeType.equals("application/x-vnd.oasis.openoffice.text-global") ||
                       aMimeType.equals("application/vnd.oasis.openoffice.text-global")) 
-                sTypeName = OUString::createFromAscii("devguide_FlatXMLType_Cpp_master"); 
+                sTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("devguide_FlatXMLType_Cpp_master"));
            else if (aMimeType.equals("application/x-vnd.oasis.opendocument.spreadsheet") ||
                        aMimeType.equals("application/vnd.oasis.opendocument.spreadsheet")) 
-                sTypeName = OUString::createFromAscii("devguide_FlatXMLType_Cpp_calc"); 
+                sTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("devguide_FlatXMLType_Cpp_calc"));
             else if (aMimeType.equals("application/x-vnd.oasis.opendocument.drawing") ||
                        aMimeType.equals("application/vnd.oasis.opendocument.drawing")) 
-                sTypeName = OUString::createFromAscii("devguide_FlatXMLType_Cpp_draw"); 
+                sTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("devguide_FlatXMLType_Cpp_draw"));
             else if (aMimeType.equals("application/x-vnd.oasis.opendocument.presentation") ||
                        aMimeType.equals("application/vnd.oasis.opendocument.presentation")) 
-                sTypeName = OUString::createFromAscii("devguide_FlatXMLType_Cpp_impress");
+                sTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("devguide_FlatXMLType_Cpp_impress"));
             else if (aMimeType.equals("application/x-vnd.oasis.opendocument.presentation") ||
                        aMimeType.equals("application/vnd.oasis.opendocument.presentation"))
-                sTypeName = OUString::createFromAscii("devguide_FlatXMLType_Cpp_impress");                 
+                sTypeName = OUString(RTL_CONSTASCII_USTRINGPARAM("devguide_FlatXMLType_Cpp_impress"));
         }
     }
     return sTypeName;
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
index 34ae11c..ac46ec7 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
@@ -162,7 +162,7 @@ sal_Bool XFlatXml::importer(
     // create SAX parser that will read the document file
     // and provide events to xHandler passed to this call
     Reference < XParser > xSaxParser( m_rServiceFactory->createInstance( 
-        OUString::createFromAscii("com.sun.star.xml.sax.Parser")), UNO_QUERY );
+        OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser"))), UNO_QUERY );
     OSL_ASSERT(xSaxParser.is());
     if(!xSaxParser.is())return sal_False;
 
@@ -213,7 +213,7 @@ sal_Bool XFlatXml::exporter(
         // get the document writer
         m_rDocumentHandler = Reference<XExtendedDocumentHandler>(
             m_rServiceFactory->createInstance(
-            OUString::createFromAscii("com.sun.star.xml.sax.Writer")),
+            OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer"))),
                 UNO_QUERY);
         OSL_ASSERT(m_rDocumentHandler.is());
         if (!m_rDocumentHandler.is()) return sal_False;
diff --git a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx
index 5361027..f859b4b 100644
--- a/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx
+++ b/odk/examples/DevelopersGuide/ProfUNO/CppBinding/office_connect.cxx
@@ -61,7 +61,7 @@ SAL_IMPLEMENT_MAIN()
     // instantiate a sample service with the servicemanager.
     Reference< XInterface > rInstance =
         rServiceManager->createInstanceWithContext( 
-            OUString::createFromAscii("com.sun.star.bridge.UnoUrlResolver" ),
+            OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.UnoUrlResolver")),
             rComponentContext );
     
     // Query for the XUnoUrlResolver interface
diff --git a/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx b/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx
index 9ef679d..e214390 100644
--- a/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx
+++ b/odk/examples/cpp/DocumentLoader/DocumentLoader.cxx
@@ -114,7 +114,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
     */
     Reference< XInterface > xInterface =
         xMultiComponentFactoryClient->createInstanceWithContext( 
-            OUString::createFromAscii( "com.sun.star.bridge.UnoUrlResolver" ),
+            OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.UnoUrlResolver")),
             xComponentContext );
 
     Reference< XUnoUrlResolver > resolver( xInterface, UNO_QUERY );
@@ -135,7 +135,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
     
     // gets the server component context as property of the office component factory
     Reference< XPropertySet > xPropSet( xInterface, UNO_QUERY );
-    xPropSet->getPropertyValue( OUString::createFromAscii("DefaultContext") ) >>= xComponentContext;
+    xPropSet->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xComponentContext;
 
     // gets the service manager from the office
     Reference< XMultiComponentFactory > xMultiComponentFactoryServer(
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyJob.cxx b/odk/examples/cpp/complextoolbarcontrols/MyJob.cxx
index 0f061b3..d07d67d 100644
--- a/odk/examples/cpp/complextoolbarcontrols/MyJob.cxx
+++ b/odk/examples/cpp/complextoolbarcontrols/MyJob.cxx
@@ -49,9 +49,9 @@ using com::sun::star::document::XEventBroadcaster;
 Any SAL_CALL MyJob::execute( const Sequence< NamedValue >& aArguments )
     throw ( IllegalArgumentException, Exception, RuntimeException )
 {
-    Reference < XEventBroadcaster > xBrd( mxMSF->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.GlobalEventBroadcaster") ), UNO_QUERY );
+    Reference < XEventBroadcaster > xBrd( mxMSF->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.GlobalEventBroadcaster")) ), UNO_QUERY );
     Reference < com::sun::star::document::XEventListener > xLstner( mxMSF->createInstance(
-        ::rtl::OUString::createFromAscii("com.sun.star.comp.Office.MyListener" ) ), UNO_QUERY );
+        ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Office.MyListener")) ), UNO_QUERY );
     if ( xBrd.is() )
         xBrd->addEventListener( xLstner );
     return Any();
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyListener.cxx b/odk/examples/cpp/complextoolbarcontrols/MyListener.cxx
index 0c4f6a1..755e5ba 100644
--- a/odk/examples/cpp/complextoolbarcontrols/MyListener.cxx
+++ b/odk/examples/cpp/complextoolbarcontrols/MyListener.cxx
@@ -98,11 +98,11 @@ css::uno::Any SAL_CALL MyListener::execute(const css::uno::Sequence< css::beans:
         return css::uno::Any();
 
     css::uno::Reference< css::lang::XServiceInfo > xInfo(xModel, css::uno::UNO_QUERY);
-    sal_Bool bCalc   = xInfo->supportsService(::rtl::OUString::createFromAscii("com.sun.star.sheet.SpreadsheetDocument"));
+    sal_Bool bCalc   = xInfo->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument")));
     sal_Bool bWriter = (
-                         xInfo->supportsService(::rtl::OUString::createFromAscii("com.sun.star.text.TextDocument"  )) &&
-                        !xInfo->supportsService(::rtl::OUString::createFromAscii("com.sun.star.text.WebDocument"   )) &&
-                        !xInfo->supportsService(::rtl::OUString::createFromAscii("com.sun.star.text.GlobalDocument"))
+                         xInfo->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument"))) &&
+                        !xInfo->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.WebDocument"))) &&
+                        !xInfo->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.GlobalDocument")))
                        );
 
     // Wir interessieren uns nur für Writer und Calc. Werden hier aber für
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
index dd58c3a..c1866d2 100644
--- a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
+++ b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
@@ -269,9 +269,9 @@ void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < Property
         if ( !aURL.Path.compareToAscii("Command1" ) )
         {
             // open the OpenOffice.org web page
-            ::rtl::OUString sURL(::rtl::OUString::createFromAscii("http://www.openoffice.org"));
+            ::rtl::OUString sURL(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http://www.openoffice.org")));
             Reference< XSystemShellExecute > xSystemShellExecute( mxMSF->createInstance(
-                ::rtl::OUString::createFromAscii( "com.sun.star.system.SystemShellExecute" )), UNO_QUERY );
+                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.system.SystemShellExecute"))), UNO_QUERY );
             if ( xSystemShellExecute.is() )
             {        
                 try
@@ -291,7 +291,7 @@ void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < Property
             Sequence< NamedValue > aRemoveArgs( 1 );
             aRemoveArgs[0].Name  = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Text" ));
             aRemoveArgs[0].Value <<= maComboBoxText;
-            SendCommand( aURL, ::rtl::OUString::createFromAscii( "RemoveEntryText" ), aRemoveArgs, sal_True );
+            SendCommand( aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RemoveEntryText")), aRemoveArgs, sal_True );
 
             // add the new text to the start of the list
             Sequence< NamedValue > aInsertArgs( 2 );
@@ -299,7 +299,7 @@ void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < Property
             aInsertArgs[0].Value <<= sal_Int32( 0 );
             aInsertArgs[1].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Text" ));
             aInsertArgs[1].Value <<= maComboBoxText;
-            SendCommand( aURL, ::rtl::OUString::createFromAscii( "InsertEntry" ), aInsertArgs, sal_True );
+            SendCommand( aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InsertEntry")), aInsertArgs, sal_True );
         }
         else if ( !aURL.Path.compareToAscii("Command3" ) )
         {
@@ -316,15 +316,15 @@ void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < Property
 
             // create new URL to address the combox box
             URL aCmdURL;
-            aCmdURL.Path = rtl::OUString::createFromAscii( "Command2" );
-            aCmdURL.Protocol = rtl::OUString::createFromAscii( "vnd.demo.complextoolbarcontrols.demoaddon:" );
+            aCmdURL.Path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Command2"));
+            aCmdURL.Protocol = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.demo.complextoolbarcontrols.demoaddon:"));
             aCmdURL.Complete = aCmdURL.Path + aCmdURL.Protocol;
             
             // set the selected item as text into the combobox
             Sequence< NamedValue > aArgs( 1 );
-            aArgs[0].Name = rtl::OUString::createFromAscii( "Text" );
+            aArgs[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Text"));
             aArgs[0].Value <<= aText;
-            SendCommand( aCmdURL, ::rtl::OUString::createFromAscii( "SetText" ), aArgs, sal_True );
+            SendCommand( aCmdURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetText")), aArgs, sal_True );
         }
         else if ( !aURL.Path.compareToAscii("Command4" ) )
         {
@@ -349,8 +349,8 @@ void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < Property
 
             // create new URL to address the image button
             URL aCmdURL;
-            aCmdURL.Path = rtl::OUString::createFromAscii( "Command1" );
-            aCmdURL.Protocol = rtl::OUString::createFromAscii( "vnd.demo.complextoolbarcontrols.demoaddon:" );
+            aCmdURL.Path = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Command1"));
+            aCmdURL.Protocol = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.demo.complextoolbarcontrols.demoaddon:"));
             aCmdURL.Complete = aCmdURL.Path + aCmdURL.Protocol;
             
             // create and initialize FeatureStateEvent with IsEnabled
@@ -406,18 +406,18 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
             
             // send command to set context menu content
             Sequence< rtl::OUString > aContextMenu( 3 );
-            aContextMenu[0] = rtl::OUString::createFromAscii( "Command 1" );
-            aContextMenu[1] = rtl::OUString::createFromAscii( "Command 2" );
-            aContextMenu[2] = rtl::OUString::createFromAscii( "Command 3" );
+            aContextMenu[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Command 1"));
+            aContextMenu[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Command 2"));
+            aContextMenu[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Command 3"));
             
-            aArgs[0].Name = rtl::OUString::createFromAscii( "List" );
+            aArgs[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("List"));
             aArgs[0].Value <<= aContextMenu;
-            SendCommandTo( xControl, aURL, rtl::OUString::createFromAscii( "SetList" ), aArgs, sal_True );
+            SendCommandTo( xControl, aURL, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetList")), aArgs, sal_True );
             
             // send command to check item on pos=0
             aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Pos" ));
             aArgs[0].Value <<= sal_Int32( 0 );            
-            SendCommandTo( xControl, aURL, ::rtl::OUString::createFromAscii( "CheckItemPos" ), aArgs, sal_True );
+            SendCommandTo( xControl, aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CheckItemPos")), aArgs, sal_True );
         }
         else if ( aURL.Path.equalsAscii("Command4" ) )
         {
@@ -428,12 +428,12 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
             
             // send command to set context menu content
             Sequence< rtl::OUString > aContextMenu( 2 );
-            aContextMenu[0] = rtl::OUString::createFromAscii( "Button Enabled" );
-            aContextMenu[1] = rtl::OUString::createFromAscii( "Button Disabled" );
+            aContextMenu[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Button Enabled"));
+            aContextMenu[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Button Disabled"));
             
-            aArgs[0].Name = rtl::OUString::createFromAscii( "List" );
+            aArgs[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("List"));
             aArgs[0].Value <<= aContextMenu;
-            SendCommandTo( xControl, aURL, rtl::OUString::createFromAscii( "SetList" ), aArgs, sal_True );            
+            SendCommandTo( xControl, aURL, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetList")), aArgs, sal_True );
 
             // set position according to enable/disable state of button
             sal_Int32 nPos( mbButtonEnabled ? 0 : 1 );
@@ -441,7 +441,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
             // send command to check item on pos=0
             aArgs[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Pos" ));
             aArgs[0].Value <<= nPos;
-            SendCommandTo( xControl, aURL, ::rtl::OUString::createFromAscii( "CheckItemPos" ), aArgs, sal_True );
+            SendCommandTo( xControl, aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CheckItemPos")), aArgs, sal_True );
         }
         else if ( aURL.Path.equalsAscii("Command5" ) )
         {
@@ -449,18 +449,18 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
             Sequence< NamedValue > aArgs( 5 );
             
             // send command to initialize spin button
-            aArgs[0].Name = rtl::OUString::createFromAscii( "Value" );
+            aArgs[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Value"));
             aArgs[0].Value <<= double( 0.0 );
-            aArgs[1].Name = rtl::OUString::createFromAscii( "UpperLimit" );
+            aArgs[1].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UpperLimit"));
             aArgs[1].Value <<= double( 10.0 );
-            aArgs[2].Name = rtl::OUString::createFromAscii( "LowerLimit" );
+            aArgs[2].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LowerLimit"));
             aArgs[2].Value <<= double( 0.0 );
-            aArgs[3].Name = rtl::OUString::createFromAscii( "Step" );
+            aArgs[3].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Step"));
             aArgs[3].Value <<= double( 0.1 );
-            aArgs[4].Name = rtl::OUString::createFromAscii( "OutputFormat" );
-            aArgs[4].Value <<= rtl::OUString::createFromAscii( "%.2f cm" );
+            aArgs[4].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OutputFormat"));
+            aArgs[4].Value <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("%.2f cm"));
 
-            SendCommandTo( xControl, aURL, rtl::OUString::createFromAscii( "SetValues" ), aArgs, sal_True );
+            SendCommandTo( xControl, aURL, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetValues")), aArgs, sal_True );
         }
         else if ( aURL.Path.equalsAscii("Command7" ) )
         {
@@ -470,20 +470,20 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
             
             // send command to set context menu content
             Sequence< rtl::OUString > aList( 10 );
-            aList[0] = rtl::OUString::createFromAscii( "White" );
-            aList[1] = rtl::OUString::createFromAscii( "Black" );
-            aList[2] = rtl::OUString::createFromAscii( "Red" );
-            aList[3] = rtl::OUString::createFromAscii( "Blue" );
-            aList[4] = rtl::OUString::createFromAscii( "Green" );
-            aList[5] = rtl::OUString::createFromAscii( "Grey" );
-            aList[6] = rtl::OUString::createFromAscii( "Yellow" );
-            aList[7] = rtl::OUString::createFromAscii( "Orange" );
-            aList[8] = rtl::OUString::createFromAscii( "Brown" );
-            aList[9] = rtl::OUString::createFromAscii( "Pink" );
+            aList[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("White"));
+            aList[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Black"));
+            aList[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Red"));
+            aList[3] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Blue"));
+            aList[4] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Green"));
+            aList[5] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Grey"));
+            aList[6] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Yellow"));
+            aList[7] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Orange"));
+            aList[8] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Brown"));
+            aList[9] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Pink"));
             
-            aArgs[0].Name = rtl::OUString::createFromAscii( "List" );
+            aArgs[0].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("List"));
             aArgs[0].Value <<= aList;
-            SendCommandTo( xControl, aURL, rtl::OUString::createFromAscii( "SetList" ), aArgs, sal_True );
+            SendCommandTo( xControl, aURL, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetList")), aArgs, sal_True );
         }
 
         aListenerHelper.AddListener( mxFrame, xControl, aURL.Path );
diff --git a/odk/examples/cpp/counter/countermain.cxx b/odk/examples/cpp/counter/countermain.cxx
index 99fcb7e..cce41e8 100644
--- a/odk/examples/cpp/counter/countermain.cxx
+++ b/odk/examples/cpp/counter/countermain.cxx
@@ -72,7 +72,7 @@ SAL_IMPLEMENT_MAIN()
     Reference< XSimpleRegistry > xReg = createSimpleRegistry(); 
     OSL_ENSURE( xReg.is(), "### cannot get service instance of \"com.sun.star.regiystry.SimpleRegistry\"!" );
 
-    xReg->open(OUString::createFromAscii("counter.uno.rdb"), sal_False, sal_False);
+    xReg->open(OUString(RTL_CONSTASCII_USTRINGPARAM("counter.uno.rdb")), sal_False, sal_False);
     OSL_ENSURE( xReg->isValid(), "### cannot open test registry \"counter.uno.rdb\"!" );
 
     Reference< XComponentContext > xContext = bootstrap_InitialComponentContext(xReg);
@@ -83,21 +83,21 @@ SAL_IMPLEMENT_MAIN()
 
     // register my counter component
     Reference< XImplementationRegistration > xImplReg(
-        xMgr->createInstanceWithContext(OUString::createFromAscii("com.sun.star.registry.ImplementationRegistration"), xContext), UNO_QUERY);
+        xMgr->createInstanceWithContext(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration")), xContext), UNO_QUERY);
     OSL_ENSURE( xImplReg.is(), "### cannot get service instance of \"com.sun.star.registry.ImplementationRegistration\"!" );
 
     if (xImplReg.is())
     {
         xImplReg->registerImplementation(
-            OUString::createFromAscii("com.sun.star.loader.SharedLibrary"), // loader for component
+            OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.loader.SharedLibrary")), // loader for component
 #ifdef UNX
 #ifdef MACOSX
-            OUString::createFromAscii("counter.uno.dylib"),		// component location
+            OUString(RTL_CONSTASCII_USTRINGPARAM("counter.uno.dylib")),		// component location
 #else
-            OUString::createFromAscii("counter.uno.so"),		// component location
+            OUString(RTL_CONSTASCII_USTRINGPARAM("counter.uno.so")),		// component location
 #endif
 #else
-            OUString::createFromAscii("counter.uno.dll"),		// component location
+            OUString(RTL_CONSTASCII_USTRINGPARAM("counter.uno.dll")),		// component location
 #endif
             Reference< XSimpleRegistry >()	 // registry omitted,
                                              // defaulting to service manager registry used
@@ -105,7 +105,7 @@ SAL_IMPLEMENT_MAIN()
         
         // get a counter instance
         Reference< XInterface > xx ;
-        xx = xMgr->createInstanceWithContext(OUString::createFromAscii("foo.Counter"), xContext);
+        xx = xMgr->createInstanceWithContext(OUString(RTL_CONSTASCII_USTRINGPARAM("foo.Counter")), xContext);
         Reference< XCountable > xCount( xx, UNO_QUERY );
         OSL_ENSURE( xCount.is(), "### cannot get service instance of \"foo.Counter\"!" );
 
diff --git a/odk/examples/cpp/remoteclient/remoteclient.cxx b/odk/examples/cpp/remoteclient/remoteclient.cxx
index 960f84e..443cf79 100644
--- a/odk/examples/cpp/remoteclient/remoteclient.cxx
+++ b/odk/examples/cpp/remoteclient/remoteclient.cxx
@@ -148,7 +148,7 @@ sal_Int32 PipeClientMain::run( const Sequence< OUString > & aArguments ) throw (
     {
         try {
             Reference < XInterface > r =
-                m_xSMgr->createInstance( OUString::createFromAscii( "com.sun.star.bridge.UnoUrlResolver" ) );
+                m_xSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.UnoUrlResolver")) );
             Reference < XUnoUrlResolver > rResolver( r , UNO_QUERY );
 
             // connect to the remote process and retrieve the initial object
@@ -212,7 +212,7 @@ Sequence< OUString > getSupportedServiceNames()
         if( !pNames )
         {
             static Sequence< OUString > seqNames(1);
-            seqNames.getArray()[0] = OUString::createFromAscii( "com.sun.star.bridge.example.RemoteClientSample" );
+            seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.example.RemoteClientSample"));
             pNames = &seqNames;
         }
     }


More information about the Libreoffice-commits mailing list