summaryrefslogtreecommitdiff
path: root/sc/source/core/data/cellvalue.cxx
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2017-12-21 19:43:59 -0500
committerAshod Nakashian <ashnakash@gmail.com>2017-12-24 17:09:30 +0100
commitde7392c4967f76d958dd7f2be8ef9e5af90624e2 (patch)
tree1a1bbabc0c23711b16ec7d66931b50fd41514881 /sc/source/core/data/cellvalue.cxx
parent653736fb23346e07e8c0e6e0125689ae1f49f0f7 (diff)
sc: compact ScColumn
Remove ScDocument* member from ScColumn and re-use the one in ScAttrArray. This saves 8 bytes and makes the code more homogenious by using GetDoc() member everywhere. (cherry picked from commit 1168a11278ed3c2a00058e1f802f6e44cb925318) Reviewed-on: https://gerrit.libreoffice.org/46680 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit dc3f0bde0bdef2a1e94055be146b433cb9fc54ba) Change-Id: I16a94b7ef7c45ef3af14e812b45f255f39939a6e Reviewed-on: https://gerrit.libreoffice.org/46990 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'sc/source/core/data/cellvalue.cxx')
-rw-r--r--sc/source/core/data/cellvalue.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/core/data/cellvalue.cxx b/sc/source/core/data/cellvalue.cxx
index abaaad5e8cb6..200b9b3c5282 100644
--- a/sc/source/core/data/cellvalue.cxx
+++ b/sc/source/core/data/cellvalue.cxx
@@ -115,7 +115,7 @@ void commitToColumn( const ScCellValue& rCell, ScColumn& rColumn, SCROW nRow )
rColumn.SetRawString(nRow, *rCell.mpString);
break;
case CELLTYPE_EDIT:
- rColumn.SetEditText(nRow, ScEditUtil::Clone(*rCell.mpEditText, rColumn.GetDoc()));
+ rColumn.SetEditText(nRow, ScEditUtil::Clone(*rCell.mpEditText, *rColumn.GetDoc()));
break;
case CELLTYPE_VALUE:
rColumn.SetValue(nRow, rCell.mfValue);
@@ -123,7 +123,7 @@ void commitToColumn( const ScCellValue& rCell, ScColumn& rColumn, SCROW nRow )
case CELLTYPE_FORMULA:
{
ScAddress aDestPos(rColumn.GetCol(), nRow, rColumn.GetTab());
- rColumn.SetFormulaCell(nRow, new ScFormulaCell(*rCell.mpFormula, rColumn.GetDoc(), aDestPos));
+ rColumn.SetFormulaCell(nRow, new ScFormulaCell(*rCell.mpFormula, *rColumn.GetDoc(), aDestPos));
}
break;
default: