diff options
Diffstat (limited to 'sc/source/core/data/cellvalue.cxx')
-rw-r--r-- | sc/source/core/data/cellvalue.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sc/source/core/data/cellvalue.cxx b/sc/source/core/data/cellvalue.cxx index 12ef30272e62..d963fa31bc5a 100644 --- a/sc/source/core/data/cellvalue.cxx +++ b/sc/source/core/data/cellvalue.cxx @@ -227,6 +227,30 @@ void ScCellValue::clear() mfValue = 0.0; } +void ScCellValue::set( const ScRefCellValue& rCell ) +{ + clear(); + + meType = rCell.meType; + switch (meType) + { + case CELLTYPE_VALUE: + mfValue = rCell.mfValue; + break; + case CELLTYPE_STRING: + mpString = new svl::SharedString(*rCell.mpString); + break; + case CELLTYPE_EDIT: + mpEditText = rCell.mpEditText->Clone(); + break; + case CELLTYPE_FORMULA: + mpFormula = rCell.mpFormula->Clone(); + break; + default: + ; + } +} + void ScCellValue::set( double fValue ) { clear(); |