diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-08-19 11:15:52 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-08-19 11:15:52 +0200 |
commit | d3d7cb989b8d3c7d8e9947511bf78e9aefedc490 (patch) | |
tree | f3257ee3d45600581affda362986b8288c0dbc7a /framework | |
parent | 236714e86c1c517d84d38395efabaf6e3793d196 (diff) |
Remove ConvertOSLtoUCBURL
"Not all OSL URL's can be mapped to UCB URL's" might have been true in the days
of vnd.sun.star.wfs, but I can't see any good reason for this functionality
today.
Change-Id: Ia887531ee9fa70092766406cee1fc8962576a8ac
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/services/substitutepathvars.cxx | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index 7a86ef6cdcc8..8ab37964527c 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -260,7 +260,6 @@ public: protected: void SetPredefinedPathVariables(); - OUString ConvertOSLtoUCBURL( const OUString& aOSLCompliantURL ) const; // Special case (transient) values can change during runtime! // Don't store them in the pre defined struct @@ -787,21 +786,6 @@ throw ( NoSuchElementException, RuntimeException, std::exception ) return impl_getSubstituteVariableValue( aVariable ); } -OUString SubstitutePathVariables::ConvertOSLtoUCBURL( const OUString& aOSLCompliantURL ) const -{ - OUString aResult; - OUString aTemp; - - osl::FileBase::getSystemPathFromFileURL( aOSLCompliantURL, aTemp ); - osl::FileBase::getFileURLFromSystemPath( aTemp, aResult ); - - // Not all OSL URL's can be mapped to UCB URL's! - if ( aResult.isEmpty() ) - return aOSLCompliantURL; - else - return aResult; -} - OUString SubstitutePathVariables::GetWorkPath() const { OUString aWorkPath; @@ -826,7 +810,7 @@ OUString SubstitutePathVariables::GetWorkVariableValue() const } else aWorkPath = x.get(); - return ConvertOSLtoUCBURL( aWorkPath ); + return aWorkPath; } OUString SubstitutePathVariables::GetHomeVariableValue() const @@ -835,7 +819,7 @@ OUString SubstitutePathVariables::GetHomeVariableValue() const OUString aHomePath; aSecurity.getHomeDir( aHomePath ); - return ConvertOSLtoUCBURL( aHomePath ); + return aHomePath; } OUString SubstitutePathVariables::GetPathVariableValue() const @@ -1086,7 +1070,6 @@ throw ( RuntimeException ) OUString aTemp; if ( osl::FileBase::getFileURLFromSystemPath( rURL, aTemp ) == osl::FileBase::E_None ) { - aTemp = ConvertOSLtoUCBURL( aTemp ); if ( !aTemp.isEmpty() ) { aURL = INetURLObject( aTemp ).GetMainURL( INetURLObject::NO_DECODE ); @@ -1238,7 +1221,7 @@ void SubstitutePathVariables::SetPredefinedPathVariables() // It's not possible to detect when an empty value would actually be used. // (note: getenv is a hack to detect if we're running in a unit test) if (aState == ::utl::Bootstrap::PATH_EXISTS || getenv("SRC_ROOT")) { - m_aPreDefVars.m_FixedVar[ PREDEFVAR_USERPATH ] = ConvertOSLtoUCBURL( sVal ); + m_aPreDefVars.m_FixedVar[ PREDEFVAR_USERPATH ] = sVal; } // Set $(inst), $(instpath), $(insturl) @@ -1297,7 +1280,7 @@ void SubstitutePathVariables::SetPredefinedPathVariables() // Set $(temp) OUString aTmp; osl::FileBase::getTempDirURL( aTmp ); - m_aPreDefVars.m_FixedVar[ PREDEFVAR_TEMP ] = ConvertOSLtoUCBURL( aTmp ); + m_aPreDefVars.m_FixedVar[ PREDEFVAR_TEMP ] = aTmp; } struct Instance { |