diff options
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 2 | ||||
-rw-r--r-- | cui/source/dialogs/multifil.cxx | 30 | ||||
-rw-r--r-- | cui/source/options/doclinkdialog.cxx | 4 | ||||
-rw-r--r-- | cui/source/options/optjava.cxx | 1 | ||||
-rw-r--r-- | cui/source/options/optlingu.cxx | 2 |
5 files changed, 16 insertions, 23 deletions
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 51f83198fa31..1b7690a97632 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -138,7 +138,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, try { ::com::sun::star::uno::Reference< XCommandEnvironment > xEnv; - Content aCnt( rStartURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv ); + Content aCnt( rStartURL.GetMainURL( INetURLObject::NO_DECODE ), xEnv, comphelper::getProcessComponentContext() ); Sequence< OUString > aProps( 2 ); aProps.getArray()[ 0 ] = OUString(RTL_CONSTASCII_USTRINGPARAM( "IsFolder" )); diff --git a/cui/source/dialogs/multifil.cxx b/cui/source/dialogs/multifil.cxx index 3137db1dce50..847fa845bc44 100644 --- a/cui/source/dialogs/multifil.cxx +++ b/cui/source/dialogs/multifil.cxx @@ -26,6 +26,9 @@ * ************************************************************************/ +#include "sal/config.h" + +#include <comphelper/processfactory.hxx> #include <tools/shl.hxx> #include <vcl/msgbox.hxx> #include <sfx2/filedlghelper.hxx> @@ -40,8 +43,7 @@ #include <cuires.hrc> // #97807# ------------- -#include <com/sun/star/ucb/XContentProvider.hpp> -#include <ucbhelper/contentbroker.hxx> +#include <com/sun/star/ucb/UniversalContentBroker.hpp> #include "com/sun/star/ui/dialogs/TemplateDescription.hpp" @@ -66,7 +68,7 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn ) // #97807# URL content comparison of entries ----------- INetURLObject aFile( aDlg.GetPath() ); String sInsFile = aFile.getFSysPath( INetURLObject::FSYS_DETECT ); - ::ucbhelper::Content aContent( aFile.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >() ); + ::ucbhelper::Content aContent( aFile.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() ); Reference< XContent > xContent = aContent.get(); OSL_ENSURE( xContent.is(), "AddHdl_Impl: invalid content interface!" ); Reference< XContentIdentifier > xID = xContent->getIdentifier(); @@ -90,7 +92,7 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn ) if( aCur == aFileContentMap.end() ) // look for File Content in aFileContentMap, but not find it. { INetURLObject aVFile( sVFile, INetURLObject::FSYS_DETECT ); - aFileContentMap[sVFile] = ::ucbhelper::Content( aVFile.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >() ); + aFileContentMap[sVFile] = ::ucbhelper::Content( aVFile.GetMainURL( INetURLObject::NO_DECODE ), Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext() ); VContent = aFileContentMap.find( sVFile )->second; } else @@ -99,21 +101,13 @@ IMPL_LINK( SvxMultiFileDialog, AddHdl_Impl, PushButton *, pBtn ) OSL_ENSURE( xVContent.is(), "AddHdl_Impl: invalid content interface!" ); xVID = xVContent->getIdentifier(); OSL_ENSURE( xVID.is(), "AddHdl_Impl: invalid ID interface!" ); - if ( xID.is() && xVID.is() ) + if ( xID.is() && xVID.is() + && ( UniversalContentBroker::create( + comphelper::getProcessComponentContext() )-> + compareContentIds( xID, xVID ) == 0 ) ) { - // get a generic content provider - ::ucbhelper::ContentBroker* pBroker = ::ucbhelper::ContentBroker::get(); - Reference< XContentProvider > xProvider; - if ( pBroker ) - xProvider = pBroker->getContentProviderInterface(); - if ( xProvider.is() ) - { - if ( 0 == xProvider->compareContentIds( xID, xVID ) ) - { - bDuplicated = sal_True; - break; - } - } + bDuplicated = sal_True; + break; } } } // end of if the entries are more than zero. diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx index a672523e553b..d8f68ff4efbc 100644 --- a/cui/source/options/doclinkdialog.cxx +++ b/cui/source/options/doclinkdialog.cxx @@ -30,7 +30,7 @@ #include "doclinkdialog.hrc" #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> - +#include <comphelper/processfactory.hxx> #include <cuires.hrc> #include <svl/filenotation.hxx> #include <vcl/msgbox.hxx> @@ -120,7 +120,7 @@ namespace svx sal_Bool bFileExists = sal_False; try { - ::ucbhelper::Content aFile(sURL, Reference< XCommandEnvironment >()); + ::ucbhelper::Content aFile(sURL, Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext()); if (aFile.isDocument()) bFileExists = sal_True; } diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index c1d6bfb9fdd0..da379c2abb0d 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -44,7 +44,6 @@ #include <sfx2/filedlghelper.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/string.hxx> -#include <ucbhelper/contentbroker.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <com/sun/star/ui/dialogs/XAsynchronousExecutableDialog.hpp> diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index d26f97a1fd20..bf6e37dd10b6 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -174,7 +174,7 @@ sal_Bool KillFile_Impl( const String& rURL ) sal_Bool bRet = sal_True; try { - Content aCnt( rURL, uno::Reference< ::com::sun::star::ucb::XCommandEnvironment > () ); + Content aCnt( rURL, uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() ); aCnt.executeCommand( OUString("delete"), makeAny( sal_Bool( sal_True ) ) ); } catch( ::com::sun::star::ucb::CommandAbortedException& ) |