diff options
author | Eike Rathke <erack@redhat.com> | 2016-11-16 18:23:25 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-11-16 18:24:00 +0100 |
commit | 83cbbc6d664d949f6405409713c5bda1a5be559f (patch) | |
tree | d7d06317429e5b22c14ebe7d7522d6afcc174a90 /sc/inc | |
parent | ed5a8df72ac2d14aa2f5d1f87543fcfff9ad9d7d (diff) |
tdf#96475 restore the EmptyDisplayedAsString condition during load
So also "empty" result cells with a number format applied are displayed empty,
instead of 1899-12-30 for example.
Change-Id: I5280d0213b8a809a04c5cb152ded58028706493a
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/formulacell.hxx | 7 | ||||
-rw-r--r-- | sc/inc/formularesult.hxx | 7 | ||||
-rw-r--r-- | sc/inc/token.hxx | 4 |
3 files changed, 16 insertions, 2 deletions
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx index 180c85661284..d17e1e0db2f1 100644 --- a/sc/inc/formulacell.hxx +++ b/sc/inc/formulacell.hxx @@ -341,6 +341,13 @@ public: SetHybridString() or SetHybridFormula(), use SetHybridDouble() first for performance reasons.*/ void SetHybridString( const svl::SharedString& r ); + /** For import only: set an empty cell result to be displayed as empty string. + If for whatever reason you have to use both, SetHybridDouble() and + SetHybridEmptyDisplayedAsString() or SetHybridFormula(), use + SetHybridDouble() first for performance reasons and use + SetHybridEmptyDisplayedAsString() last because SetHybridDouble() and + SetHybridString() will override it.*/ + void SetHybridEmptyDisplayedAsString(); /** For import only: set a temporary formula string to be compiled later. If for whatever reason you have to use both, SetHybridDouble() and SetHybridString() or SetHybridFormula(), use SetHybridDouble() first diff --git a/sc/inc/formularesult.hxx b/sc/inc/formularesult.hxx index 0a977dcf043a..033d45eccb1f 100644 --- a/sc/inc/formularesult.hxx +++ b/sc/inc/formularesult.hxx @@ -188,7 +188,7 @@ public: const OUString& GetHybridFormula() const; /** Should only be used by import filters, best in the order - SetHybridDouble(), SetHybridString(), or only SetHybridString() for + SetHybridDouble(), SetHybridString(), or only SetHybridFormula() for formula string to be compiled later. */ SC_DLLPUBLIC void SetHybridDouble( double f ); @@ -198,6 +198,11 @@ public: SC_DLLPUBLIC void SetHybridString( const svl::SharedString & rStr ); /** Should only be used by import filters, best in the order + SetHybridDouble(), SetHybridFormula(), + SetHybridEmptyDisplayedAsString() must be last. */ + SC_DLLPUBLIC void SetHybridEmptyDisplayedAsString(); + + /** Should only be used by import filters, best in the order SetHybridDouble(), SetHybridString()/SetHybridFormula(), or only SetHybridFormula() for formula string to be compiled later. */ SC_DLLPUBLIC void SetHybridFormula( const OUString & rFormula ); diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx index 94a1da8b0db1..e8d313a7da64 100644 --- a/sc/inc/token.hxx +++ b/sc/inc/token.hxx @@ -388,11 +388,13 @@ private: double mfDouble; svl::SharedString maString; OUString maFormula; + bool mbEmptyDisplayedAsString; public: ScHybridCellToken( - double f, const svl::SharedString & rStr, const OUString & rFormula ); + double f, const svl::SharedString & rStr, const OUString & rFormula, bool bEmptyDisplayedAsString ); const OUString& GetFormula() const { return maFormula; } + bool IsEmptyDisplayedAsString() const { return mbEmptyDisplayedAsString; } virtual double GetDouble() const override; virtual svl::SharedString GetString() const override; |