diff options
author | Eike Rathke <erack@redhat.com> | 2013-07-25 15:33:49 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-07-25 16:11:09 +0200 |
commit | 1ecdc7aaf661e97a33cf521f553481d79cd26de2 (patch) | |
tree | 34811d2f9f17691c749622ff61a42b79f1da15d5 /sc/inc/chgtrack.hxx | |
parent | bb98778dbf761a0c88c96117add00a66e5cc6c95 (diff) |
resolved fdo#67249 use ScFieldEditEngine to resolve field content
ScEditUtil::GetString() iterated over the paragraphs of an
EditTextObject where GetText() does not resolve field content but
returns the embedded field markers. To resolve field content an
ScFieldEditEngine is needed.
This makes it necessary to pass an ScDocument* to obtain the
ScFieldEditEngine from, or for cases where there is no ScDocument in the
context use a static ScFieldEditEngine which unfortunately is not
capable of resolving document specific fields of course, such as
DOCINFO_TITLE and TABLE.
Also added unit test.
Change-Id: Ife3c23b2fec2514b32303239d276c49869786eb5
Diffstat (limited to 'sc/inc/chgtrack.hxx')
-rw-r--r-- | sc/inc/chgtrack.hxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx index aef13cf562c8..872f268599e0 100644 --- a/sc/inc/chgtrack.hxx +++ b/sc/inc/chgtrack.hxx @@ -702,7 +702,8 @@ class ScChangeActionContent : public ScChangeAction void SetValueString( OUString& rValue, ScCellValue& rCell, const OUString& rStr, ScDocument* pDoc ); - void GetValueString( OUString& rStr, const OUString& rValue, const ScCellValue& rCell ) const; + void GetValueString( OUString& rStr, const OUString& rValue, const ScCellValue& rCell, + const ScDocument* pDoc ) const; void GetFormulaString( OUString& rStr, const ScFormulaCell* pCell ) const; @@ -788,8 +789,8 @@ public: // assigns string / creates forumula cell void SetOldValue( const OUString& rOld, ScDocument* pDoc ); - void GetOldString( OUString& rStr ) const; - void GetNewString( OUString& rStr ) const; + void GetOldString( OUString& rStr, const ScDocument* pDoc ) const; + void GetNewString( OUString& rStr, const ScDocument* pDoc ) const; SC_DLLPUBLIC const ScCellValue& GetOldCell() const; SC_DLLPUBLIC const ScCellValue& GetNewCell() const; virtual void GetDescription( |