summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@suse.com>2013-07-30 17:29:42 +0100
committerFridrich Strba <fridrich@documentfoundation.org>2013-07-31 15:37:42 +0000
commitcba4eda4c9ca1174d7b9f3db821fc3452b4af486 (patch)
treee24d6c9dc31fca54dd6f001372c39e4b85a125b3
parentd125339986db266025faa344f87a89bb34a9901b (diff)
fdo#67547 fix access to methods (getScript) of MasterScriptProvider from VB
access to libreoffice objects ( and methods/properties of those objects ) from VB all goes through the ole automation bridge. There has been a long standing issue where the bridge falls over trying to access methods of the scripting framework MasterScriptProvider object. Change-Id: I3b9391286e1030bef2a12d6e546a5c47a4f68edb (cherry picked from commit 92500896a9d0ba873c06a4a2728eb5a1b9d8f68d) Reviewed-on: https://gerrit.libreoffice.org/5207 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
-rw-r--r--scripting/source/provider/MasterScriptProvider.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index 4362330c7b6b..fb5b51bbc0ba 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -700,7 +700,9 @@ MasterScriptProvider::hasByName( const ::rtl::OUString& aName ) throw (RuntimeEx
result = xCont->hasByName( aName );
}
- else
+ // If this is a document provider then we shouldn't
+ // have a PackageProvider
+ else if (!m_xModel.is())
{
throw RuntimeException( OUSTR("PackageMasterScriptProvider is unitialised"),
Reference< XInterface >() );