framework/source/services/substitutepathvars.cxx | 25 +++-------------------- 1 file changed, 4 insertions(+), 21 deletions(-)
New commits: commit d3d7cb989b8d3c7d8e9947511bf78e9aefedc490 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Aug 19 11:15:52 2015 +0200 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 diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index 7a86ef6..8ab3796 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 { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits