diff options
author | Eike Rathke <erack@redhat.com> | 2017-12-05 15:19:16 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-12-05 18:25:05 +0100 |
commit | 11667a8df2e4aad7c14c1ef3fdb80f61515832fc (patch) | |
tree | 073f48dfeaf60e4b970b0b33fb1267ef0b300a61 /basic | |
parent | 4963ea48961c7c4dc941c89afe56a1f84b31e66e (diff) |
Resolves: tdf#114231 do not mask ErrCode with GetRest()
Regression from
commit 7ca950ec744b7af1d15724ec2abc296573a641e4
Date: Wed Aug 23 19:25:02 2017 +0200
no need to use ERRCODE_RES_MASK here
the relevant usage sites already call GetRest() before comparing
which exactly is the reason that it didn't work anymore.
Old StringArray ItemList resources stored only 16-bit values,
hence ERRCODE_RES_MASK was used to mask the ErrCode values in the
resource for which code had to mask ERRCODE_RES_MASK as well to
compare values. Now the full ErrCode is stored, so code must not
use GetRest() on a value to compare against, or use GetRest() on
both values (which theoretically could lead to ambiguities, but
probably doesn't in resources that are restricted to one module).
Change-Id: I835e47424bb008bc680dc4f8c502c9558397db36
(cherry picked from commit d915cb417befeb4a2aa1913e4b91d8cc5297c3ec)
Reviewed-on: https://gerrit.libreoffice.org/45882
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sb.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index b2aaae37cdab..294f7ee5744c 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -1573,7 +1573,7 @@ void StarBASIC::MakeErrorText( ErrCode nId, const OUString& aMsg ) const char* pErrorMsg = nullptr; for (ErrMsgCode* pItem = RID_BASIC_START; pItem->second; ++pItem) { - if (ErrCode(nId.GetRest()) == pItem->second) + if (nId == pItem->second) { pErrorMsg = pItem->first; break; |