diff options
author | Paul Trojahn <paul.trojahn@gmail.com> | 2018-10-27 14:52:42 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-11-02 06:22:33 +0100 |
commit | 68af083f9a8e3904aa3c341da5c598212da68f6f (patch) | |
tree | c5d749d23913411650e349f68985c3fa1907b6c3 /sc/inc/editutil.hxx | |
parent | 7d571ce7956d843c4f7ef442abc736b5b0c74c08 (diff) |
tdf#115317 Fix empty url representation
ScTabEditEngine doesn't override CalcFieldValue, so the function in
EditEngine returns a single space as representation. By inheriting from
ScFieldEditEngine the representation is calculated correctly.
Change-Id: I6f3be8bd2c3936acf9f3d082c25c080bd3cbee76
Reviewed-on: https://gerrit.libreoffice.org/62428
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc/inc/editutil.hxx')
-rw-r--r-- | sc/inc/editutil.hxx | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx index 8d4a8a9fc282..a6d96ef73c49 100644 --- a/sc/inc/editutil.hxx +++ b/sc/inc/editutil.hxx @@ -171,15 +171,33 @@ public: void RepeatDefaults(); }; +// for field commands (or just fields?) in a table +class SC_DLLPUBLIC ScFieldEditEngine : public ScEditEngineDefaulter +{ +private: + ScDocument* const mpDoc; + bool bExecuteURL; + +public: + ScFieldEditEngine( + ScDocument* pDoc, SfxItemPool* pEnginePool, SfxItemPool* pTextObjectPool = nullptr, + bool bDeleteEnginePool = false); + + void SetExecuteURL(bool bSet) { bExecuteURL = bSet; } + + virtual void FieldClicked( const SvxFieldItem& rField, sal_Int32, sal_Int32 ) override; + virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor ) override; +}; + // 1/100 mm -class SC_DLLPUBLIC ScTabEditEngine : public ScEditEngineDefaulter +class SC_DLLPUBLIC ScTabEditEngine : public ScFieldEditEngine { private: void Init(const ScPatternAttr& rPattern); public: ScTabEditEngine( ScDocument* pDoc ); // Default - ScTabEditEngine( const ScPatternAttr& rPattern, - SfxItemPool* pEnginePool, + ScTabEditEngine(const ScPatternAttr& rPattern, + SfxItemPool *pEngineItemPool, ScDocument *pDoc, SfxItemPool* pTextObjectPool = nullptr ); }; @@ -197,24 +215,6 @@ struct ScHeaderFieldData ScHeaderFieldData(); }; -// for field commands (or just fields?) in a table -class SC_DLLPUBLIC ScFieldEditEngine : public ScEditEngineDefaulter -{ -private: - ScDocument* const mpDoc; - bool bExecuteURL; - -public: - ScFieldEditEngine( - ScDocument* pDoc, SfxItemPool* pEnginePool, SfxItemPool* pTextObjectPool = nullptr, - bool bDeleteEnginePool = false); - - void SetExecuteURL(bool bSet) { bExecuteURL = bSet; } - - virtual void FieldClicked( const SvxFieldItem& rField, sal_Int32, sal_Int32 ) override; - virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor ) override; -}; - // for headers/footers with fields class SC_DLLPUBLIC ScHeaderEditEngine : public ScEditEngineDefaulter { |