summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-12-11 21:50:26 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-12-12 08:40:42 +0100
commit0e25ff00645b0103b6420156388933b6862694a7 (patch)
treef7e34d93cc1d6b168c052336c6ef811ad0d42924
parent01e4c7a68289a0c820ab08c1d447f1779e8adde7 (diff)
getStatusIndicator can apparently return null
...at least in CppunitTests Change-Id: I75f05581db5423dc54ea7810a8cd2bd0f9c0c3f0 (cherry picked from commit defc4faef618d4273ee5056359f4b8e5eed24a7c)
-rw-r--r--sc/source/filter/excel/xestream.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx
index af7aa7846fc3..795f86ba8a5c 100644
--- a/sc/source/filter/excel/xestream.cxx
+++ b/sc/source/filter/excel/xestream.cxx
@@ -1098,7 +1098,8 @@ bool XclExpXmlStream::exportDocument() throw()
uno::Reference<task::XStatusIndicator> xStatusIndicator = getStatusIndicator();
- xStatusIndicator->start(ScGlobal::GetRscString(STR_SAVE_DOC), 100);
+ if (xStatusIndicator.is())
+ xStatusIndicator->start(ScGlobal::GetRscString(STR_SAVE_DOC), 100);
// NOTE: Don't use SotStorage or SvStream any more, and never call
// SfxMedium::GetOutStream() anywhere in the xlsx export filter code!
@@ -1131,13 +1132,16 @@ bool XclExpXmlStream::exportDocument() throw()
// destruct at the end of the block
{
ExcDocument aDocRoot( aRoot );
- xStatusIndicator->setValue(10);
+ if (xStatusIndicator.is())
+ xStatusIndicator->setValue(10);
aDocRoot.ReadDoc();
- xStatusIndicator->setValue(40);
+ if (xStatusIndicator.is())
+ xStatusIndicator->setValue(40);
aDocRoot.WriteXml( *this );
}
- xStatusIndicator->end();
+ if (xStatusIndicator.is())
+ xStatusIndicator->end();
mpRoot = NULL;
return true;
}