diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-18 14:58:56 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-07-18 15:58:19 -0400 |
commit | ae56b364d29f10ef311a070627488838d0deaba5 (patch) | |
tree | b63d9cb6ee45f218c2fd71b55e56a1a071031f1a /sc | |
parent | 4edbaa38af4025564c0154985705c2785b7ff345 (diff) |
Add a variant of set that takes ownership of EditTextObject.
Change-Id: If5f9122213d2f35aabcc66ca70c3d432120995cc
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/cellvalue.hxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/cellvalue.cxx | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sc/inc/cellvalue.hxx b/sc/inc/cellvalue.hxx index 9f6aa8b9895e..9154e30ddacd 100644 --- a/sc/inc/cellvalue.hxx +++ b/sc/inc/cellvalue.hxx @@ -52,6 +52,7 @@ struct SC_DLLPUBLIC ScCellValue void set( double fValue ); void set( const svl::SharedString& rStr ); void set( const EditTextObject& rEditText ); + void set( EditTextObject* pEditText ); void set( ScFormulaCell* pFormula ); /** diff --git a/sc/source/core/data/cellvalue.cxx b/sc/source/core/data/cellvalue.cxx index 797b59eaccc6..b9eb32b2bc34 100644 --- a/sc/source/core/data/cellvalue.cxx +++ b/sc/source/core/data/cellvalue.cxx @@ -291,6 +291,13 @@ void ScCellValue::set( const EditTextObject& rEditText ) mpEditText = rEditText.Clone(); } +void ScCellValue::set( EditTextObject* pEditText ) +{ + clear(); + meType = CELLTYPE_EDIT; + mpEditText = pEditText; +} + void ScCellValue::set( ScFormulaCell* pFormula ) { clear(); |