diff options
author | Noel Grandin <noel@peralex.com> | 2013-02-06 14:11:00 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-02-12 10:14:45 +0200 |
commit | a74854cb9aaeb260175d3174185631fc5d37bf9b (patch) | |
tree | b578bf9a5039b3cae3072cb5211a6b0790cc9fa5 | |
parent | b0e7466f9d9dd952b081202145f8a831ce742c76 (diff) |
fdo#46808, script::DocumentDialogLibraryContainer needed a new constructor
Change-Id: I44184dc45150e9b3b8ca4b838ea88ad260578b93
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 8 | ||||
-rw-r--r-- | 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 <com/sun/star/ui/dialogs/XFilterManager.hpp> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <com/sun/star/script/DocumentScriptLibraryContainer.hpp> +#include <com/sun/star/script/DocumentDialogLibraryContainer.hpp> #include <com/sun/star/script/XLibraryContainerPassword.hpp> #include <com/sun/star/script/XLibraryContainerExport.hpp> #include <com/sun/star/task/InteractionHandler.hpp> @@ -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 <Any> 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 ); }; |