[Libreoffice-commits] core.git: formula/source include/formula
Eike Rathke (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 14 01:52:52 UTC 2020
formula/source/core/api/token.cxx | 5 +----
include/formula/token.hxx | 20 ++++++++------------
2 files changed, 9 insertions(+), 16 deletions(-)
New commits:
commit 5d9e33068e756b4e74aa2a5e8d9ed16dabe27f29
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Wed Oct 14 01:50:03 2020 +0200
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Wed Oct 14 03:52:15 2020 +0200
Derive FormulaExternalToken from FormulaByteToken, tdf#133260 follow-up
This should always have had a ParamClass member variable and
SetInForceArray()/GetInForceArray() functions but never did.
Now with
commit 3a33828b8de7554e497051738c722b1764960a86
CommitDate: Tue Oct 13 21:36:31 2020 +0200
Resolves: tdf#133260 Propagate ForceArrayReturn from inline arrays
it broke CppunitTest_sc_subsequent_filters_test with the virtual
dummy assert() in FormulaToken::SetInForceArray(). Unfortunately
not caught earlier but at least it did now.
Remove the duplicated FormulaToken overrides and simply derive
from FormulaByteToken instead that has all we need.
Change-Id: I7946602955970fb9d6f349efdacb41389e211b68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104262
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 68df38517f76..92f60254ec8f 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1929,12 +1929,9 @@ bool FormulaIndexToken::operator==( const FormulaToken& r ) const
mnSheet == r.GetSheet();
}
const OUString& FormulaExternalToken::GetExternal() const { return aExternal; }
-sal_uInt8 FormulaExternalToken::GetByte() const { return nByte; }
-void FormulaExternalToken::SetByte( sal_uInt8 n ) { nByte = n; }
bool FormulaExternalToken::operator==( const FormulaToken& r ) const
{
- return FormulaToken::operator==( r ) && nByte == r.GetByte() &&
- aExternal == r.GetExternal();
+ return FormulaByteToken::operator==( r ) && aExternal == r.GetExternal();
}
diff --git a/include/formula/token.hxx b/include/formula/token.hxx
index 02bffd6a0225..4fc6b382d4cd 100644
--- a/include/formula/token.hxx
+++ b/include/formula/token.hxx
@@ -361,26 +361,22 @@ public:
};
-class FORMULA_DLLPUBLIC FormulaExternalToken final : public FormulaToken
+class FORMULA_DLLPUBLIC FormulaExternalToken final : public FormulaByteToken
{
private:
- OUString aExternal;
- sal_uInt8 nByte;
+ OUString aExternal;
public:
FormulaExternalToken( OpCode e, sal_uInt8 n, const OUString& r ) :
- FormulaToken( svExternal, e ), aExternal( r ),
- nByte( n ) {}
+ FormulaByteToken( e, n, svExternal, ParamClass::Unknown ),
+ aExternal( r ) {}
FormulaExternalToken( OpCode e, const OUString& r ) :
- FormulaToken(svExternal, e ), aExternal( r ),
- nByte( 0 ) {}
+ FormulaByteToken( e, 0, svExternal, ParamClass::Unknown ),
+ aExternal( r ) {}
FormulaExternalToken( const FormulaExternalToken& r ) :
- FormulaToken( r ), aExternal( r.aExternal ),
- nByte( r.nByte ) {}
+ FormulaByteToken( r ), aExternal( r.aExternal ) {}
virtual FormulaToken* Clone() const override { return new FormulaExternalToken(*this); }
- virtual const OUString& GetExternal() const override;
- virtual sal_uInt8 GetByte() const override;
- virtual void SetByte( sal_uInt8 n ) override;
+ virtual const OUString& GetExternal() const override;
virtual bool operator==( const FormulaToken& rToken ) const override;
};
More information about the Libreoffice-commits
mailing list