comphelper/source/misc/lok.cxx               |    4 ++--
 sc/qa/unit/tiledrendering/tiledrendering.cxx |    4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit afb7b373c34bd6a1608a30eb8267fa6f8231e853
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Mar 10 15:04:39 2023 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Mar 10 17:52:36 2023 +0000

    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: Ib0d08b1fe4e172bd5b03d63260e6b1c3fde26595
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148635
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index 1f07cd2614eb..019865a63696 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -178,9 +178,9 @@ bool isLocalRendering()
     return g_bLocalRendering;
 }
 
-void setCompatFlag(Compat flag) { g_eCompatFlags = 
static_cast<Compat>(g_eCompatFlags | flag); }
+void setCompatFlag(Compat flag) { g_eCompatFlags = flag; }
 
-bool isCompatFlagSet(Compat flag) { return (g_eCompatFlags & flag) == flag; }
+bool isCompatFlagSet(Compat flag) { return g_eCompatFlags == flag; }
 
 void setLocale(const LanguageTag& rLanguageTag)
 {
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 84771a2c555c..adcb6415c6ec 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -226,6 +226,10 @@ void ScTiledRenderingTest::tearDown()
     }
 
     m_callbackWrapper.clear();
+
+    comphelper::LibreOfficeKit::setCompatFlag(
+        comphelper::LibreOfficeKit::Compat::none);
+
     comphelper::LibreOfficeKit::setActive(false);
 
     UnoApiXmlTest::tearDown();

Reply via email to