Kaydet (Commit) bdc30530 authored tarafından Caolán McNamara's avatar Caolán McNamara

rBaseURL argument now unused

Change-Id: I02cacfeaf26788ed024fa9753af132f0d5822e6f
üst c89207ea
...@@ -407,7 +407,7 @@ IMPL_LINK_NOARG(SvxHyperlinkNewDocTp, ClickNewHdl_Impl) ...@@ -407,7 +407,7 @@ IMPL_LINK_NOARG(SvxHyperlinkNewDocTp, ClickNewHdl_Impl)
OUString aStrURL; OUString aStrURL;
OUString aTempStrURL( m_pCbbPath->GetText() ); OUString aTempStrURL( m_pCbbPath->GetText() );
utl::LocalFileHelper::ConvertSystemPathToURL( aTempStrURL, m_pCbbPath->GetBaseURL(), aStrURL ); utl::LocalFileHelper::ConvertSystemPathToURL( aTempStrURL, aStrURL );
OUString aStrPath = aStrURL; OUString aStrPath = aStrURL;
bool bZeroPath = aStrPath.isEmpty(); bool bZeroPath = aStrPath.isEmpty();
......
...@@ -118,7 +118,6 @@ OUString SvxHyperlinkDocTp::GetCurrentURL () ...@@ -118,7 +118,6 @@ OUString SvxHyperlinkDocTp::GetCurrentURL ()
// get data from dialog-controls // get data from dialog-controls
OUString aStrURL; OUString aStrURL;
OUString aStrPath ( m_pCbbPath->GetText() ); OUString aStrPath ( m_pCbbPath->GetText() );
const OUString aBaseURL ( m_pCbbPath->GetBaseURL() );
OUString aStrMark( m_pEdTarget->GetText() ); OUString aStrMark( m_pEdTarget->GetText() );
if ( aStrPath != aEmptyStr ) if ( aStrPath != aEmptyStr )
...@@ -127,7 +126,7 @@ OUString SvxHyperlinkDocTp::GetCurrentURL () ...@@ -127,7 +126,7 @@ OUString SvxHyperlinkDocTp::GetCurrentURL ()
if ( aURL.GetProtocol() != INetProtocol::NotValid ) // maybe the path is already a valid if ( aURL.GetProtocol() != INetProtocol::NotValid ) // maybe the path is already a valid
aStrURL = aStrPath; // hyperlink, then we can use this path directly aStrURL = aStrPath; // hyperlink, then we can use this path directly
else else
utl::LocalFileHelper::ConvertSystemPathToURL( aStrPath, aBaseURL, aStrURL ); utl::LocalFileHelper::ConvertSystemPathToURL( aStrPath, aStrURL );
//#105788# always create a URL even if it is not valid //#105788# always create a URL even if it is not valid
if( aStrURL == aEmptyStr ) if( aStrURL == aEmptyStr )
......
...@@ -935,7 +935,7 @@ IMPL_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid ) ...@@ -935,7 +935,7 @@ IMPL_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid )
INetURLObject aFileObject( aFileName ); INetURLObject aFileObject( aFileName );
if ( ( aFileObject.GetProtocol() == INetProtocol::NotValid ) && !aFileName.isEmpty() ) if ( ( aFileObject.GetProtocol() == INetProtocol::NotValid ) && !aFileName.isEmpty() )
{ {
OUString sCompleted = SvtURLBox::ParseSmart( aFileName, _pFileView->GetViewURL(), SvtPathOptions().GetWorkPath() ); OUString sCompleted = SvtURLBox::ParseSmart( aFileName, _pFileView->GetViewURL() );
if ( !sCompleted.isEmpty() ) if ( !sCompleted.isEmpty() )
aFileName = sCompleted; aFileName = sCompleted;
} }
......
...@@ -80,7 +80,7 @@ public: ...@@ -80,7 +80,7 @@ public:
void UpdatePickList( ); void UpdatePickList( );
static OUString ParseSmart( const OUString& aText, const OUString& aBaseURL, const OUString& aWorkDir ); static OUString ParseSmart( const OUString& aText, const OUString& aBaseURL );
void SetFilter(const OUString& _sFilter); void SetFilter(const OUString& _sFilter);
......
...@@ -35,7 +35,7 @@ namespace utl ...@@ -35,7 +35,7 @@ namespace utl
Returning sal_True and an empty URL means that the URL doesn't point to a local file. Returning sal_True and an empty URL means that the URL doesn't point to a local file.
*/ */
static bool ConvertPhysicalNameToURL(const OUString& rName, OUString& rReturn); static bool ConvertPhysicalNameToURL(const OUString& rName, OUString& rReturn);
static bool ConvertSystemPathToURL( const OUString& rName, const OUString& rBaseURL, OUString& rReturn ); static bool ConvertSystemPathToURL( const OUString& rName, OUString& rReturn );
/** /**
Converts a "UCB compatible" URL into a "physical" file name. Converts a "UCB compatible" URL into a "physical" file name.
......
...@@ -2066,7 +2066,7 @@ void ImplSdPPTImport::FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiv ...@@ -2066,7 +2066,7 @@ void ImplSdPPTImport::FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiv
OUString aBookmarkURL( pInfo->GetBookmark() ); OUString aBookmarkURL( pInfo->GetBookmark() );
INetURLObject aURL( pPtr->aTarget ); INetURLObject aURL( pPtr->aTarget );
if( INetProtocol::NotValid == aURL.GetProtocol() ) if( INetProtocol::NotValid == aURL.GetProtocol() )
utl::LocalFileHelper::ConvertSystemPathToURL( pPtr->aTarget, aBaseURL, aBookmarkURL ); utl::LocalFileHelper::ConvertSystemPathToURL( pPtr->aTarget, aBookmarkURL );
if( aBookmarkURL.isEmpty() ) if( aBookmarkURL.isEmpty() )
aBookmarkURL = URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), pPtr->aTarget, URIHelper::GetMaybeFileHdl(), true ); aBookmarkURL = URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), pPtr->aTarget, URIHelper::GetMaybeFileHdl(), true );
pInfo->SetBookmark( aBookmarkURL ); pInfo->SetBookmark( aBookmarkURL );
......
...@@ -564,7 +564,7 @@ OUString lcl_DDE_RelToAbs( const OUString& rTopic, const OUString& rBaseURL ) ...@@ -564,7 +564,7 @@ OUString lcl_DDE_RelToAbs( const OUString& rTopic, const OUString& rBaseURL )
OUString sRet; OUString sRet;
INetURLObject aURL( rTopic ); INetURLObject aURL( rTopic );
if( INetProtocol::NotValid == aURL.GetProtocol() ) if( INetProtocol::NotValid == aURL.GetProtocol() )
utl::LocalFileHelper::ConvertSystemPathToURL( rTopic, rBaseURL, sRet ); utl::LocalFileHelper::ConvertSystemPathToURL( rTopic, sRet );
if( sRet.isEmpty() ) if( sRet.isEmpty() )
sRet = URIHelper::SmartRel2Abs( INetURLObject(rBaseURL), rTopic, URIHelper::GetMaybeFileHdl(), true ); sRet = URIHelper::SmartRel2Abs( INetURLObject(rBaseURL), rTopic, URIHelper::GetMaybeFileHdl(), true );
return sRet; return sRet;
......
...@@ -88,7 +88,7 @@ void SfxURLToolBoxControl_Impl::OpenURL( const OUString& rName, bool /*bNew*/ ) ...@@ -88,7 +88,7 @@ void SfxURLToolBoxControl_Impl::OpenURL( const OUString& rName, bool /*bNew*/ )
if ( aObj.GetProtocol() == INetProtocol::NotValid ) if ( aObj.GetProtocol() == INetProtocol::NotValid )
{ {
OUString aBaseURL = GetURLBox()->GetBaseURL(); OUString aBaseURL = GetURLBox()->GetBaseURL();
aName = SvtURLBox::ParseSmart( rName, aBaseURL, SvtPathOptions().GetWorkPath() ); aName = SvtURLBox::ParseSmart( rName, aBaseURL );
} }
else else
aName = rName; aName = rName;
......
...@@ -460,8 +460,7 @@ void SvtMatchContext_Impl::ReadFolder( const OUString& rURL, ...@@ -460,8 +460,7 @@ void SvtMatchContext_Impl::ReadFolder( const OUString& rURL,
} }
} }
OUString SvtURLBox::ParseSmart( const OUString& _aText, const OUString& _aBaseURL )
OUString SvtURLBox::ParseSmart( const OUString& _aText, const OUString& _aBaseURL, const OUString& aWorkDir )
{ {
OUString aMatch; OUString aMatch;
OUString aText = _aText; OUString aText = _aText;
...@@ -538,14 +537,13 @@ OUString SvtURLBox::ParseSmart( const OUString& _aText, const OUString& _aBaseUR ...@@ -538,14 +537,13 @@ OUString SvtURLBox::ParseSmart( const OUString& _aText, const OUString& _aBaseUR
else else
{ {
OUString aTmpMatch; OUString aTmpMatch;
::utl::LocalFileHelper::ConvertSystemPathToURL( aText, aWorkDir, aTmpMatch ); ::utl::LocalFileHelper::ConvertSystemPathToURL( aText, aTmpMatch );
aMatch = aTmpMatch; aMatch = aTmpMatch;
} }
return aMatch; return aMatch;
} }
void SvtMatchContext_Impl::doExecute() void SvtMatchContext_Impl::doExecute()
{ {
::osl::MutexGuard aGuard( theSvtMatchContextMutex::get() ); ::osl::MutexGuard aGuard( theSvtMatchContextMutex::get() );
...@@ -586,7 +584,7 @@ void SvtMatchContext_Impl::doExecute() ...@@ -586,7 +584,7 @@ void SvtMatchContext_Impl::doExecute()
if( schedule() ) if( schedule() )
{ {
if ( eProt == INetProtocol::NotValid ) if ( eProt == INetProtocol::NotValid )
aMatch = SvtURLBox::ParseSmart( aText, aBaseURL, aWorkDir ); aMatch = SvtURLBox::ParseSmart( aText, aBaseURL );
else else
aMatch = aText; aMatch = aText;
if ( !aMatch.isEmpty() ) if ( !aMatch.isEmpty() )
...@@ -1217,7 +1215,7 @@ OUString SvtURLBox::GetURL() ...@@ -1217,7 +1215,7 @@ OUString SvtURLBox::GetURL()
if ( aObj.GetProtocol() == INetProtocol::NotValid ) if ( aObj.GetProtocol() == INetProtocol::NotValid )
{ {
OUString aName = ParseSmart( aText, aBaseURL, SvtPathOptions().GetWorkPath() ); OUString aName = ParseSmart( aText, aBaseURL );
aObj.SetURL(aName); aObj.SetURL(aName);
OUString aURL( aObj.GetMainURL( INetURLObject::NO_DECODE ) ); OUString aURL( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
if ( aURL.isEmpty() ) if ( aURL.isEmpty() )
......
...@@ -36,7 +36,7 @@ using namespace ::com::sun::star::ucb; ...@@ -36,7 +36,7 @@ using namespace ::com::sun::star::ucb;
namespace utl namespace utl
{ {
bool LocalFileHelper::ConvertSystemPathToURL( const OUString& rName, const OUString&, OUString& rReturn ) bool LocalFileHelper::ConvertSystemPathToURL( const OUString& rName, OUString& rReturn )
{ {
bool ok = osl::FileBase::getFileURLFromSystemPath(rName, rReturn) bool ok = osl::FileBase::getFileURLFromSystemPath(rName, rReturn)
== osl::FileBase::E_None; == osl::FileBase::E_None;
......
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