diff options
Diffstat (limited to 'sc/source/core/data/cellvalue.cxx')
-rw-r--r-- | sc/source/core/data/cellvalue.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sc/source/core/data/cellvalue.cxx b/sc/source/core/data/cellvalue.cxx index c44701dff99d..a1fcfbb4d1ba 100644 --- a/sc/source/core/data/cellvalue.cxx +++ b/sc/source/core/data/cellvalue.cxx @@ -285,8 +285,7 @@ void ScCellValue::assign( const ScDocument& rDoc, const ScAddress& rPos ) { clear(); - ScRefCellValue aRefVal; - aRefVal.assign(const_cast<ScDocument&>(rDoc), rPos); + ScRefCellValue aRefVal(const_cast<ScDocument&>(rDoc), rPos); meType = aRefVal.meType; switch (meType) @@ -494,6 +493,13 @@ ScRefCellValue::ScRefCellValue( ScFormulaCell* pFormula ) : meType(CELLTYPE_FORM // as the pointer values. ScRefCellValue::ScRefCellValue( const ScRefCellValue& r ) : meType(r.meType), mfValue(r.mfValue) {} +ScRefCellValue::ScRefCellValue( ScDocument& rDoc, const ScAddress& rPos ) +{ + const ScRefCellValue& rCell = rDoc.GetRefCellValue(rPos); + meType = rCell.meType; + mfValue = rCell.mfValue; +} + ScRefCellValue::~ScRefCellValue() { clear(); |