summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/inc/cell.hxx2
-rw-r--r--sc/source/core/data/cell.cxx2
-rw-r--r--sc/source/core/data/cell2.cxx10
3 files changed, 8 insertions, 6 deletions
diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx
index b4549d1f2483..5de013037fbe 100644
--- a/sc/inc/cell.hxx
+++ b/sc/inc/cell.hxx
@@ -243,7 +243,7 @@ public:
ScEditCell( const EditTextObject* pObject, ScDocument*,
const SfxItemPool* pFromPool /* = NULL */ );
- ScEditCell( const ScEditCell& rCell, ScDocument& rDoc );
+ ScEditCell(const ScEditCell& rCell, ScDocument& rDoc, const ScAddress& rDestPos);
// for line breaks
ScEditCell( const rtl::OUString& rString, ScDocument* );
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx
index fd9499bece11..3af1a1bf2581 100644
--- a/sc/source/core/data/cell.cxx
+++ b/sc/source/core/data/cell.cxx
@@ -112,7 +112,7 @@ ScBaseCell* lclCloneCell( const ScBaseCell& rSrcCell, ScDocument& rDestDoc, cons
case CELLTYPE_STRING:
return new ScStringCell( static_cast< const ScStringCell& >( rSrcCell ) );
case CELLTYPE_EDIT:
- return new ScEditCell( static_cast< const ScEditCell& >( rSrcCell ), rDestDoc );
+ return new ScEditCell(static_cast<const ScEditCell&>(rSrcCell), rDestDoc, rDestPos);
case CELLTYPE_FORMULA:
return new ScFormulaCell( static_cast< const ScFormulaCell& >( rSrcCell ), rDestDoc, rDestPos, nCloneFlags );
case CELLTYPE_NOTE:
diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx
index de24d1132605..c8c6b9b8af06 100644
--- a/sc/source/core/data/cell2.cxx
+++ b/sc/source/core/data/cell2.cxx
@@ -38,6 +38,7 @@
#include <vcl/mapmod.hxx>
#include <editeng/editobj.hxx>
#include <editeng/editstat.hxx>
+#include "editeng/fieldupdater.hxx"
#include "cell.hxx"
#include "compiler.hxx"
@@ -73,12 +74,13 @@ ScEditCell::ScEditCell( const EditTextObject* pObject, ScDocument* pDocP,
SetTextObject( pObject, pFromPool );
}
-ScEditCell::ScEditCell( const ScEditCell& rCell, ScDocument& rDoc ) :
- ScBaseCell( rCell ),
- pString( NULL ),
- pDoc( &rDoc )
+ScEditCell::ScEditCell(const ScEditCell& rCell, ScDocument& rDoc, const ScAddress& rDestPos) :
+ ScBaseCell(rCell), pString(NULL), pDoc(&rDoc)
{
SetTextObject( rCell.pData, rCell.pDoc->GetEditPool() );
+
+ editeng::FieldUpdater aUpdater = pData->GetFieldUpdater();
+ aUpdater.updateTableFields(rDestPos.Tab());
}
ScEditCell::ScEditCell( const rtl::OUString& rString, ScDocument* pDocP ) :