summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-22 04:57:52 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-22 07:09:24 +0100
commitb979429f1a16fb0558b9eb51f9ac7a51fecfcc2e (patch)
treec9d6d90cec3fa26cb7f4588aef4940570dcfe5a7 /sc
parent86ff8ec2a6da2e7eb50694c1f8242c9e9b713920 (diff)
prevent crash if formula is empty
Change-Id: Ib7bb245fa0c59c9a56441d4c45584b40193b0a32
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xeextlst.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sc/source/filter/excel/xeextlst.cxx b/sc/source/filter/excel/xeextlst.cxx
index cf1963c4badd..a02a10184eb5 100644
--- a/sc/source/filter/excel/xeextlst.cxx
+++ b/sc/source/filter/excel/xeextlst.cxx
@@ -58,8 +58,13 @@ XclExpExtCfvo::XclExpExtCfvo( const XclExpRoot& rRoot, const ScColorScaleEntry&
{
if( rEntry.GetType() == COLORSCALE_FORMULA )
{
- rtl::OUString aFormula = XclXmlUtils::ToOUString( GetRoot().GetDoc(), rSrcPos,
- rEntry.GetFormula()->Clone(), GetRoot().GetOpCodeMap() );
+ const ScTokenArray* pArr = rEntry.GetFormula();
+ rtl::OUString aFormula;
+ if(pArr)
+ {
+ aFormula = XclXmlUtils::ToOUString( GetRoot().GetDoc(), rSrcPos,
+ pArr->Clone(), GetRoot().GetOpCodeMap() );
+ }
maValue = rtl::OUStringToOString(aFormula, RTL_TEXTENCODING_UTF8 );
}
else