diff options
Diffstat (limited to 'sc/inc')
-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 6aac49e77f51..451e7f60e377 100644 --- a/sc/inc/editutil.hxx +++ b/sc/inc/editutil.hxx @@ -172,15 +172,33 @@ public: void RepeatDefaults(); }; +// for field commands (or just fields?) in a table +class SC_DLLPUBLIC ScFieldEditEngine : public ScEditEngineDefaulter +{ +private: + ScDocument* 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 ); }; @@ -199,24 +217,6 @@ struct ScHeaderFieldData ScHeaderFieldData(); }; -// for field commands (or just fields?) in a table -class SC_DLLPUBLIC ScFieldEditEngine : public ScEditEngineDefaulter -{ -private: - ScDocument* 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 { |