diff options
author | Serge Krot <Serge.Krot@cib.de> | 2017-12-13 17:13:35 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-12-14 13:25:18 +0100 |
commit | 29378bd510226adb23659525203beec18f8708a3 (patch) | |
tree | 77286470b83b3dc6ff1fa0ebe2972c024e98a3bc /sw/inc/docufld.hxx | |
parent | e6b7f73f06aa35e60b7b56d78f24a724fe7c888e (diff) |
tdf#43569 DOC input: insert ConditionalText field instead of field marks
In case of IF field input inside DOC document the ConditionalText field
should be created instead of the two field marks that leads to handling
of unsupported field routine.
Added unit tests.
Change-Id: I31875d8e6be7f536766ef640a366b843f7e0532c
Reviewed-on: https://gerrit.libreoffice.org/46022
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw/inc/docufld.hxx')
-rw-r--r-- | sw/inc/docufld.hxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx index 7d986154753e..8e0bf46e9ba6 100644 --- a/sw/inc/docufld.hxx +++ b/sw/inc/docufld.hxx @@ -287,7 +287,7 @@ public: bool GetHiddenFlag() const { return bHidden; } }; -class SwHiddenTextField : public SwField +class SW_DLLPUBLIC SwHiddenTextField : public SwField { OUString aTRUEText; ///< Text if condition true. OUString aFALSEText; ///< If condition false. @@ -317,6 +317,10 @@ public: const OUString& rFalse, sal_uInt16 nSubType = TYP_HIDDENTXTFLD); + // nSubType = TYP_CONDTXTFLD + SwHiddenTextField(SwHiddenTextFieldType*, + const OUString& rCondTrueFalse); // value sample: " IF A == B \"TrueText\" \"FalseText\"" + virtual OUString GetFieldName() const override; void Evaluate(SwDoc*); @@ -337,6 +341,11 @@ public: virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override; virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override; + + static void ParseIfFieldDefinition(const OUString& aFieldDefinition, + OUString& rCondition, + OUString& rTrue, + OUString& rFalse); }; // Field that expands to an empty line (without height). |