summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-03-04 09:13:16 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-03-04 11:28:37 +0000
commit4c31dc92b8bdbd85c50e7dc9183530e18f808b30 (patch)
tree3b190d41409e5a7e375d9b644123146a831670f9 /sw/source
parentf8f0a240ae1ad4d9cf9315538666fc8261ed68c5 (diff)
be more robust against missing basic manager
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/ww8/ww8par.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 937415b66e..b1e441282e 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -3967,6 +3967,10 @@ void SwWW8ImplReader::StoreMacroCmds()
pTableStream->Seek(pWwFib->fcCmds);
uno::Reference < embed::XStorage > xRoot(mpDocShell->GetStorage());
+
+ if (!xRoot.is())
+ return;
+
try
{
uno::Reference < io::XStream > xStream =
@@ -4463,7 +4467,9 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
uno::Sequence< uno::Any > aArgs(1);
aArgs[ 0 ] <<= mpDocShell->GetModel();
aGlobs <<= ::comphelper::getProcessServiceFactory()->createInstanceWithArguments( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Globals")), aArgs );
- mpDocShell->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
+ BasicManager *pBasicMan = mpDocShell->GetBasicManager();
+ if (pBasicMan)
+ pBasicMan->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
SvxImportMSVBasic aVBasic(*mpDocShell, *pStg,
pVBAFlags->IsLoadWordBasicCode(),