diff options
Diffstat (limited to 'extensions/source/abpilot/datasourcehandling.cxx')
-rw-r--r-- | extensions/source/abpilot/datasourcehandling.cxx | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index ceb5e90f2515..fd5820fce1ee 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -43,7 +43,7 @@ #include <comphelper/interaction.hxx> #include <comphelper/processfactory.hxx> #include <tools/debug.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <unotools/sharedunocomponent.hxx> #include <vcl/stdtext.hxx> #include <vcl/weld.hxx> @@ -87,10 +87,6 @@ namespace abp using namespace ::com::sun::star::container; using namespace ::com::sun::star::frame; - - struct PackageAccessControl { }; - - static Reference< XDatabaseContext > lcl_getDataSourceContext( const Reference< XComponentContext >& _rxContext ) { Reference<XDatabaseContext> xContext = DatabaseContext::create(_rxContext); @@ -145,11 +141,11 @@ namespace abp { xNewDataSource->setPropertyValue( "URL", - makeAny( OUString::createFromAscii( _pInitialAsciiURL ) ) + Any( OUString::createFromAscii( _pInitialAsciiURL ) ) ); } - aReturn.setDataSource( xNewDataSource, _rName,PackageAccessControl() ); + aReturn.setDataSource( xNewDataSource, _rName ); } catch(const Exception&) { @@ -364,9 +360,9 @@ namespace abp uno::Reference<embed::XStorage> xStorage = pObjectShell->GetStorage(); uno::Sequence<beans::PropertyValue> aSequence = comphelper::InitPropertySequence( { - {"TargetStorage", uno::makeAny(xStorage)}, - {"StreamRelPath", uno::makeAny(aStreamRelPath)}, - {"BaseURI", uno::makeAny(aOwnURL)} + {"TargetStorage", uno::Any(xStorage)}, + {"StreamRelPath", uno::Any(aStreamRelPath)}, + {"BaseURI", uno::Any(aOwnURL)} }); xStorable->storeAsURL(sTmpName, aSequence); m_pImpl->sName = sTmpName; @@ -375,7 +371,7 @@ namespace abp // we can load it again next time the file is imported. uno::Reference<lang::XMultiServiceFactory> xFactory(pObjectShell->GetModel(), uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xPropertySet(xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY); - xPropertySet->setPropertyValue("EmbeddedDatabaseName", uno::makeAny(aStreamRelPath)); + xPropertySet->setPropertyValue("EmbeddedDatabaseName", uno::Any(aStreamRelPath)); } } } @@ -405,7 +401,7 @@ namespace abp } - void ODataSource::setDataSource( const Reference< XPropertySet >& _rxDS,const OUString& _sName, PackageAccessControl ) + void ODataSource::setDataSource( const Reference< XPropertySet >& _rxDS,const OUString& _sName ) { if (m_pImpl->xDataSource.get() == _rxDS.get()) // nothing to do @@ -562,17 +558,17 @@ namespace abp if ( aException.Message.isEmpty() ) { // prepend some context info - SQLContext aDetailedError; - aDetailedError.Message = compmodule::ModuleRes(RID_STR_NOCONNECTION); - aDetailedError.Details = compmodule::ModuleRes(RID_STR_PLEASECHECKSETTINGS); - aDetailedError.NextException = aError; + SQLContext aDetailedError(compmodule::ModuleRes(RID_STR_NOCONNECTION), // message + {}, {}, 0, + aError, // next exception + compmodule::ModuleRes(RID_STR_PLEASECHECKSETTINGS)); // details // handle (aka display) the new context info - xInteractions->handle( new OInteractionRequest( makeAny( aDetailedError ) ) ); + xInteractions->handle( new OInteractionRequest( Any( aDetailedError ) ) ); } else { // handle (aka display) the original error - xInteractions->handle( new OInteractionRequest( makeAny( aException ) ) ); + xInteractions->handle( new OInteractionRequest( Any( aException ) ) ); } } catch( const Exception& ) |