Kaydet (Commit) 7ccc9aae authored tarafından Gert Faller's avatar Gert Faller

RTL_CONSTASCII_USTRINGPARAM in sdk 1

üst 6fdcddfa
...@@ -109,12 +109,12 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV ...@@ -109,12 +109,12 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
else if(!pBegin->Name.compareToAscii(pUser)) else if(!pBegin->Name.compareToAscii(pUser))
{ {
pBegin->Value >>= aUID; 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)) else if(!pBegin->Name.compareToAscii(pPwd))
{ {
pBegin->Value >>= aPWD; 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)) else if(!pBegin->Name.compareToAscii(pUseCatalog))
{ {
...@@ -123,7 +123,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV ...@@ -123,7 +123,7 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
else if(!pBegin->Name.compareToAscii(pSysDrv)) else if(!pBegin->Name.compareToAscii(pSysDrv))
{ {
pBegin->Value >>= aSysDrvSettings; pBegin->Value >>= aSysDrvSettings;
aDSN += ::rtl::OUString::createFromAscii(";"); aDSN += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";"));
aDSN += aSysDrvSettings; aDSN += aSysDrvSettings;
} }
} }
......
...@@ -557,7 +557,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQL ...@@ -557,7 +557,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQL
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODatabaseMetaData::getURL( ) throw(SQLException, RuntimeException) ::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; return aValue;
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
......
...@@ -79,7 +79,7 @@ void SkeletonDriver::disposing() ...@@ -79,7 +79,7 @@ void SkeletonDriver::disposing()
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
rtl::OUString SkeletonDriver::getImplementationName_Static( ) throw(RuntimeException) 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 // this name is referenced in the configuration and in the skeleton.xml
// Please take care when changing it. // Please take care when changing it.
} }
...@@ -89,7 +89,7 @@ Sequence< ::rtl::OUString > SkeletonDriver::getSupportedServiceNames_Static( ) ...@@ -89,7 +89,7 @@ Sequence< ::rtl::OUString > SkeletonDriver::getSupportedServiceNames_Static( )
// which service is supported // which service is supported
// for more information @see com.sun.star.sdbc.Driver // for more information @see com.sun.star.sdbc.Driver
Sequence< ::rtl::OUString > aSNS( 1 ); 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; return aSNS;
} }
...@@ -134,7 +134,7 @@ sal_Bool SAL_CALL SkeletonDriver::acceptsURL( const ::rtl::OUString& url ) ...@@ -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 // 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. // 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) Sequence< DriverPropertyInfo > SAL_CALL SkeletonDriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException)
......
...@@ -57,14 +57,14 @@ using namespace com::sun::star::util; ...@@ -57,14 +57,14 @@ using namespace com::sun::star::util;
// IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet"); // IMPLEMENT_SERVICE_INFO(OResultSet,"com.sun.star.sdbcx.OResultSet","com.sun.star.sdbc.ResultSet");
::rtl::OUString SAL_CALL OResultSet::getImplementationName( ) throw ( RuntimeException) \ ::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 > SAL_CALL OResultSet::getSupportedServiceNames( ) throw( RuntimeException)
{ {
Sequence< ::rtl::OUString > aSupported(2); Sequence< ::rtl::OUString > aSupported(2);
aSupported[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.ResultSet"); aSupported[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbc.ResultSet"));
aSupported[1] = ::rtl::OUString::createFromAscii("com.sun.star.sdbcx.ResultSet"); aSupported[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdbcx.ResultSet"));
return aSupported; return aSupported;
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
......
...@@ -80,7 +80,7 @@ sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw( ...@@ -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) ::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) ::rtl::OUString SAL_CALL OResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException)
......
...@@ -66,10 +66,9 @@ void REGISTER_PROVIDER( ...@@ -66,10 +66,9 @@ void REGISTER_PROVIDER(
const Sequence< OUString>& Services, const Sequence< OUString>& Services,
const Reference< ::com::sun::star::registry::XRegistryKey > & xKey) const Reference< ::com::sun::star::registry::XRegistryKey > & xKey)
{ {
OUString aMainKeyName; OUString aMainKeyName(RTL_CONSTASCII_USTRINGPARAM("/"));
aMainKeyName = OUString::createFromAscii("/");
aMainKeyName += aServiceImplName; aMainKeyName += aServiceImplName;
aMainKeyName += OUString::createFromAscii("/UNO/SERVICES"); aMainKeyName += OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) ); Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) );
OSL_ENSURE(xNewKey.is(), "SKELETON::component_writeInfo : could not create a registry key !"); OSL_ENSURE(xNewKey.is(), "SKELETON::component_writeInfo : could not create a registry key !");
......
...@@ -67,7 +67,7 @@ sal_Bool SAL_CALL component_writeInfo( ...@@ -67,7 +67,7 @@ sal_Bool SAL_CALL component_writeInfo(
{ {
Reference< XRegistryKey > xNewKey( Reference< XRegistryKey > xNewKey(
reinterpret_cast< XRegistryKey * >( pRegistryKey )->createKey( FilterDetect_getImplementationName() ) ); 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 Sequence< OUString > & rSNL = FilterDetect_getSupportedServiceNames();
const OUString * pArray = rSNL.getConstArray(); const OUString * pArray = rSNL.getConstArray();
......
...@@ -96,7 +96,7 @@ OUString SAL_CALL FilterDetect::detect(Sequence< PropertyValue >& aArguments ) ...@@ -96,7 +96,7 @@ OUString SAL_CALL FilterDetect::detect(Sequence< PropertyValue >& aArguments )
{ {
// open the stream if it was not suplied by the framework // open the stream if it was not suplied by the framework
Reference< XSimpleFileAccess > xSFI(mxMSF->createInstance( 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()) if (sURL.getLength() > 0 && xSFI.is())
{ {
try try
...@@ -151,25 +151,25 @@ OUString SAL_CALL FilterDetect::detect(Sequence< PropertyValue >& aArguments ) ...@@ -151,25 +151,25 @@ OUString SAL_CALL FilterDetect::detect(Sequence< PropertyValue >& aArguments )
// return type for class found // return type for class found
if (aMimeType.equals("application/x-vnd.oasis.opendocument.text") || if (aMimeType.equals("application/x-vnd.oasis.opendocument.text") ||
aMimeType.equals("application/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") || else if (aMimeType.equals("application/x-vnd.oasis.opendocument.text-master") ||
aMimeType.equals("application/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") || else if (aMimeType.equals("application/x-vnd.oasis.openoffice.text-global") ||
aMimeType.equals("application/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") || else if (aMimeType.equals("application/x-vnd.oasis.opendocument.spreadsheet") ||
aMimeType.equals("application/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") || else if (aMimeType.equals("application/x-vnd.oasis.opendocument.drawing") ||
aMimeType.equals("application/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") || else if (aMimeType.equals("application/x-vnd.oasis.opendocument.presentation") ||
aMimeType.equals("application/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") || else if (aMimeType.equals("application/x-vnd.oasis.opendocument.presentation") ||
aMimeType.equals("application/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; return sTypeName;
......
...@@ -162,7 +162,7 @@ sal_Bool XFlatXml::importer( ...@@ -162,7 +162,7 @@ sal_Bool XFlatXml::importer(
// create SAX parser that will read the document file // create SAX parser that will read the document file
// and provide events to xHandler passed to this call // and provide events to xHandler passed to this call
Reference < XParser > xSaxParser( m_rServiceFactory->createInstance( 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()); OSL_ASSERT(xSaxParser.is());
if(!xSaxParser.is())return sal_False; if(!xSaxParser.is())return sal_False;
...@@ -213,7 +213,7 @@ sal_Bool XFlatXml::exporter( ...@@ -213,7 +213,7 @@ sal_Bool XFlatXml::exporter(
// get the document writer // get the document writer
m_rDocumentHandler = Reference<XExtendedDocumentHandler>( m_rDocumentHandler = Reference<XExtendedDocumentHandler>(
m_rServiceFactory->createInstance( m_rServiceFactory->createInstance(
OUString::createFromAscii("com.sun.star.xml.sax.Writer")), OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer"))),
UNO_QUERY); UNO_QUERY);
OSL_ASSERT(m_rDocumentHandler.is()); OSL_ASSERT(m_rDocumentHandler.is());
if (!m_rDocumentHandler.is()) return sal_False; if (!m_rDocumentHandler.is()) return sal_False;
......
...@@ -61,7 +61,7 @@ SAL_IMPLEMENT_MAIN() ...@@ -61,7 +61,7 @@ SAL_IMPLEMENT_MAIN()
// instantiate a sample service with the servicemanager. // instantiate a sample service with the servicemanager.
Reference< XInterface > rInstance = Reference< XInterface > rInstance =
rServiceManager->createInstanceWithContext( rServiceManager->createInstanceWithContext(
OUString::createFromAscii("com.sun.star.bridge.UnoUrlResolver" ), OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.UnoUrlResolver")),
rComponentContext ); rComponentContext );
// Query for the XUnoUrlResolver interface // Query for the XUnoUrlResolver interface
......
...@@ -114,7 +114,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) ...@@ -114,7 +114,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
*/ */
Reference< XInterface > xInterface = Reference< XInterface > xInterface =
xMultiComponentFactoryClient->createInstanceWithContext( xMultiComponentFactoryClient->createInstanceWithContext(
OUString::createFromAscii( "com.sun.star.bridge.UnoUrlResolver" ), OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.bridge.UnoUrlResolver")),
xComponentContext ); xComponentContext );
Reference< XUnoUrlResolver > resolver( xInterface, UNO_QUERY ); Reference< XUnoUrlResolver > resolver( xInterface, UNO_QUERY );
...@@ -135,7 +135,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) ...@@ -135,7 +135,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
// gets the server component context as property of the office component factory // gets the server component context as property of the office component factory
Reference< XPropertySet > xPropSet( xInterface, UNO_QUERY ); 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 // gets the service manager from the office
Reference< XMultiComponentFactory > xMultiComponentFactoryServer( Reference< XMultiComponentFactory > xMultiComponentFactoryServer(
......
...@@ -49,9 +49,9 @@ using com::sun::star::document::XEventBroadcaster; ...@@ -49,9 +49,9 @@ using com::sun::star::document::XEventBroadcaster;
Any SAL_CALL MyJob::execute( const Sequence< NamedValue >& aArguments ) Any SAL_CALL MyJob::execute( const Sequence< NamedValue >& aArguments )
throw ( IllegalArgumentException, Exception, RuntimeException ) 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( 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() ) if ( xBrd.is() )
xBrd->addEventListener( xLstner ); xBrd->addEventListener( xLstner );
return Any(); return Any();
......
...@@ -98,11 +98,11 @@ css::uno::Any SAL_CALL MyListener::execute(const css::uno::Sequence< css::beans: ...@@ -98,11 +98,11 @@ css::uno::Any SAL_CALL MyListener::execute(const css::uno::Sequence< css::beans:
return css::uno::Any(); return css::uno::Any();
css::uno::Reference< css::lang::XServiceInfo > xInfo(xModel, css::uno::UNO_QUERY); 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 = ( sal_Bool bWriter = (
xInfo->supportsService(::rtl::OUString::createFromAscii("com.sun.star.text.TextDocument" )) && xInfo->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument"))) &&
!xInfo->supportsService(::rtl::OUString::createFromAscii("com.sun.star.text.WebDocument" )) && !xInfo->supportsService(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("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.GlobalDocument")))
); );
// Wir interessieren uns nur fr Writer und Calc. Werden hier aber fr // Wir interessieren uns nur fr Writer und Calc. Werden hier aber fr
......
...@@ -72,7 +72,7 @@ SAL_IMPLEMENT_MAIN() ...@@ -72,7 +72,7 @@ SAL_IMPLEMENT_MAIN()
Reference< XSimpleRegistry > xReg = createSimpleRegistry(); Reference< XSimpleRegistry > xReg = createSimpleRegistry();
OSL_ENSURE( xReg.is(), "### cannot get service instance of \"com.sun.star.regiystry.SimpleRegistry\"!" ); 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\"!" ); OSL_ENSURE( xReg->isValid(), "### cannot open test registry \"counter.uno.rdb\"!" );
Reference< XComponentContext > xContext = bootstrap_InitialComponentContext(xReg); Reference< XComponentContext > xContext = bootstrap_InitialComponentContext(xReg);
...@@ -83,21 +83,21 @@ SAL_IMPLEMENT_MAIN() ...@@ -83,21 +83,21 @@ SAL_IMPLEMENT_MAIN()
// register my counter component // register my counter component
Reference< XImplementationRegistration > xImplReg( 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\"!" ); OSL_ENSURE( xImplReg.is(), "### cannot get service instance of \"com.sun.star.registry.ImplementationRegistration\"!" );
if (xImplReg.is()) if (xImplReg.is())
{ {
xImplReg->registerImplementation( 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 UNX
#ifdef MACOSX #ifdef MACOSX
OUString::createFromAscii("counter.uno.dylib"), // component location OUString(RTL_CONSTASCII_USTRINGPARAM("counter.uno.dylib")), // component location
#else #else
OUString::createFromAscii("counter.uno.so"), // component location OUString(RTL_CONSTASCII_USTRINGPARAM("counter.uno.so")), // component location
#endif #endif
#else #else
OUString::createFromAscii("counter.uno.dll"), // component location OUString(RTL_CONSTASCII_USTRINGPARAM("counter.uno.dll")), // component location
#endif #endif
Reference< XSimpleRegistry >() // registry omitted, Reference< XSimpleRegistry >() // registry omitted,
// defaulting to service manager registry used // defaulting to service manager registry used
...@@ -105,7 +105,7 @@ SAL_IMPLEMENT_MAIN() ...@@ -105,7 +105,7 @@ SAL_IMPLEMENT_MAIN()
// get a counter instance // get a counter instance
Reference< XInterface > xx ; 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 ); Reference< XCountable > xCount( xx, UNO_QUERY );
OSL_ENSURE( xCount.is(), "### cannot get service instance of \"foo.Counter\"!" ); OSL_ENSURE( xCount.is(), "### cannot get service instance of \"foo.Counter\"!" );
......
...@@ -148,7 +148,7 @@ sal_Int32 PipeClientMain::run( const Sequence< OUString > & aArguments ) throw ( ...@@ -148,7 +148,7 @@ sal_Int32 PipeClientMain::run( const Sequence< OUString > & aArguments ) throw (
{ {
try { try {
Reference < XInterface > r = 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 ); Reference < XUnoUrlResolver > rResolver( r , UNO_QUERY );
// connect to the remote process and retrieve the initial object // connect to the remote process and retrieve the initial object
...@@ -212,7 +212,7 @@ Sequence< OUString > getSupportedServiceNames() ...@@ -212,7 +212,7 @@ Sequence< OUString > getSupportedServiceNames()
if( !pNames ) if( !pNames )
{ {
static Sequence< OUString > seqNames(1); 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; pNames = &seqNames;
} }
} }
......
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