summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorPaul Trojahn <paul.trojahn@gmail.com>2018-10-27 14:52:42 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-11-06 21:58:38 +0100
commit821c9fd85bf49ddab9968c7f1787a265c02d1f01 (patch)
tree94b66f5b4e4f87cb26e8aa950346fb932fb6ca61 /sc/inc
parent20826019d8f77129853712c5fdf5134aff058171 (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> Reviewed-on: https://gerrit.libreoffice.org/62967 Tested-by: Jenkins
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/editutil.hxx42
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
{