summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/basmgr/basicmanagerrepository.cxx3
-rw-r--r--basic/source/inc/scriptcont.hxx8
-rw-r--r--basic/source/uno/scriptcont.cxx11
3 files changed, 20 insertions, 2 deletions
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index 7a2ed5efd20a..803d8ed4caa0 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -35,6 +35,7 @@
#include <vcl/svapp.hxx>
#include <tools/debug.hxx>
#include <comphelper/diagnose_ex.hxx>
+#include <comphelper/servicehelper.hxx>
#include <tools/urlobj.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/documentinfo.hxx>
@@ -462,7 +463,7 @@ namespace basic
}
// knit the containers with the BasicManager
- LibraryContainerInfo aInfo( xBasicLibs, xDialogLibs, dynamic_cast< SfxScriptLibraryContainer* >( xBasicLibs.get() ) );
+ LibraryContainerInfo aInfo( xBasicLibs, xDialogLibs, comphelper::getFromUnoTunnel< SfxScriptLibraryContainer >( xBasicLibs ) );
OSL_ENSURE( aInfo.mpOldBasicPassword, "ImplRepository::impl_createManagerForModel: wrong BasicLibraries implementation!" );
_out_rpBasicManager->SetLibraryContainerInfo( aInfo );
diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx
index 2d0e8bcf3232..f4886d216fad 100644
--- a/basic/source/inc/scriptcont.hxx
+++ b/basic/source/inc/scriptcont.hxx
@@ -21,15 +21,18 @@
#include "namecont.hxx"
#include <basic/basmgr.hxx>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/script/vba/XVBAModuleInfo.hpp>
#include <comphelper/uno3.hxx>
+#include <cppuhelper/implbase.hxx>
#include <cppuhelper/implbase1.hxx>
namespace basic
{
-class SfxScriptLibraryContainer final : public SfxLibraryContainer
+class SfxScriptLibraryContainer final :
+ public cppu::ImplInheritanceHelper<SfxLibraryContainer, css::lang::XUnoTunnel>
{
css::uno::Reference< css::container::XNameAccess > mxCodeNameAccess;
@@ -99,6 +102,9 @@ public:
// Library password handling for 5.0 documents
void setLibraryPassword( const OUString& rLibraryName, const OUString& rPassword );
+
+ sal_Int64 SAL_CALL getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier) override;
+ static css::uno::Sequence<sal_Int8> const & getUnoTunnelId();
};
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index eea449ac47fc..ea69032aa795 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/task/ErrorCodeIOException.hpp>
#include <com/sun/star/script/ModuleType.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <comphelper/servicehelper.hxx>
#include <comphelper/storagehelper.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <sal/log.hxx>
@@ -107,6 +108,16 @@ void SfxScriptLibraryContainer::setLibraryPassword( const OUString& rLibraryName
catch(const NoSuchElementException& ) {}
}
+sal_Int64 SfxScriptLibraryContainer::getSomething(css::uno::Sequence<sal_Int8> const & aIdentifier)
+{
+ return comphelper::getSomethingImpl(aIdentifier, this);
+}
+
+css::uno::Sequence<sal_Int8> const & SfxScriptLibraryContainer::getUnoTunnelId() {
+ static comphelper::UnoIdInit const id;
+ return id.getSeq();
+}
+
// Ctor for service
SfxScriptLibraryContainer::SfxScriptLibraryContainer()
{