diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-11-13 11:00:33 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-11-15 15:10:07 +0100 |
commit | 99a97d3807cf8c95ab452d5c16b3079ad62755f0 (patch) | |
tree | 48b9e9708968e4eafd110a83234f96e22051ca61 /sw/inc/expfld.hxx | |
parent | cfb7ee43b05bf8e028ac1490242138c49ffa224e (diff) |
sw_redlinehide_3: add second result to SwGetExpField, SwSetExpField
This is quite tricky & somewhat ugly due to the SwValueField base class
& we need to duplicate its member too :(
It would be possible to filter the deleted fields in
SwDocUpdateField::MakeFieldList(), but the problem with that is that
the instance is long-lived & might be used with different layout
settings, so it's probably better to filter in the 5 or so client
functions that iterate over the GetSortList().
Note that this will also filter other fields including database fields,
hopefully that shouldn't cause problems.
Change-Id: I0cdbc7757fa529598b5dbceec0bd2c4a619be05a
Diffstat (limited to 'sw/inc/expfld.hxx')
-rw-r--r-- | sw/inc/expfld.hxx | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx index 94240200e998..6acf1a02c987 100644 --- a/sw/inc/expfld.hxx +++ b/sw/inc/expfld.hxx @@ -79,7 +79,9 @@ protected: class SW_DLLPUBLIC SwGetExpField : public SwFormulaField { + double m_fValueRLHidden; ///< SwValueField; hidden redlines OUString m_sExpand; + OUString m_sExpandRLHidden; ///< hidden redlines bool m_bIsInBodyText; sal_uInt16 m_nSubType; @@ -87,15 +89,19 @@ class SW_DLLPUBLIC SwGetExpField : public SwFormulaField virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override; virtual std::unique_ptr<SwField> Copy() const override; + using SwFormulaField::GetValue; // hide it, don't use + virtual void SetValue(const double& rVal) override; // hide it public: SwGetExpField( SwGetExpFieldType*, const OUString& rFormel, sal_uInt16 nSubType, sal_uLong nFormat); - virtual void SetValue( const double& rVal ) override; + double GetValue(SwRootFrame const* pLayout) const; + void SetValue(const double& rVal, SwRootFrame const* pLayout); + virtual void SetLanguage(LanguageType nLng) override; - inline void ChgExpStr(const OUString& rExpand); + void ChgExpStr(const OUString& rExpand, SwRootFrame const* pLayout); /// Called by formatting. inline bool IsInBodyText() const; @@ -123,9 +129,6 @@ public: void SetLateInitialization() { m_bLateInitialization = true;} }; -inline void SwGetExpField::ChgExpStr(const OUString& rExpand) - { m_sExpand = rExpand;} - /// Called by formatting. inline bool SwGetExpField::IsInBodyText() const { return m_bIsInBodyText; } @@ -174,7 +177,7 @@ public: void SetDelimiter( const OUString& s ) { m_sDelim = s; } sal_uInt8 GetOutlineLvl() const { return m_nLevel; } void SetOutlineLvl( sal_uInt8 n ) { m_nLevel = n; } - void SetChapter( SwSetExpField& rField, const SwNode& rNd ); + void SetChapter(SwSetExpField& rField, const SwNode& rNd, SwRootFrame const* pLayout); virtual void QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override; virtual void PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; @@ -194,7 +197,9 @@ inline const OUString& SwSetExpFieldType::GetSetRefName() const class SW_DLLPUBLIC SwSetExpField : public SwFormulaField { + double m_fValueRLHidden; ///< SwValueField; hidden redlines OUString msExpand; + OUString msExpandRLHidden; ///< hidden redlines OUString maPText; bool mbInput; sal_uInt16 mnSeqNo; @@ -203,6 +208,8 @@ class SW_DLLPUBLIC SwSetExpField : public SwFormulaField virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override; virtual std::unique_ptr<SwField> Copy() const override; + using SwFormulaField::GetValue; // hide it, don't use + virtual void SetValue(const double& rVal) override; // hide it public: SwSetExpField(SwSetExpFieldType*, const OUString& rFormel, sal_uLong nFormat = 0); @@ -210,11 +217,12 @@ public: void SetFormatField(SwFormatField & rFormatField); SwFormatField* GetFormatField() { return mpFormatField;} - virtual void SetValue( const double& rVal ) override; + double GetValue(SwRootFrame const* pLayout) const; + void SetValue(const double& rVal, SwRootFrame const* pLayout); - inline const OUString& GetExpStr() const; + const OUString& GetExpStr(SwRootFrame const* pLayout) const; - inline void ChgExpStr( const OUString& rExpand ); + void ChgExpStr(const OUString& rExpand, SwRootFrame const* pLayout); inline void SetPromptText(const OUString& rStr); inline const OUString& GetPromptText() const; @@ -243,12 +251,6 @@ public: virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; }; -inline const OUString& SwSetExpField::GetExpStr() const - { return msExpand; } - -inline void SwSetExpField::ChgExpStr( const OUString& rExpand ) - { msExpand = rExpand; } - inline void SwSetExpField::SetPromptText(const OUString& rStr) { maPText = rStr; } |