summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
Diffstat (limited to 'basic')
-rw-r--r--basic/source/uno/namecont.cxx47
1 files changed, 22 insertions, 25 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 67451fa117..9efa92eec6 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -340,14 +340,14 @@ SfxLibraryContainer::SfxLibraryContainer( void )
}
mxSFI = Reference< XSimpleFileAccess >( mxMSF->createInstance
- ( OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY );
+ ( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")) ), UNO_QUERY );
if( !mxSFI.is() )
{
OSL_ENSURE( 0, "### couln't create SimpleFileAccess component\n" );
}
mxStringSubstitution = Reference< XStringSubstitution >( mxMSF->createInstance
- ( OUString::createFromAscii( "com.sun.star.util.PathSubstitution" ) ), UNO_QUERY );
+ ( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSubstitution")) ), UNO_QUERY );
if( !mxStringSubstitution.is() )
{
OSL_ENSURE( 0, "### couln't create PathSubstitution component\n" );
@@ -532,14 +532,14 @@ static void createVariableURL( OUString& rStr, const OUString& rLibName,
const OUString& rInfoFileName, bool bUser )
{
if( bUser )
- rStr = OUString::createFromAscii( "$(USER)/basic/" );
+ rStr = OUString(RTL_CONSTASCII_USTRINGPARAM("$(USER)/basic/"));
else
- rStr = OUString::createFromAscii( "$(INST)/share/basic/" );
+ rStr = OUString(RTL_CONSTASCII_USTRINGPARAM("$(INST)/share/basic/"));
rStr += rLibName;
- rStr += OUString::createFromAscii( "/" );
+ rStr += OUString(sal_Unicode('/'));
rStr += rInfoFileName;
- rStr += OUString::createFromAscii( ".xlb/" );
+ rStr += OUString(RTL_CONSTASCII_USTRINGPARAM(".xlb/"));
}
sal_Bool SfxLibraryContainer::init( const OUString& rInitialDocumentURL, const uno::Reference< embed::XStorage >& rxInitialStorage )
@@ -1075,10 +1075,10 @@ sal_Bool SfxLibraryContainer::init_Impl(
mxSFI->move( aFolderUserBasic, aPrevFolder );
mxSFI->move( aFolderTmp, aFolderUserBasic );
- OUString aUserSearchStr = OUString::createFromAscii( "vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE" );
- OUString aSharedSearchStr = OUString::createFromAscii( "vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE" );
- OUString aBundledSearchStr = OUString::createFromAscii( "vnd.sun.star.expand:$BUNDLED_EXTENSIONS" );
- OUString aInstSearchStr = OUString::createFromAscii( "$(INST)" );
+ OUString aUserSearchStr(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE"));
+ OUString aSharedSearchStr(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE"));
+ OUString aBundledSearchStr(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.expand:$BUNDLED_EXTENSIONS"));
+ OUString aInstSearchStr(RTL_CONSTASCII_USTRINGPARAM("$(INST)"));
Sequence< OUString > aNames = pPrevCont->getElementNames();
const OUString* pNames = aNames.getConstArray();
@@ -1226,9 +1226,9 @@ void SfxLibraryContainer::implScanExtensions( void )
// Add index file to URL
OUString aIndexFileURL = aLibURL;
if( nReduceCopy == 0 )
- aIndexFileURL += OUString::createFromAscii( "/" );
+ aIndexFileURL += OUString(sal_Unicode('/'));
aIndexFileURL += maInfoFileName;
- aIndexFileURL += OUString::createFromAscii( ".xlb" );
+ aIndexFileURL += OUString(RTL_CONSTASCII_USTRINGPARAM(".xlb"));
// Create link
const bool bReadOnly = false;
@@ -1697,9 +1697,6 @@ sal_Bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
}
catch( Exception& )
{
- // throw WrappedTargetException( OUString::createFromAscii( "parsing error!\n" ),
- // Reference< XInterface >(),
- // makeAny( e ) );
OSL_ENSURE( 0, "Parsing error\n" );
SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aLibInfoPath );
ULONG nErrorCode = ERRCODE_IO_GENERAL;
@@ -2182,9 +2179,9 @@ Reference< XNameAccess > SAL_CALL SfxLibraryContainer::createLibraryLink
maNameContainer.insertByName( Name, aElement );
maModifiable.setModified( sal_True );
- OUString aUserSearchStr = OUString::createFromAscii( "vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE" );
- OUString aSharedSearchStr = OUString::createFromAscii( "vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE" );
- OUString aBundledSearchStr = OUString::createFromAscii( "vnd.sun.star.expand:$BUNDLED_EXTENSIONS" );
+ OUString aUserSearchStr(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE"));
+ OUString aSharedSearchStr(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE"));
+ OUString aBundledSearchStr(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.expand:$BUNDLED_EXTENSIONS"));
if( StorageURL.indexOf( aUserSearchStr ) != -1 )
{
pNewLib->mbExtension = sal_True;
@@ -2709,7 +2706,7 @@ void SAL_CALL SfxLibraryContainer::exportLibrary( const OUString& Name, const OU
if( Handler.is() )
{
xToUseSFI = Reference< XSimpleFileAccess >( mxMSF->createInstance
- ( OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ) ), UNO_QUERY );
+ ( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")) ), UNO_QUERY );
if( xToUseSFI.is() )
xToUseSFI->setInteractionHandler( Handler );
}
@@ -3110,8 +3107,8 @@ void SAL_CALL SfxLibrary::removeContainerListener( const Reference< XContainerLi
//============================================================================
// Implementation class ScriptExtensionIterator
-static rtl::OUString aBasicLibMediaType( rtl::OUString::createFromAscii( "application/vnd.sun.star.basic-library" ) );
-static rtl::OUString aDialogLibMediaType( rtl::OUString::createFromAscii( "application/vnd.sun.star.dialog-library" ) );
+static rtl::OUString aBasicLibMediaType(RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.star.basic-library"));
+static rtl::OUString aDialogLibMediaType(RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.star.dialog-library"));
ScriptExtensionIterator::ScriptExtensionIterator( void )
: m_eState( USER_EXTENSIONS )
@@ -3135,7 +3132,7 @@ ScriptExtensionIterator::ScriptExtensionIterator( void )
if( !m_xContext.is() )
{
throw RuntimeException(
- ::rtl::OUString::createFromAscii( "ScriptExtensionIterator::init(), no XComponentContext" ),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScriptExtensionIterator::init(), no XComponentContext")),
Reference< XInterface >() );
}
}
@@ -3352,7 +3349,7 @@ Reference< deployment::XPackage > ScriptExtensionIterator::implGetNextUserScript
Reference< XExtensionManager > xManager =
ExtensionManager::get( m_xContext );
m_aUserPackagesSeq = xManager->getDeployedExtensions
- (rtl::OUString::createFromAscii("user"),
+ (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("user")),
Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
}
catch( com::sun::star::uno::DeploymentException& )
@@ -3406,7 +3403,7 @@ Reference< deployment::XPackage > ScriptExtensionIterator::implGetNextSharedScri
Reference< XExtensionManager > xSharedManager =
ExtensionManager::get( m_xContext );
m_aSharedPackagesSeq = xSharedManager->getDeployedExtensions
- (rtl::OUString::createFromAscii("shared"),
+ (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("shared")),
Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
}
catch( com::sun::star::uno::DeploymentException& )
@@ -3459,7 +3456,7 @@ Reference< deployment::XPackage > ScriptExtensionIterator::implGetNextBundledScr
Reference< XExtensionManager > xManager =
ExtensionManager::get( m_xContext );
m_aBundledPackagesSeq = xManager->getDeployedExtensions
- (rtl::OUString::createFromAscii("bundled"),
+ (rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("bundled")),
Reference< task::XAbortChannel >(), Reference< ucb::XCommandEnvironment >() );
}
catch( com::sun::star::uno::DeploymentException& )