From 87ca88c3994210716b6f4a01b194d03b0cfac3ea Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Wed, 14 Dec 2011 19:59:09 +0100 Subject: ShrinkRefTokenToDataRange:operator(): check if it's really ScDoubleRefToken Resolved scary "ScToken::GetDoubleRef: virtual dummy called" debug message. --- sc/source/ui/unoobj/chart2uno.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sc') diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 97dca67b0857..48651281d6f2 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -1395,6 +1395,11 @@ public: if (ScRefTokenHelper::isExternalRef(rRef)) return; + // Don't assume an ScDoubleRefToken if it isn't. It can be at least an + // ScSingleRefToken, then there isn't anything to shrink. + if (rRef->GetType() != svDoubleRef) + return; + ScComplexRefData& rData = rRef->GetDoubleRef(); ScSingleRefData& s = rData.Ref1; ScSingleRefData& e = rData.Ref2; -- cgit