diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-03-13 12:14:14 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-03-13 12:21:33 +0000 |
commit | a4aeb2b0c474e0cd7a4c870865aa15462b6b6a3c (patch) | |
tree | 8a68866ea27262c07fec9b172c9e96452b1739c8 /comphelper | |
parent | 42e94211ad6dc2125a411c1768d0b3a677dba34d (diff) |
lok: introduce resetCompatFlag
and reset logic of setCompatFlag/isCompatFlagSet changed in
afb7b373c34bd6a1608a30eb8267fa6f8231e853
"CppunitTest_sc_tiledrendering: reset CompatFlag in tearDown
Otherwise, there are some tests setting it to scPrintTwipsMsgs,
so depending on the order of execution, it might affect other
tests"
Change-Id: I306ac0b77b65f99879f4018cfbc57354a158f38a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148783
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/lok.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx index 019865a63696..405411db7ba8 100644 --- a/comphelper/source/misc/lok.cxx +++ b/comphelper/source/misc/lok.cxx @@ -178,9 +178,11 @@ bool isLocalRendering() return g_bLocalRendering; } -void setCompatFlag(Compat flag) { g_eCompatFlags = flag; } +void setCompatFlag(Compat flag) { g_eCompatFlags = static_cast<Compat>(g_eCompatFlags | flag); } -bool isCompatFlagSet(Compat flag) { return g_eCompatFlags == flag; } +bool isCompatFlagSet(Compat flag) { return (g_eCompatFlags & flag) == flag; } + +void resetCompatFlag() { g_eCompatFlags = Compat::none; } void setLocale(const LanguageTag& rLanguageTag) { |