Kaydet (Commit) b71fdc67 authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Noel Grandin

remove handing of deprecated Storage path option

The only user of StoragePath was
TemplateFolderCacheImpl::openCacheStream which uses TempPath for
the cache file now.

Change-Id: Ia21b5aa804222f28a3af3779a0ecc4789c1860b3
Reviewed-on: https://gerrit.libreoffice.org/41087Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 9051ceb9
...@@ -56,7 +56,6 @@ public: ...@@ -56,7 +56,6 @@ public:
PATH_MODULE, PATH_MODULE,
PATH_PALETTE, PATH_PALETTE,
PATH_PLUGIN, PATH_PLUGIN,
PATH_STORAGE,
PATH_TEMP, PATH_TEMP,
PATH_TEMPLATE, PATH_TEMPLATE,
PATH_USERCONFIG, PATH_USERCONFIG,
...@@ -88,7 +87,6 @@ public: ...@@ -88,7 +87,6 @@ public:
const OUString& GetModulePath() const; const OUString& GetModulePath() const;
const OUString& GetPalettePath() const; const OUString& GetPalettePath() const;
const OUString& GetPluginPath() const; const OUString& GetPluginPath() const;
const OUString& GetStoragePath() const;
const OUString& GetTempPath() const; const OUString& GetTempPath() const;
const OUString& GetTemplatePath() const; const OUString& GetTemplatePath() const;
const OUString& GetUserConfigPath() const; const OUString& GetUserConfigPath() const;
...@@ -114,7 +112,6 @@ public: ...@@ -114,7 +112,6 @@ public:
void SetModulePath( const OUString& rPath ); void SetModulePath( const OUString& rPath );
void SetPalettePath( const OUString& rPath ); void SetPalettePath( const OUString& rPath );
void SetPluginPath( const OUString& rPath ); void SetPluginPath( const OUString& rPath );
void SetStoragePath( const OUString& rPath );
void SetTempPath( const OUString& rPath ); void SetTempPath( const OUString& rPath );
void SetTemplatePath( const OUString& rPath ); void SetTemplatePath( const OUString& rPath );
void SetUserConfigPath( const OUString& rPath ); void SetUserConfigPath( const OUString& rPath );
......
...@@ -433,7 +433,6 @@ void SfxApplication::GetOptions( SfxItemSet& rSet ) ...@@ -433,7 +433,6 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
case SvtPathOptions::PATH_MODULE: osl::FileBase::getFileURLFromSystemPath( aPathCfg.GetModulePath(), aValue ); break; case SvtPathOptions::PATH_MODULE: osl::FileBase::getFileURLFromSystemPath( aPathCfg.GetModulePath(), aValue ); break;
case SvtPathOptions::PATH_PALETTE: aValue = aPathCfg.GetPalettePath(); break; case SvtPathOptions::PATH_PALETTE: aValue = aPathCfg.GetPalettePath(); break;
case SvtPathOptions::PATH_PLUGIN: osl::FileBase::getFileURLFromSystemPath( aPathCfg.GetPluginPath(), aValue ); break; case SvtPathOptions::PATH_PLUGIN: osl::FileBase::getFileURLFromSystemPath( aPathCfg.GetPluginPath(), aValue ); break;
case SvtPathOptions::PATH_STORAGE: osl::FileBase::getFileURLFromSystemPath( aPathCfg.GetStoragePath(), aValue ); break;
case SvtPathOptions::PATH_TEMP: aValue = aPathCfg.GetTempPath(); break; case SvtPathOptions::PATH_TEMP: aValue = aPathCfg.GetTempPath(); break;
case SvtPathOptions::PATH_TEMPLATE: aValue = aPathCfg.GetTemplatePath(); break; case SvtPathOptions::PATH_TEMPLATE: aValue = aPathCfg.GetTemplatePath(); break;
case SvtPathOptions::PATH_USERCONFIG: aValue = aPathCfg.GetUserConfigPath(); break; case SvtPathOptions::PATH_USERCONFIG: aValue = aPathCfg.GetUserConfigPath(); break;
...@@ -791,14 +790,6 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet) ...@@ -791,14 +790,6 @@ void SfxApplication::SetOptions(const SfxItemSet &rSet)
break; break;
} }
case SvtPathOptions::PATH_STORAGE:
{
OUString aTmp;
if( osl::FileBase::getSystemPathFromFileURL( sValue, aTmp ) == osl::FileBase::E_None )
aPathOptions.SetStoragePath( aTmp );
break;
}
case SvtPathOptions::PATH_TEMP: aPathOptions.SetTempPath( sValue );break; case SvtPathOptions::PATH_TEMP: aPathOptions.SetTempPath( sValue );break;
case SvtPathOptions::PATH_TEMPLATE: aPathOptions.SetTemplatePath( sValue );break; case SvtPathOptions::PATH_TEMPLATE: aPathOptions.SetTemplatePath( sValue );break;
case SvtPathOptions::PATH_USERCONFIG: aPathOptions.SetUserConfigPath( sValue );break; case SvtPathOptions::PATH_USERCONFIG: aPathOptions.SetUserConfigPath( sValue );break;
......
...@@ -691,20 +691,20 @@ namespace svt ...@@ -691,20 +691,20 @@ namespace svt
// close any old stream instance // close any old stream instance
closeCacheStream( ); closeCacheStream( );
// get the storage directory // get the temp directory
OUString sStorageURL = implParseSmart( SvtPathOptions().GetStoragePath() ); OUString sTempURL = implParseSmart( SvtPathOptions().GetTempPath() );
INetURLObject aStorageURL( sStorageURL ); INetURLObject aTempURL( sTempURL );
if ( INetProtocol::NotValid == aStorageURL.GetProtocol() ) if ( INetProtocol::NotValid == aTempURL.GetProtocol() )
{ {
OSL_FAIL( "TemplateFolderCacheImpl::openCacheStream: invalid storage path!" ); OSL_FAIL( "TemplateFolderCacheImpl::openCacheStream: invalid temp path!" );
return false; return false;
} }
// append our name // append our name
aStorageURL.Append( ".templdir.cache" ); aTempURL.Append( ".templdir.cache" );
// open the stream // open the stream
m_pCacheStream = UcbStreamHelper::CreateStream( aStorageURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ), m_pCacheStream = UcbStreamHelper::CreateStream( aTempURL.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ),
_bForRead ? StreamMode::READ | StreamMode::NOCREATE : StreamMode::WRITE | StreamMode::TRUNC ); _bForRead ? StreamMode::READ | StreamMode::NOCREATE : StreamMode::WRITE | StreamMode::TRUNC );
DBG_ASSERT( m_pCacheStream, "TemplateFolderCacheImpl::openCacheStream: could not open/create the cache stream!" ); DBG_ASSERT( m_pCacheStream, "TemplateFolderCacheImpl::openCacheStream: could not open/create the cache stream!" );
if ( m_pCacheStream && m_pCacheStream->GetErrorCode() ) if ( m_pCacheStream && m_pCacheStream->GetErrorCode() )
......
...@@ -112,7 +112,6 @@ class SvtPathOptions_Impl ...@@ -112,7 +112,6 @@ class SvtPathOptions_Impl
const OUString& GetModulePath() { return GetPath( SvtPathOptions::PATH_MODULE ); } const OUString& GetModulePath() { return GetPath( SvtPathOptions::PATH_MODULE ); }
const OUString& GetPalettePath() { return GetPath( SvtPathOptions::PATH_PALETTE ); } const OUString& GetPalettePath() { return GetPath( SvtPathOptions::PATH_PALETTE ); }
const OUString& GetPluginPath() { return GetPath( SvtPathOptions::PATH_PLUGIN ); } const OUString& GetPluginPath() { return GetPath( SvtPathOptions::PATH_PLUGIN ); }
const OUString& GetStoragePath() { return GetPath( SvtPathOptions::PATH_STORAGE ); }
const OUString& GetTempPath() { return GetPath( SvtPathOptions::PATH_TEMP ); } const OUString& GetTempPath() { return GetPath( SvtPathOptions::PATH_TEMP ); }
const OUString& GetTemplatePath() { return GetPath( SvtPathOptions::PATH_TEMPLATE ); } const OUString& GetTemplatePath() { return GetPath( SvtPathOptions::PATH_TEMPLATE ); }
const OUString& GetUserConfigPath() { return GetPath( SvtPathOptions::PATH_USERCONFIG ); } const OUString& GetUserConfigPath() { return GetPath( SvtPathOptions::PATH_USERCONFIG ); }
...@@ -140,7 +139,6 @@ class SvtPathOptions_Impl ...@@ -140,7 +139,6 @@ class SvtPathOptions_Impl
void SetModulePath( const OUString& rPath ) { SetPath( SvtPathOptions::PATH_MODULE, rPath ); } void SetModulePath( const OUString& rPath ) { SetPath( SvtPathOptions::PATH_MODULE, rPath ); }
void SetPalettePath( const OUString& rPath ) { SetPath( SvtPathOptions::PATH_PALETTE, rPath ); } void SetPalettePath( const OUString& rPath ) { SetPath( SvtPathOptions::PATH_PALETTE, rPath ); }
void SetPluginPath( const OUString& rPath ) { SetPath( SvtPathOptions::PATH_PLUGIN, rPath ); } void SetPluginPath( const OUString& rPath ) { SetPath( SvtPathOptions::PATH_PLUGIN, rPath ); }
void SetStoragePath( const OUString& rPath ) { SetPath( SvtPathOptions::PATH_STORAGE, rPath ); }
void SetTempPath( const OUString& rPath ) { SetPath( SvtPathOptions::PATH_TEMP, rPath ); } void SetTempPath( const OUString& rPath ) { SetPath( SvtPathOptions::PATH_TEMP, rPath ); }
void SetTemplatePath( const OUString& rPath ) { SetPath( SvtPathOptions::PATH_TEMPLATE, rPath ); } void SetTemplatePath( const OUString& rPath ) { SetPath( SvtPathOptions::PATH_TEMPLATE, rPath ); }
void SetUserConfigPath( const OUString& rPath ) { SetPath( SvtPathOptions::PATH_USERCONFIG, rPath ); } void SetUserConfigPath( const OUString& rPath ) { SetPath( SvtPathOptions::PATH_USERCONFIG, rPath ); }
...@@ -186,7 +184,6 @@ static const PropertyStruct aPropNames[] = ...@@ -186,7 +184,6 @@ static const PropertyStruct aPropNames[] =
{ "Module", SvtPathOptions::PATH_MODULE }, { "Module", SvtPathOptions::PATH_MODULE },
{ "Palette", SvtPathOptions::PATH_PALETTE }, { "Palette", SvtPathOptions::PATH_PALETTE },
{ "Plugin", SvtPathOptions::PATH_PLUGIN }, { "Plugin", SvtPathOptions::PATH_PLUGIN },
{ "Storage", SvtPathOptions::PATH_STORAGE },
{ "Temp", SvtPathOptions::PATH_TEMP }, { "Temp", SvtPathOptions::PATH_TEMP },
{ "Template", SvtPathOptions::PATH_TEMPLATE }, { "Template", SvtPathOptions::PATH_TEMPLATE },
{ "UserConfig", SvtPathOptions::PATH_USERCONFIG }, { "UserConfig", SvtPathOptions::PATH_USERCONFIG },
...@@ -226,8 +223,7 @@ const OUString& SvtPathOptions_Impl::GetPath( SvtPathOptions::Paths ePath ) ...@@ -226,8 +223,7 @@ const OUString& SvtPathOptions_Impl::GetPath( SvtPathOptions::Paths ePath )
ePath == SvtPathOptions::PATH_FILTER || ePath == SvtPathOptions::PATH_FILTER ||
ePath == SvtPathOptions::PATH_HELP || ePath == SvtPathOptions::PATH_HELP ||
ePath == SvtPathOptions::PATH_MODULE || ePath == SvtPathOptions::PATH_MODULE ||
ePath == SvtPathOptions::PATH_PLUGIN || ePath == SvtPathOptions::PATH_PLUGIN
ePath == SvtPathOptions::PATH_STORAGE
) )
{ {
// These office paths have to be converted to system pates // These office paths have to be converted to system pates
...@@ -278,7 +274,6 @@ void SvtPathOptions_Impl::SetPath( SvtPathOptions::Paths ePath, const OUString& ...@@ -278,7 +274,6 @@ void SvtPathOptions_Impl::SetPath( SvtPathOptions::Paths ePath, const OUString&
case SvtPathOptions::PATH_HELP: case SvtPathOptions::PATH_HELP:
case SvtPathOptions::PATH_MODULE: case SvtPathOptions::PATH_MODULE:
case SvtPathOptions::PATH_PLUGIN: case SvtPathOptions::PATH_PLUGIN:
case SvtPathOptions::PATH_STORAGE:
{ {
// These office paths have to be convert back to UCB-URL's // These office paths have to be convert back to UCB-URL's
osl::FileBase::getFileURLFromSystemPath( rNewPath, aResult ); osl::FileBase::getFileURLFromSystemPath( rNewPath, aResult );
...@@ -550,11 +545,6 @@ const OUString& SvtPathOptions::GetPluginPath() const ...@@ -550,11 +545,6 @@ const OUString& SvtPathOptions::GetPluginPath() const
return pImpl->GetPluginPath(); return pImpl->GetPluginPath();
} }
const OUString& SvtPathOptions::GetStoragePath() const
{
return pImpl->GetStoragePath();
}
const OUString& SvtPathOptions::GetTempPath() const const OUString& SvtPathOptions::GetTempPath() const
{ {
return pImpl->GetTempPath(); return pImpl->GetTempPath();
...@@ -665,11 +655,6 @@ void SvtPathOptions::SetPluginPath( const OUString& rPath ) ...@@ -665,11 +655,6 @@ void SvtPathOptions::SetPluginPath( const OUString& rPath )
pImpl->SetPluginPath( rPath ); pImpl->SetPluginPath( rPath );
} }
void SvtPathOptions::SetStoragePath( const OUString& rPath )
{
pImpl->SetStoragePath( rPath );
}
void SvtPathOptions::SetTempPath( const OUString& rPath ) void SvtPathOptions::SetTempPath( const OUString& rPath )
{ {
pImpl->SetTempPath( rPath ); pImpl->SetTempPath( rPath );
...@@ -768,7 +753,6 @@ bool SvtPathOptions::SearchFile( OUString& rIniFile, Paths ePath ) ...@@ -768,7 +753,6 @@ bool SvtPathOptions::SearchFile( OUString& rIniFile, Paths ePath )
case PATH_MODULE: aPath = GetModulePath(); break; case PATH_MODULE: aPath = GetModulePath(); break;
case PATH_PALETTE: aPath = GetPalettePath(); break; case PATH_PALETTE: aPath = GetPalettePath(); break;
case PATH_PLUGIN: aPath = GetPluginPath(); break; case PATH_PLUGIN: aPath = GetPluginPath(); break;
case PATH_STORAGE: aPath = GetStoragePath(); break;
case PATH_TEMP: aPath = GetTempPath(); break; case PATH_TEMP: aPath = GetTempPath(); break;
case PATH_TEMPLATE: aPath = GetTemplatePath(); break; case PATH_TEMPLATE: aPath = GetTemplatePath(); break;
case PATH_WORK: aPath = GetWorkPath(); break; case PATH_WORK: aPath = GetWorkPath(); break;
......
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