ucbhelper::GetLocalFileURL does not use its arg.

This commit is contained in:
Stephan Bergmann 2012-01-20 11:53:46 +01:00
parent 6cd581f240
commit b149b0433d
4 changed files with 5 additions and 13 deletions

View File

@ -2346,7 +2346,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox )
DBG_ASSERT(xManager.is(),
"MyWin::ToolBarHandler(): Service lacks interface");
rtl::OUString aURL(getLocalFileURL(xManager));
rtl::OUString aURL(getLocalFileURL());
String aText(RTL_CONSTASCII_USTRINGPARAM("Local file URL: "));
aText += String(aURL);

View File

@ -48,17 +48,11 @@ namespace ucbhelper {
The result can be used as the rBaseURL parameter of
ucb::getFileURLFromSystemPath().
@param rManager
A content provider manager. Must not be null.
@returns
either a 'root' URL for the most 'local' file content provider, or an
empty string, if no such URL can meaningfully be constructed.
*/
UCBHELPER_DLLPUBLIC rtl::OUString getLocalFileURL(
com::sun::star::uno::Reference<
com::sun::star::ucb::XContentProviderManager > const &
rManager)
UCBHELPER_DLLPUBLIC rtl::OUString getLocalFileURL()
SAL_THROW((com::sun::star::uno::RuntimeException));
//============================================================================

View File

@ -47,9 +47,7 @@ namespace ucbhelper {
//============================================================================
rtl::OUString
getLocalFileURL(
uno::Reference< ucb::XContentProviderManager > const &)
SAL_THROW((uno::RuntimeException))
getLocalFileURL() SAL_THROW((uno::RuntimeException))
{
// If there were more file systems than just "file:///" (e.g., the obsolete
// "vnd.sun.star.wfs:///"), this code should query all relevant UCPs for

View File

@ -117,7 +117,7 @@ bool LocalFileHelper::ConvertPhysicalNameToURL(const rtl::OUString& rName, rtl::
try
{
rtl::OUString aBase( ::ucbhelper::getLocalFileURL( xManager ) );
rtl::OUString aBase( ::ucbhelper::getLocalFileURL() );
rReturn = ::ucbhelper::getFileURLFromSystemPath( xManager, aBase, rName );
}
catch (const ::com::sun::star::uno::RuntimeException&)
@ -145,7 +145,7 @@ bool LocalFileHelper::ConvertURLToPhysicalName(const rtl::OUString& rName, rtl::
try
{
INetURLObject aObj( rName );
INetURLObject aLocal( ::ucbhelper::getLocalFileURL( xManager ) );
INetURLObject aLocal( ::ucbhelper::getLocalFileURL() );
if ( aObj.GetProtocol() == aLocal.GetProtocol() )
rReturn = ::ucbhelper::getSystemPathFromFileURL( xManager, rName );
}