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/global.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/global.hxx')
-rw-r--r-- | sc/inc/global.hxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 2b86a7c1e6db..69e22f530f79 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -485,6 +485,7 @@ class CalendarWrapper; class CollatorWrapper; class IntlWrapper; class OutputDevice; +class ScFieldEditEngine; namespace com { namespace sun { namespace star { namespace lang { @@ -534,6 +535,8 @@ class ScGlobal static IntlWrapper* pScIntlWrapper; static ::com::sun::star::lang::Locale* pLocale; + static ScFieldEditEngine* pFieldEditEngine; + public: static SvtSysLocale* pSysLocale; // for faster access a pointer to the single instance provided by SvtSysLocale @@ -694,6 +697,10 @@ SC_DLLPUBLIC static const sal_Unicode* FindUnquoted( const sal_Unicode* pStri /** Obtain the ordinal suffix for a number according to the system locale */ static String GetOrdinalSuffix( sal_Int32 nNumber); + + /** A static instance of ScFieldEditEngine not capable of resolving + document specific fields, to be used only by ScEditUtil::GetString(). */ + static ScFieldEditEngine& GetStaticFieldEditEngine(); }; #endif |