diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-02 15:58:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-02 16:30:34 +0200 |
commit | 44b3e56bb4a4df59f53447c4ca4d8e02fe926206 (patch) | |
tree | 71a9efde3a6a2a00688e8feb8e3086cb32eceb4f /basic | |
parent | 0b4965bcd7ec911951e7ca3a4cd48062843b2634 (diff) |
Change INetProtocol to scoped enumeration
...and fix o3tl::enumarray::operator [] const overload
Change-Id: I749b1b9d68686b03a97074253478d9d2d9d32b0b
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/basmgr/basicmanagerrepository.cxx | 2 | ||||
-rw-r--r-- | basic/source/basmgr/basmgr.cxx | 18 | ||||
-rw-r--r-- | basic/source/runtime/methods.cxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/methods1.cxx | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index 3f873e4e6d5c..c12e904d1321 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -288,7 +288,7 @@ namespace basic // The first dir in the path as destination: OUString aFileName( aAppBasic.getName() ); aAppBasic = INetURLObject( aAppBasicDir.getToken(1, ';') ); - DBG_ASSERT(aAppBasic.GetProtocol() != INET_PROT_NOT_VALID, + DBG_ASSERT(aAppBasic.GetProtocol() != INetProtocol::NOT_VALID, OString("Invalid URL: \"" + OUStringToOString(aAppBasicDir, osl_getThreadTextEncoding()) + "\"").getStr()); diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 3472015dafc9..a4527d4a99bf 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -587,7 +587,7 @@ BasicManager::BasicManager( SotStorage& rStorage, const OUString& rBaseURL, Star pLibs->aBasicLibPath = *pLibPath; } OUString aStorName( rStorage.GetName() ); - maStorageName = INetURLObject(aStorName, INET_PROT_FILE).GetMainURL( INetURLObject::NO_DECODE ); + maStorageName = INetURLObject(aStorName, INetProtocol::FILE).GetMainURL( INetURLObject::NO_DECODE ); // If there is no Manager Stream, no further actions are necessary @@ -831,7 +831,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase return; } - maStorageName = INetURLObject(aStorName, INET_PROT_FILE).GetMainURL( INetURLObject::NO_DECODE ); + maStorageName = INetURLObject(aStorName, INetProtocol::FILE).GetMainURL( INetURLObject::NO_DECODE ); // #i13114 removed, DBG_ASSERT(aStorageName.Len() != 0, "Bad storage name"); OUString aRealStorageName = maStorageName; // for relative paths, can be modified through BaseURL @@ -839,7 +839,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase if ( !rBaseURL.isEmpty() ) { INetURLObject aObj( rBaseURL ); - if ( aObj.GetProtocol() == INET_PROT_FILE ) + if ( aObj.GetProtocol() == INetProtocol::FILE ) { aRealStorageName = aObj.PathToFileName(); } @@ -875,7 +875,7 @@ void BasicManager::LoadBasicManager( SotStorage& rStorage, const OUString& rBase // Always try relative first if there are two stands on disk if ( !pInfo->GetRelStorageName().isEmpty() && pInfo->GetRelStorageName() != szImbedded ) { - INetURLObject aObj( aRealStorageName, INET_PROT_FILE ); + INetURLObject aObj( aRealStorageName, INetProtocol::FILE ); aObj.removeSegment(); bool bWasAbsolute = false; aObj = aObj.smartRel2Abs( pInfo->GetRelStorageName(), bWasAbsolute ); @@ -946,7 +946,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage ) if ( !aLibs.isEmpty() ) { OUString aCurStorageName( aStorName ); - INetURLObject aCurStorage( aCurStorageName, INET_PROT_FILE ); + INetURLObject aCurStorage( aCurStorageName, INetProtocol::FILE ); sal_Int32 nLibs = comphelper::string::getTokenCount(aLibs, LIB_SEP); for ( sal_Int32 nLib = 0; nLib < nLibs; nLib++ ) { @@ -956,7 +956,7 @@ void BasicManager::LoadOldBasicManager( SotStorage& rStorage ) OUString aLibName( aLibInfo.getToken( 0, LIBINFO_SEP ) ); OUString aLibAbsStorageName( aLibInfo.getToken( 1, LIBINFO_SEP ) ); OUString aLibRelStorageName( aLibInfo.getToken( 2, LIBINFO_SEP ) ); - INetURLObject aLibAbsStorage( aLibAbsStorageName, INET_PROT_FILE ); + INetURLObject aLibAbsStorage( aLibAbsStorageName, INetProtocol::FILE ); INetURLObject aLibRelStorage( aStorName ); aLibRelStorage.removeSegment(); @@ -1056,10 +1056,10 @@ bool BasicManager::ImpLoadLibrary( BasicLibInfo* pLibInfo, SotStorage* pCurStora OUString aStorName( pCurStorage->GetName() ); // #i13114 removed, DBG_ASSERT( aStorName.Len(), "No Storage Name!" ); - INetURLObject aCurStorageEntry(aStorName, INET_PROT_FILE); + INetURLObject aCurStorageEntry(aStorName, INetProtocol::FILE); // #i13114 removed, DBG_ASSERT(aCurStorageEntry.GetMainURL( INetURLObject::NO_DECODE ).Len() != 0, "Bad storage name"); - INetURLObject aStorageEntry(aStorageName, INET_PROT_FILE); + INetURLObject aStorageEntry(aStorageName, INetProtocol::FILE); // #i13114 removed, DBG_ASSERT(aCurStorageEntry.GetMainURL( INetURLObject::NO_DECODE ).Len() != 0, "Bad storage name"); if ( aCurStorageEntry == aStorageEntry ) @@ -1235,7 +1235,7 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const OUString& rLibName, OUString aStorName( rStorage.GetName() ); DBG_ASSERT( !aStorName.isEmpty(), "No Storage Name!" ); - OUString aStorageName = INetURLObject(aStorName, INET_PROT_FILE).GetMainURL( INetURLObject::NO_DECODE ); + OUString aStorageName = INetURLObject(aStorName, INetProtocol::FILE).GetMainURL( INetURLObject::NO_DECODE ); DBG_ASSERT(!aStorageName.isEmpty(), "Bad storage name"); OUString aNewLibName( rLibName ); diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index e8502f45d3ed..8dbdf8e4f883 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -628,7 +628,7 @@ RTLFUNC(MkDir) // In vba if the full path is not specified then // folder is created relative to the curdir INetURLObject aURLObj( getFullPath( aPath ) ); - if ( aURLObj.GetProtocol() != INET_PROT_FILE ) + if ( aURLObj.GetProtocol() != INetProtocol::FILE ) { SbxArrayRef pPar = new SbxArray(); SbxVariableRef pResult = new SbxVariable(); diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 2030490b1b4a..59459d932354 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -1644,7 +1644,7 @@ RTLFUNC(ConvertToUrl) if ( rPar.Count() == 2 ) { OUString aStr = rPar.Get(1)->GetOUString(); - INetURLObject aURLObj( aStr, INET_PROT_FILE ); + INetURLObject aURLObj( aStr, INetProtocol::FILE ); OUString aFileURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE ); if( aFileURL.isEmpty() ) { |