diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2018-08-03 21:44:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-06 11:45:48 +0200 |
commit | fc79121c95d111d519e58478b48957d2d4f8612d (patch) | |
tree | 4cfe61a02583b20b0aee10047a88da7c21361c84 /sc/inc/compiler.hxx | |
parent | 7989b3951bcdc87e504a8773b29d9c6860f7a306 (diff) |
skip some copying with external names in ScRawToken
No need to convert from an OUString to a sal_Unicode[] and then back
again.
There is only one ScRawToken allocated so no need to be ultra careful
with extra fields here.
Change-Id: I279835e83ba02d9d4cf4d724bd8046be6aca1405
Reviewed-on: https://gerrit.libreoffice.org/58580
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/inc/compiler.hxx')
-rw-r--r-- | sc/inc/compiler.hxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx index 17e87347a23d..969bd41d838a 100644 --- a/sc/inc/compiler.hxx +++ b/sc/inc/compiler.hxx @@ -114,12 +114,10 @@ public: ScComplexRefData aRef; struct { sal_uInt16 nFileId; - sal_Unicode cTabName[MAXSTRLEN+1]; ScComplexRefData aRef; } extref; struct { sal_uInt16 nFileId; - sal_Unicode cName[MAXSTRLEN+1]; } extname; struct { sal_Int16 nSheet; @@ -135,9 +133,9 @@ public: } sharedstring; ScMatrix* pMat; FormulaError nError; - sal_Unicode cStr[ 1+MAXSTRLEN+1 ]; // string (byteparam + up to MAXSTRLEN characters + 0) short nJump[ FORMULA_MAXJUMPCOUNT + 1 ]; // If/Chose token }; + OUString maExternalName; // depending on the opcode, this is either the external, or the external name, or the external table name // coverity[uninit_member] - members deliberately not initialized ScRawToken() {} @@ -163,7 +161,7 @@ public: void SetExternalSingleRef( sal_uInt16 nFileId, const OUString& rTabName, const ScSingleRefData& rRef ); void SetExternalDoubleRef( sal_uInt16 nFileId, const OUString& rTabName, const ScComplexRefData& rRef ); void SetExternalName( sal_uInt16 nFileId, const OUString& rName ); - void SetExternal(const sal_Unicode* pStr); + void SetExternal(const OUString& rStr); /** If the token is a non-external reference, determine if the reference is valid. If the token is an external reference, return true. Else return |