From a74854cb9aaeb260175d3174185631fc5d37bf9b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 6 Feb 2013 14:11:00 +0200 Subject: fdo#46808, script::DocumentDialogLibraryContainer needed a new constructor Change-Id: I44184dc45150e9b3b8ca4b838ea88ad260578b93 --- basctl/source/basicide/moduldl2.cxx | 8 +++----- offapi/com/sun/star/script/DocumentDialogLibraryContainer.idl | 2 ++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index c64ee319ec1d..92e54d050ed2 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -781,7 +782,6 @@ void LibPage::NewLib() void LibPage::InsertLib() { - Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); // file open dialog Reference < XFilePicker3 > xFP = FilePicker::createWithMode(xContext, TemplateDescription::FILEOPEN_SIMPLE); @@ -858,10 +858,8 @@ void LibPage::InsertLib() OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); if ( xSFA->exists( aDlgURL ) ) { - Sequence aSeqDlgURL(1); - aSeqDlgURL[0] <<= aDlgURL; - xDlgLibContImport = Reference< script::XLibraryContainer2 >( xMSF->createInstanceWithArguments( - "com.sun.star.script.DocumentDialogLibraryContainer", aSeqDlgURL ), UNO_QUERY ); + xDlgLibContImport = Reference< script::XLibraryContainer2 >( + script::DocumentDialogLibraryContainer::createWithURL(xContext, aDlgURL), UNO_QUERY ); } if ( xModLibContImport.is() || xDlgLibContImport.is() ) diff --git a/offapi/com/sun/star/script/DocumentDialogLibraryContainer.idl b/offapi/com/sun/star/script/DocumentDialogLibraryContainer.idl index 7f93192a48ff..3f765f84b259 100644 --- a/offapi/com/sun/star/script/DocumentDialogLibraryContainer.idl +++ b/offapi/com/sun/star/script/DocumentDialogLibraryContainer.idl @@ -54,6 +54,8 @@ service DocumentDialogLibraryContainer : XStorageBasedLibraryContainer */ create( [in] ::com::sun::star::document::XStorageBasedDocument Document ) raises( ::com::sun::star::lang::IllegalArgumentException ); + + createWithURL( [in] string URL ); }; -- cgit