[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 3 commits - configure.ac desktop/qa distro-configs/CPLinux-LOKit.conf sd/qa

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Mar 9 11:31:04 UTC 2019


 configure.ac                                 |    2 
 desktop/qa/desktop_lib/test_desktop_lib.cxx  |  140 +++++++++++++++++++++++++--
 distro-configs/CPLinux-LOKit.conf            |   11 +-
 sd/qa/unit/tiledrendering/tiledrendering.cxx |  117 +++++++++++++++++++++-
 4 files changed, 257 insertions(+), 13 deletions(-)

New commits:
commit 0982652eb252eb37beba7760b4a00b1f53ffa7c2
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Sat Mar 9 11:56:19 2019 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Mar 9 12:02:55 2019 +0100

    Enable MPLv2 subset for CPLinux.LOKit config
    
    Change-Id: I113defebd886a21222904570033b34e874e45b05

diff --git a/distro-configs/CPLinux-LOKit.conf b/distro-configs/CPLinux-LOKit.conf
index da3a6b036090..7490a5421782 100644
--- a/distro-configs/CPLinux-LOKit.conf
+++ b/distro-configs/CPLinux-LOKit.conf
@@ -1,14 +1,19 @@
+--enable-mpl-subset
 --with-vendor=Collabora
 --with-branding=icon-themes/galaxy/brand_cp
 --with-system-dicts
 --with-myspell-dicts
 --with-system-zlib
---without-system-cairo
 --disable-poppler
+--without-system-cairo
 --without-system-openssl
 --without-system-libpng
 --without-system-libxml
 --without-system-jpeg
+--without-system-expat
+--without-system-curl
+--without-system-icu
+--without-system-nss
 --without-system-jars
 --without-system-postgresql
 --without-java
@@ -42,7 +47,7 @@
 --disable-postgresql-sdbc
 --disable-firebird-sdbc
 --disable-randr
---enable-ext-numbertext
+--disable-ext-numbertext
 --disable-ext-ct2n
 --enable-epm
 --enable-python=internal
@@ -53,4 +58,6 @@
 --enable-release-build
 --with-lang=ar as ast bg bn-IN br ca ca-valencia cy cs da de el en-US en-GB es et eu fi fr ga gd gl gu he hi hr hu id is it ja km kn ko lt lv ml mr nb nl nn oc or pa-IN pl pt pt-BR ro ru sk sl sr sr-Latn sv ta te tr uk vi zh-CN zh-TW
 --with-webdav=serf
+--disable-lotuswordpro
+--disable-lpsolve
 --enable-symbols
commit 1493280f6c7ee89e63ef0b494bf1d9151a4bbc21
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Sat Mar 9 12:01:57 2019 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sat Mar 9 12:02:55 2019 +0100

    MPLv2 subset: Check for $ENABLE_POPPLER instead of $ENABLE_PDFIMPORT
    
    Change-Id: Idbdd2a97cdcc7f874c12cff8e024214badda1522

diff --git a/configure.ac b/configure.ac
index ca59940e1c31..6ff20698fcc6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12364,7 +12364,7 @@ if test "$enable_mpl_subset" = "yes"; then
     if test "$WITH_WEBDAV" = "neon"; then
         AC_MSG_ERROR([need --with-webdav=serf or --without-webdav - webdav support.])
     fi
-    if test -n "$ENABLE_PDFIMPORT"; then
+    if test -n "$ENABLE_POPPLER"; then
         if test "x$SYSTEM_POPPLER" = "x"; then
             AC_MSG_ERROR([need to disable PDF import via poppler or use system library])
         fi
commit 267627002d54304c4e49b63d21dd906e79ebfa8d
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Fri Mar 8 12:35:15 2019 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Mar 8 12:35:15 2019 +0100

    Revert "LOK: disable LOKit in unit-tests only after destroying all"
    
    This reverts commit ccb14cca567dc8bbc17fe0abde01effd08b37d4f.

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index b3f6a7fb943d..3bf935275025 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -65,10 +65,7 @@ public:
 
     virtual void setUp() override
     {
-        comphelper::LibreOfficeKit::setActive(true);
-
         UnoApiTest::setUp();
-
         mxDesktop.set(frame::Desktop::create(comphelper::getComponentContext(getMultiServiceFactory())));
         SfxApplication::GetOrCreate();
     };
@@ -76,10 +73,7 @@ public:
     virtual void tearDown() override
     {
         closeDoc();
-
         UnoApiTest::tearDown();
-
-        comphelper::LibreOfficeKit::setActive(false);
     };
 
     LibLODocument_Impl* loadDoc(const char* pName, LibreOfficeKitDocumentType eType = LOK_DOCTYPE_TEXT);
@@ -319,6 +313,7 @@ void DesktopLOKTest::callbackImpl(int nType, const char* pPayload)
 
 void DesktopLOKTest::testGetStyles()
 {
+    comphelper::LibreOfficeKit::setActive();
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
     boost::property_tree::ptree aTree;
     char* pJSON = pDocument->m_pDocumentClass->getCommandValues(pDocument, ".uno:StyleApply");
@@ -349,10 +344,12 @@ void DesktopLOKTest::testGetStyles()
             CPPUNIT_FAIL("Unknown style family: " + rPair.first);
         }
     }
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testGetFonts()
 {
+    comphelper::LibreOfficeKit::setActive();
     LibLODocument_Impl* pDocument = loadDoc("blank_presentation.odp");
     boost::property_tree::ptree aTree;
     char* pJSON = pDocument->m_pDocumentClass->getCommandValues(pDocument, ".uno:CharFontName");
@@ -369,10 +366,12 @@ void DesktopLOKTest::testGetFonts()
         CPPUNIT_ASSERT( rPair.second.size() > 0);
     }
     free(pJSON);
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testCreateView()
 {
+    comphelper::LibreOfficeKit::setActive();
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
     CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getViewsCount(pDocument));
 
@@ -394,10 +393,12 @@ void DesktopLOKTest::testCreateView()
 
     pDocument->m_pDocumentClass->destroyView(pDocument, nId1);
     CPPUNIT_ASSERT_EQUAL(1, pDocument->m_pDocumentClass->getViewsCount(pDocument));
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testGetPartPageRectangles()
 {
+    comphelper::LibreOfficeKit::setActive();
     // Test that we get as many page rectangles as expected: blank document is
     // one page.
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
@@ -416,10 +417,12 @@ void DesktopLOKTest::testGetPartPageRectangles()
     CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aRectangles.size());
 
     free(pRectangles);
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testGetFilterTypes()
 {
+    comphelper::LibreOfficeKit::setActive();
     LibLibreOffice_Impl aOffice;
     char* pJSON = aOffice.m_pOfficeClass->getFilterTypes(&aOffice);
 
@@ -430,10 +433,13 @@ void DesktopLOKTest::testGetFilterTypes()
     CPPUNIT_ASSERT(aTree.size() > 0);
     CPPUNIT_ASSERT_EQUAL(std::string("application/vnd.oasis.opendocument.text"), aTree.get_child("writer8").get_child("MediaType").get_value<std::string>());
     free(pJSON);
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testSearchCalc()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLibreOffice_Impl aOffice;
     LibLODocument_Impl* pDocument = loadDoc("search.ods");
     pDocument->pClass->initializeForRendering(pDocument, nullptr);
@@ -461,10 +467,14 @@ void DesktopLOKTest::testSearchCalc()
     CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), m_aSearchResultSelection.size());
     // Result is on the first sheet.
     CPPUNIT_ASSERT_EQUAL(0, m_aSearchResultPart[0]);
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testSearchAllNotificationsCalc()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLibreOffice_Impl aOffice;
     LibLODocument_Impl* pDocument = loadDoc("search.ods");
     pDocument->pClass->initializeForRendering(pDocument, nullptr);
@@ -483,10 +493,14 @@ void DesktopLOKTest::testSearchAllNotificationsCalc()
     CPPUNIT_ASSERT_EQUAL(0, m_nSelectionBeforeSearchResult);
     // But we do get the selection afterwards.
     CPPUNIT_ASSERT(m_nSelectionAfterSearchResult > 0);
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testPaintTile()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
     int nCanvasWidth = 100;
     int nCanvasHeight = 300;
@@ -509,26 +523,38 @@ void DesktopLOKTest::testPaintTile()
     nTileHeight = 4000;
     aBuffer.resize(nCanvasWidth * nCanvasHeight * 4);
     pDocument->pClass->paintTile(pDocument, aBuffer.data(), nCanvasWidth, nCanvasHeight, nTilePosX, nTilePosY, nTileWidth, nTileHeight);
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testSaveAs()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
     utl::TempFile aTempFile;
     aTempFile.EnableKillingFile();
     CPPUNIT_ASSERT(pDocument->pClass->saveAs(pDocument, aTempFile.GetURL().toUtf8().getStr(), "png", nullptr));
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testSaveAsCalc()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("search.ods");
     utl::TempFile aTempFile;
     aTempFile.EnableKillingFile();
     CPPUNIT_ASSERT(pDocument->pClass->saveAs(pDocument, aTempFile.GetURL().toUtf8().getStr(), "png", nullptr));
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testPasteWriter()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
     OString aText("hello");
 
@@ -544,10 +570,14 @@ void DesktopLOKTest::testPasteWriter()
     CPPUNIT_ASSERT(!pDocument->pClass->paste(pDocument, "textt/plain;charset=utf-8", aText.getStr(), aText.getLength()));
     // Writer is expected to support text/html.
     CPPUNIT_ASSERT(pDocument->pClass->paste(pDocument, "text/html", aText.getStr(), aText.getLength()));
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testPasteWriterJPEG()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
 
     OUString aFileURL;
@@ -576,11 +606,15 @@ void DesktopLOKTest::testPasteWriterJPEG()
     xShape.set(xDrawPage->getByIndex(0), uno::UNO_QUERY);
     // This was text::TextContentAnchorType_AS_CHARACTER, AnchorType argument was ignored.
     CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER, xShape->getPropertyValue("AnchorType").get<text::TextContentAnchorType>());
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testUndoWriter()
 {
     // Load a Writer document and press a key.
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
     pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, 't', 0);
     pDocument->pClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYUP, 't', 0);
@@ -594,6 +628,8 @@ void DesktopLOKTest::testUndoWriter()
     boost::property_tree::read_json(aStream, aTree);
     // Make sure that pressing a key creates exactly one undo action.
     CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), aTree.get_child("actions").size());
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testRowColumnHeaders()
@@ -627,6 +663,8 @@ void DesktopLOKTest::testRowColumnHeaders()
      * "size" defines the bottom/right boundary of a row/column in twips (size between 0 and boundary)
      * "text" has the header label in UTF-8
      */
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("search.ods");
 
     pDocument->pClass->initializeForRendering(pDocument, nullptr);
@@ -704,10 +742,14 @@ void DesktopLOKTest::testRowColumnHeaders()
         nPrevious = nSize;
     }
     CPPUNIT_ASSERT(!bNotEnoughHeaders);
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testHiddenRowHeaders()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("hidden-row.ods");
 
     pDocument->pClass->initializeForRendering(pDocument, nullptr);
@@ -742,10 +784,13 @@ void DesktopLOKTest::testHiddenRowHeaders()
         }
         nPrevious = nSize;
     }
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testCellCursor()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("search.ods");
 
     boost::property_tree::ptree aTree;
@@ -761,10 +806,14 @@ void DesktopLOKTest::testCellCursor()
     OString aRectangle(aTree.get<std::string>("commandValues").c_str());
     // cell cursor geometry + col + row
     CPPUNIT_ASSERT_EQUAL(OString("0, 0, 1274, 254, 0, 0"), aRectangle);
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testCommandResult()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
 
     // the postUnoCommand() is supposed to be async, let's test it safely
@@ -795,10 +844,14 @@ void DesktopLOKTest::testCommandResult()
 
     CPPUNIT_ASSERT_EQUAL(aTree.get_child("commandName").get_value<std::string>(), std::string(".uno:Bold"));
     CPPUNIT_ASSERT_EQUAL(aTree.get_child("success").get_value<bool>(), true);
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testWriterComments()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
     pDocument->pClass->registerCallback(pDocument, &DesktopLOKTest::callback, this);
     uno::Reference<awt::XReschedule> xToolkit(com::sun::star::awt::Toolkit::create(comphelper::getProcessComponentContext()), uno::UNO_QUERY);
@@ -834,10 +887,14 @@ void DesktopLOKTest::testWriterComments()
     auto xTextField = xTextPortion->getPropertyValue("TextField").get< uno::Reference<beans::XPropertySet> >();
     // This was empty, typed characters ended up in the body text.
     CPPUNIT_ASSERT_EQUAL(OUString("test"), xTextField->getPropertyValue("Content").get<OUString>());
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testTrackChanges()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     // Load a document and create two views.
     LibLibreOffice_Impl aOffice;
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
@@ -854,10 +911,14 @@ void DesktopLOKTest::testTrackChanges()
     Scheduler::ProcessEventsToIdle();
     // This was 1, only the active view was notified.
     CPPUNIT_ASSERT_EQUAL(2, m_nTrackChanges);
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testSheetOperations()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("sheets.ods");
 
     // insert the last sheet
@@ -884,10 +945,14 @@ void DesktopLOKTest::testSheetOperations()
     {
         CPPUNIT_ASSERT_EQUAL(aExpected[i], OString(pDocument->pClass->getPartName(pDocument, i)));
     }
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testSheetSelections()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("sheets.ods", LOK_DOCTYPE_SPREADSHEET);
     pDocument->pClass->initializeForRendering(pDocument, nullptr);
     pDocument->pClass->registerCallback(pDocument, &DesktopLOKTest::callback, this);
@@ -993,6 +1058,8 @@ void DesktopLOKTest::testSheetSelections()
         free(pUsedMimeType);
         free(pCopiedContent);
     }
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 namespace {
@@ -1067,6 +1134,8 @@ namespace {
 
 void DesktopLOKTest::testContextMenuCalc()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("sheet_with_image.ods", LOK_DOCTYPE_SPREADSHEET);
     pDocument->pClass->initializeForRendering(pDocument, nullptr);
     pDocument->pClass->registerCallback(pDocument, &DesktopLOKTest::callback, this);
@@ -1171,10 +1240,14 @@ void DesktopLOKTest::testContextMenuCalc()
         CPPUNIT_ASSERT(aCheckedToCell);
         CPPUNIT_ASSERT_EQUAL(std::string(aCheckedToCell.get().data()), std::string("false"));
     }
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testContextMenuWriter()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
     pDocument->pClass->initializeForRendering(pDocument, nullptr);
     pDocument->pClass->registerCallback(pDocument, &DesktopLOKTest::callback, this);
@@ -1224,10 +1297,14 @@ void DesktopLOKTest::testContextMenuWriter()
         CPPUNIT_ASSERT(aEnabled);
         CPPUNIT_ASSERT_EQUAL(std::string(aEnabled.get().data()), std::string("true"));
     }
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testContextMenuImpress()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("blank_presentation.odp", LOK_DOCTYPE_PRESENTATION);
     pDocument->pClass->initializeForRendering(pDocument, nullptr);
     pDocument->pClass->registerCallback(pDocument, &DesktopLOKTest::callback, this);
@@ -1348,6 +1425,8 @@ void DesktopLOKTest::testContextMenuImpress()
         CPPUNIT_ASSERT(aCheckedHelpFront);
         CPPUNIT_ASSERT_EQUAL(std::string(aCheckedHelpFront.get().data()), std::string("true"));
     }
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 static void callbackCompressionTest(const int type, const char* payload, void* data)
@@ -1358,6 +1437,8 @@ static void callbackCompressionTest(const int type, const char* payload, void* d
 
 void DesktopLOKTest::testNotificationCompression()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
     std::vector<std::tuple<int, std::string>> notifs;
     std::unique_ptr<CallbackFlushHandler> handler(new CallbackFlushHandler(pDocument, callbackCompressionTest, &notifs));
@@ -1440,10 +1521,14 @@ void DesktopLOKTest::testNotificationCompression()
 
     CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_STATE_CHANGED, std::get<0>(notifs[i]));
     CPPUNIT_ASSERT_EQUAL(std::string(".uno:AssignLayout=1"), std::get<1>(notifs[i++]));
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testTileInvalidationCompression()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
 
     comphelper::LibreOfficeKit::setPartInInvalidation(true);
@@ -1575,10 +1660,14 @@ void DesktopLOKTest::testTileInvalidationCompression()
         CPPUNIT_ASSERT_EQUAL((int)LOK_CALLBACK_INVALIDATE_TILES, std::get<0>(notifs[i]));
         CPPUNIT_ASSERT_EQUAL(std::string("0, 0, 1000000000, 1000000000, 0"), std::get<1>(notifs[i++]));
     }
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testPartInInvalidation()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
     // No part in invalidation: merge.
     {
@@ -1646,10 +1735,14 @@ void DesktopLOKTest::testPartInInvalidation()
         // payload, so this was merged -> it was 1.
         CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), notifs.size());
     }
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testRedlineWriter()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     // Load a Writer document, enable change recording and press a key.
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
     uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY);
@@ -1673,11 +1766,15 @@ void DesktopLOKTest::testRedlineWriter()
         CPPUNIT_ASSERT_EQUAL(std::string("Insert \xE2\x80\x9Ct\xE2\x80\x9D"), rRedline.second.get<std::string>("description"));
             // U+201C LEFT DOUBLE QUOTATION MARK, U+201D RIGHT DOUBLE QUOTATION
             // MARK
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testRedlineCalc()
 {
     // Load a Writer document, enable change recording and press a key.
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("sheets.ods");
     uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY);
     xPropertySet->setPropertyValue("RecordChanges", uno::makeAny(true));
@@ -1700,6 +1797,8 @@ void DesktopLOKTest::testRedlineCalc()
     for (boost::property_tree::ptree::value_type& rRedline : aTree.get_child("redlines"))
         // This failed with boost::property_tree::ptree_bad_path, as there were no description field.
         CPPUNIT_ASSERT_EQUAL(std::string("Cell B4 changed from '5' to 't'"), rRedline.second.get<std::string>("description"));
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 class ViewCallback
@@ -1756,6 +1855,8 @@ public:
 void DesktopLOKTest::testPaintPartTile()
 {
     // Load an impress doc of 2 slides.
+    comphelper::LibreOfficeKit::setActive();
+
     ViewCallback aView1;
     ViewCallback aView2;
     std::unique_ptr<LibLODocument_Impl> xDocument(loadDoc("2slides.odp"));
@@ -1795,11 +1896,15 @@ void DesktopLOKTest::testPaintPartTile()
     //CPPUNIT_ASSERT(aView1.m_bTilesInvalidated);
 
     mxComponent.clear();
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testWriterCommentInsertCursor()
 {
     // Load a document and type a character into the body text of the second view.
+    comphelper::LibreOfficeKit::setActive();
+
     ViewCallback aView1;
     ViewCallback aView2;
     std::unique_ptr<LibLODocument_Impl> xDocument(loadDoc("blank_text.odt"));
@@ -1833,11 +1938,15 @@ void DesktopLOKTest::testWriterCommentInsertCursor()
 
     Scheduler::ProcessEventsToIdle();
     mxComponent.clear();
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 #if HAVE_MORE_FONTS
 void DesktopLOKTest::testGetFontSubset()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLODocument_Impl* pDocument = loadDoc("blank_text.odt");
     OUString aFontName = rtl::Uri::encode(
         OUString("Liberation Sans"),
@@ -1855,11 +1964,14 @@ void DesktopLOKTest::testGetFontSubset()
     boost::property_tree::ptree aValues = aTree.get_child("commandValues");
     CPPUNIT_ASSERT( aValues.size() > 0 );
     free(pJSON);
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 #endif
 
 void DesktopLOKTest::testCommentsWriter()
 {
+    comphelper::LibreOfficeKit::setActive();
     // Disable tiled rendering for comments
     comphelper::LibreOfficeKit::setTiledAnnotations(false);
 
@@ -1907,11 +2019,13 @@ void DesktopLOKTest::testCommentsWriter()
     }
 
     comphelper::LibreOfficeKit::setTiledAnnotations(true);
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 
 void DesktopLOKTest::testCommentsCalc()
 {
+    comphelper::LibreOfficeKit::setActive();
     // Disable tiled rendering for comments
     comphelper::LibreOfficeKit::setTiledAnnotations(false);
 
@@ -1957,11 +2071,13 @@ void DesktopLOKTest::testCommentsCalc()
     CPPUNIT_ASSERT_EQUAL(2, nIdx);
 
     comphelper::LibreOfficeKit::setTiledAnnotations(true);
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 
 void DesktopLOKTest::testCommentsImpress()
 {
+    comphelper::LibreOfficeKit::setActive();
     // Disable tiled rendering for comments
     comphelper::LibreOfficeKit::setTiledAnnotations(false);
 
@@ -2013,10 +2129,12 @@ void DesktopLOKTest::testCommentsImpress()
     CPPUNIT_ASSERT_EQUAL(2, nIdx);
 
     comphelper::LibreOfficeKit::setTiledAnnotations(true);
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testCommentsCallbacksWriter()
 {
+    comphelper::LibreOfficeKit::setActive();
     // Comments callback are emitted only if tiled annotations are off
     comphelper::LibreOfficeKit::setTiledAnnotations(false);
     ViewCallback aView1;
@@ -2098,10 +2216,14 @@ void DesktopLOKTest::testCommentsCallbacksWriter()
     CPPUNIT_ASSERT(!aStream.str().empty());
     boost::property_tree::read_json(aStream, aTree);
     CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(5), aTree.get_child("comments").size());
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testRunMacro()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     LibLibreOffice_Impl aOffice;
     bool bGoodMacro, bNonExistentMacro;
 
@@ -2111,10 +2233,14 @@ void DesktopLOKTest::testRunMacro()
 
     bNonExistentMacro = aOffice.m_pOfficeClass->runMacro(&aOffice, OString("macro:///I.Am.Not(There)").getStr());
     CPPUNIT_ASSERT(!bNonExistentMacro);
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::testExtractParameter()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     OUString aOptions("Language=de-DE");
     OUString aValue = extractParameter(aOptions, "Language");
     CPPUNIT_ASSERT_EQUAL(OUString("de-DE"), aValue);
@@ -2139,6 +2265,8 @@ void DesktopLOKTest::testExtractParameter()
     aValue = extractParameter(aOptions, "Language");
     CPPUNIT_ASSERT_EQUAL(OUString(), aValue);
     CPPUNIT_ASSERT_EQUAL(OUString("Something1,Something2=blah,Something3"), aOptions);
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void DesktopLOKTest::readFileIntoByteVector(OUString const & sFilename, std::vector<unsigned char> & rByteVector)
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 7e8c0f0b4a0a..1765db27be7d 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -198,8 +198,6 @@ void SdTiledRenderingTest::setUp()
 {
     test::BootstrapFixture::setUp();
 
-    comphelper::LibreOfficeKit::setActive(true);
-
     mxDesktop.set(css::frame::Desktop::create(comphelper::getComponentContext(getMultiServiceFactory())));
 }
 
@@ -211,8 +209,6 @@ void SdTiledRenderingTest::tearDown()
     if (m_pXmlBuffer)
         xmlBufferFree(m_pXmlBuffer);
 
-    comphelper::LibreOfficeKit::setActive(false);
-
     test::BootstrapFixture::tearDown();
 }
 
@@ -343,6 +339,7 @@ xmlDocPtr SdTiledRenderingTest::parseXmlDump()
 
 void SdTiledRenderingTest::testRegisterCallback()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this);
@@ -358,10 +355,12 @@ void SdTiledRenderingTest::testRegisterCallback()
     CPPUNIT_ASSERT(!m_aInvalidation.IsEmpty());
     ::tools::Rectangle aTopLeft(0, 0, 256*15, 256*15); // 1 px = 15 twips, assuming 96 DPI.
     CPPUNIT_ASSERT(m_aInvalidation.IsOver(aTopLeft));
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testPostKeyEvent()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     SdPage* pActualPage = pViewShell->GetActualPage();
@@ -386,10 +385,12 @@ void SdTiledRenderingTest::testPostKeyEvent()
     rEditView.SetSelection(aWordSelection);
     // Did we enter the expected character?
     CPPUNIT_ASSERT_EQUAL(OUString("xx"), rEditView.GetSelected());
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testPostMouseEvent()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     SdPage* pActualPage = pViewShell->GetActualPage();
@@ -419,10 +420,12 @@ void SdTiledRenderingTest::testPostMouseEvent()
     CPPUNIT_ASSERT(pView->GetTextEditObject());
     // The new cursor position must be before the first word.
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), rEditView.GetSelection().nStartPos);
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testSetTextSelection()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
     uno::Reference<container::XIndexAccess> xDrawPage(pXImpressDocument->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
     uno::Reference<text::XTextRange> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
@@ -447,10 +450,12 @@ void SdTiledRenderingTest::testSetTextSelection()
     pXImpressDocument->setTextSelection(LOK_SETTEXTSELECTION_END, aEnd.getX(), aEnd.getY());
     // The new selection must include the ending dot, too -- but not the first word.
     CPPUNIT_ASSERT_EQUAL(OUString("bbb."), rEditView.GetSelected());
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testGetTextSelection()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
     uno::Reference<container::XIndexAccess> xDrawPage(pXImpressDocument->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
     uno::Reference<text::XTextRange> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
@@ -471,10 +476,12 @@ void SdTiledRenderingTest::testGetTextSelection()
 
     // Make sure returned RTF is not empty.
     CPPUNIT_ASSERT(!pXImpressDocument->getTextSelection("text/rtf", aUsedFormat).isEmpty());
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testSetGraphicSelection()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("shape.odp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     SdPage* pPage = pViewShell->GetActualPage();
@@ -504,10 +511,13 @@ void SdTiledRenderingTest::testSetGraphicSelection()
     // Check that a resize happened, but aspect ratio is not kept.
     CPPUNIT_ASSERT_EQUAL(aShapeBefore.getWidth(), aShapeAfter.getWidth());
     CPPUNIT_ASSERT(aShapeBefore.getHeight() < aShapeAfter.getHeight());
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testUndoShells()
 {
+    comphelper::LibreOfficeKit::setActive();
     // Load a document and set the page size.
     SdXImpressDocument* pXImpressDocument = createDoc("shape.odp");
     uno::Sequence<beans::PropertyValue> aPropertyValues(comphelper::InitPropertySequence(
@@ -525,10 +535,12 @@ void SdTiledRenderingTest::testUndoShells()
     sal_Int32 nView1 = SfxLokHelper::getView();
     // This was -1, SdUndoGroup did not track what view shell created it.
     CPPUNIT_ASSERT_EQUAL(ViewShellId(nView1), pUndoManager->GetUndoAction()->GetViewShellId());
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testResetSelection()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
     uno::Reference<container::XIndexAccess> xDrawPage(pXImpressDocument->getDrawPages()->getByIndex(0), uno::UNO_QUERY);
     uno::Reference<text::XTextRange> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
@@ -549,6 +561,7 @@ void SdTiledRenderingTest::testResetSelection()
     // Now use resetSelection() to reset the selection.
     pXImpressDocument->resetSelection();
     CPPUNIT_ASSERT(!pView->GetTextEditObject());
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 static void lcl_search(const OUString& rKey, bool bFindAll = false)
@@ -564,6 +577,7 @@ static void lcl_search(const OUString& rKey, bool bFindAll = false)
 
 void SdTiledRenderingTest::testSearch()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this);
@@ -593,10 +607,12 @@ void SdTiledRenderingTest::testSearch()
     // This should trigger the not-found callback.
     lcl_search("ccc");
     CPPUNIT_ASSERT_EQUAL(false, m_bFound);
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testSearchAll()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("search-all.odp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this);
@@ -612,10 +628,12 @@ void SdTiledRenderingTest::testSearchAll()
     lcl_search("second", /*bFindAll=*/true);
     // This was 0: no SET_PART was emitted.
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), m_nPart);
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testSearchAllSelections()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("search-all.odp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this);
@@ -625,10 +643,12 @@ void SdTiledRenderingTest::testSearchAllSelections()
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), m_nPart);
     // This was 1: only the first match was highlighted.
     CPPUNIT_ASSERT_EQUAL(static_cast<std::size_t>(2), m_aSelection.size());
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testSearchAllNotifications()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("search-all.odp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this);
@@ -638,10 +658,12 @@ void SdTiledRenderingTest::testSearchAllNotifications()
     CPPUNIT_ASSERT_EQUAL(0, m_nSelectionBeforeSearchResult);
     // But we do get the selection of the first hit.
     CPPUNIT_ASSERT(m_nSelectionAfterSearchResult > 0);
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testSearchAllFollowedBySearch()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("search-all.odp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this);
@@ -653,10 +675,12 @@ void SdTiledRenderingTest::testSearchAllFollowedBySearch()
     // This used to give wrong result: 'search' after 'search all' still
     // returned 'third'
     CPPUNIT_ASSERT_EQUAL(OString("match"), pXImpressDocument->getTextSelection("text/plain;charset=utf-8", aUsedFormat));
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testDontSearchInMasterPages()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this);
@@ -665,6 +689,8 @@ void SdTiledRenderingTest::testDontSearchInMasterPages()
     // the master page)
     lcl_search("date");
     CPPUNIT_ASSERT_EQUAL(false, m_bFound);
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 namespace
@@ -687,6 +713,7 @@ std::vector<OUString> getCurrentParts(SdXImpressDocument* pDocument)
 
 void SdTiledRenderingTest::testInsertDeletePage()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("insert-delete.odp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     pViewShell->GetViewShellBase().registerLibreOfficeKitViewCallback(&SdTiledRenderingTest::callback, this);
@@ -777,10 +804,13 @@ void SdTiledRenderingTest::testInsertDeletePage()
 
     // the document has 1 slide
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(1), pDoc->GetSdPageCount(PageKind::Standard));
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testInsertTable()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
 
     uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
@@ -803,10 +833,13 @@ void SdTiledRenderingTest::testInsertTable()
 
     CPPUNIT_ASSERT(aPos.X() != 0);
     CPPUNIT_ASSERT(aPos.Y() != 0);
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testPartHash()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pDoc = createDoc("dummy.odp");
 
     int nParts = pDoc->getParts();
@@ -817,11 +850,13 @@ void SdTiledRenderingTest::testPartHash()
 
     // check part that it does not exists
     CPPUNIT_ASSERT(pDoc->getPartHash(100).isEmpty());
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testResizeTable()
 {
     // Load the document.
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("table.odp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     SdPage* pActualPage = pViewShell->GetActualPage();
@@ -862,11 +897,13 @@ void SdTiledRenderingTest::testResizeTable()
     sal_Int32 nActualRow2 = xRow2->getPropertyValue("Size").get<sal_Int32>();
     // Expected was 4000, actual was 4572, i.e. the second row after undo was larger than expected.
     CPPUNIT_ASSERT_DOUBLES_EQUAL(nExpectedRow2, nActualRow2, 1.0);
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testResizeTableColumn()
 {
     // Load the document.
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("table-column.odp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     SdPage* pActualPage = pViewShell->GetActualPage();
@@ -913,6 +950,7 @@ void SdTiledRenderingTest::testResizeTableColumn()
     CPPUNIT_ASSERT_EQUAL(nExpectedColumn2, nActualColumn2);
     xmlFreeDoc(pXmlDoc);
     pXmlDoc = nullptr;
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 /// A view callback tracks callbacks invoked on one specific view.
@@ -1021,6 +1059,8 @@ public:
 
 void SdTiledRenderingTest::testViewCursors()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     // Create two views.
     SdXImpressDocument* pXImpressDocument = createDoc("shape.odp");
     ViewCallback aView1;
@@ -1043,10 +1083,14 @@ void SdTiledRenderingTest::testViewCursors()
     CPPUNIT_ASSERT(aView2.m_bGraphicSelectionInvalidated);
     mxComponent->dispose();
     mxComponent.clear();
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testViewCursorParts()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     // Create two views.
     SdXImpressDocument* pXImpressDocument = createDoc("shape.odp");
     ViewCallback aView1;
@@ -1081,10 +1125,13 @@ void SdTiledRenderingTest::testViewCursorParts()
 
     mxComponent->dispose();
     mxComponent.clear();
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testCursorViews()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     // Create the first view.
     SdXImpressDocument* pXImpressDocument = createDoc("title-shape.odp");
     ViewCallback aView1;
@@ -1128,10 +1175,13 @@ void SdTiledRenderingTest::testCursorViews()
 
     mxComponent->dispose();
     mxComponent.clear();
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testViewLock()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     // Load a document that has a shape and create two views.
     SdXImpressDocument* pXImpressDocument = createDoc("shape.odp");
     ViewCallback aView1;
@@ -1156,10 +1206,13 @@ void SdTiledRenderingTest::testViewLock()
 
     mxComponent->dispose();
     mxComponent.clear();
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testUndoLimiting()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     // Create the first view.
     SdXImpressDocument* pXImpressDocument = createDoc("title-shape.odp");
     sd::ViewShell* pViewShell1 = pXImpressDocument->GetDocShell()->GetViewShell();
@@ -1197,10 +1250,13 @@ void SdTiledRenderingTest::testUndoLimiting()
 
     mxComponent->dispose();
     mxComponent.clear();
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testCreateViewGraphicSelection()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     // Load a document and register a callback.
     SdXImpressDocument* pXImpressDocument = createDoc("shape.odp");
     ViewCallback aView1;
@@ -1234,10 +1290,13 @@ void SdTiledRenderingTest::testCreateViewGraphicSelection()
 
     mxComponent->dispose();
     mxComponent.clear();
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testCreateViewTextCursor()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     // Load a document and register a callback.
     SdXImpressDocument* pXImpressDocument = createDoc("title-shape.odp");
     ViewCallback aView1;
@@ -1288,11 +1347,13 @@ void SdTiledRenderingTest::testCreateViewTextCursor()
 
     mxComponent->dispose();
     mxComponent.clear();
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testTdf102223()
 {
     // Load the document.
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("tdf102223.odp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     SdPage* pActualPage = pViewShell->GetActualPage();
@@ -1328,11 +1389,14 @@ void SdTiledRenderingTest::testTdf102223()
     rEditView2.SetSelection(ESelection(0, 0, 0, 1)); // start para, start char, end para, end char.
     const SvxFontHeightItem& rItem2 = rEditView2.GetAttribs().Get(EE_CHAR_FONTHEIGHT);
     CPPUNIT_ASSERT_EQUAL((int)1411, (int)rItem2.GetHeight());
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testPostKeyEventInvalidation()
 {
     // Load a document and begin text edit on the first slide.
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("2slides.odp");
     CPPUNIT_ASSERT_EQUAL(0, pXImpressDocument->getPart());
     ViewCallback aView1;
@@ -1372,6 +1436,7 @@ void SdTiledRenderingTest::testPostKeyEventInvalidation()
 
     mxComponent->dispose();
     mxComponent.clear();
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 /**
@@ -1380,6 +1445,7 @@ void SdTiledRenderingTest::testPostKeyEventInvalidation()
 void SdTiledRenderingTest::testTdf103083()
 {
     // Load the document.
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("tdf103083.fodp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     SdPage* pActualPage = pViewShell->GetActualPage();
@@ -1437,6 +1503,8 @@ void SdTiledRenderingTest::testTdf103083()
 
     const SfxItemSet& rParagraphItemSet2 = pTextObject->GetOutlinerParaObject()->GetTextObject().GetParaAttribs(2);
     CPPUNIT_ASSERT_EQUAL((sal_uInt16)3, rParagraphItemSet2.Count());
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 /**
@@ -1445,6 +1513,7 @@ void SdTiledRenderingTest::testTdf103083()
 void SdTiledRenderingTest::testTdf104405()
 {
     // Load the document.
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("tdf104405.fodp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     SdPage* pActualPage = pViewShell->GetActualPage();
@@ -1492,10 +1561,13 @@ void SdTiledRenderingTest::testTdf104405()
     // the following name has a compiler-dependent part
     CPPUNIT_ASSERT_EQUAL(getXPath(pXmlDoc, aPrefix, "value"), OUString("2"));
     xmlFreeDoc(pXmlDoc);
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testTdf81754()
 {
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("tdf81754.pptx");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     SdPage* pActualPage = pViewShell->GetActualPage();
@@ -1525,11 +1597,13 @@ void SdTiledRenderingTest::testTdf81754()
     CPPUNIT_ASSERT_EQUAL(OUString("Somethingxx"), aEdit.GetText(0));
 
     xDocShRef->DoClose();
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testTdf105502()
 {
     // Load the document.
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("tdf105502.odp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     sd::Window* pWindow = pViewShell->GetActiveWindow();
@@ -1580,11 +1654,13 @@ void SdTiledRenderingTest::testTdf105502()
     CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), aLastCell.mnRow);
 
     xmlFreeDoc(pXmlDoc);
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testCommentCallbacks()
 {
     // Load the document.
+    comphelper::LibreOfficeKit::setActive();
     // Set the tiled annotations off
     comphelper::LibreOfficeKit::setTiledAnnotations(false);
 
@@ -1694,11 +1770,13 @@ void SdTiledRenderingTest::testCommentCallbacks()
     mxComponent.clear();
 
     comphelper::LibreOfficeKit::setTiledAnnotations(true);
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testMultiViewInsertDeletePage()
 {
     // Load the document.
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
     ViewCallback aView1;
     int nView1 = SfxLokHelper::getView();
@@ -1739,11 +1817,14 @@ void SdTiledRenderingTest::testMultiViewInsertDeletePage()
 
     mxComponent->dispose();
     mxComponent.clear();
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testDisableUndoRepair()
 {
     // Load the document.
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
     SfxViewShell* pView1 = SfxViewShell::Current();
     int nView1 = SfxLokHelper::getView();
@@ -1793,10 +1874,14 @@ void SdTiledRenderingTest::testDisableUndoRepair()
         CPPUNIT_ASSERT(pUInt32Item);
         CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SID_REPAIRPACKAGE), pUInt32Item->GetValue());
     }
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testDocumentRepair()
 {
+    comphelper::LibreOfficeKit::setActive();
+
     // Create two views.
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
     CPPUNIT_ASSERT(pXImpressDocument);
@@ -1838,11 +1923,14 @@ void SdTiledRenderingTest::testDocumentRepair()
         CPPUNIT_ASSERT_EQUAL(true, dynamic_cast< const SfxBoolItem* >(pItem1.get())->GetValue());
         CPPUNIT_ASSERT_EQUAL(true, dynamic_cast< const SfxBoolItem* >(pItem2.get())->GetValue());
     }
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testLanguageStatus()
 {
     // Load the document.
+    comphelper::LibreOfficeKit::setActive();
     createDoc("dummy.odp");
     SfxViewShell* pView1 = SfxViewShell::Current();
     SfxLokHelper::createView();
@@ -1855,11 +1943,15 @@ void SdTiledRenderingTest::testLanguageStatus()
         CPPUNIT_ASSERT(dynamic_cast< const SfxStringItem* >(pItem1.get()));
         CPPUNIT_ASSERT(dynamic_cast< const SfxStringItem* >(pItem2.get()));
     }
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testDefaultView()
 {
     // Load the document with notes view.
+    comphelper::LibreOfficeKit::setActive();
+
     SdXImpressDocument* pXImpressDocument = createDoc("notes-view.odp");
     sd::ViewShell* pView = pXImpressDocument->GetDocShell()->GetViewShell();
     {
@@ -1874,11 +1966,14 @@ void SdTiledRenderingTest::testDefaultView()
         CPPUNIT_ASSERT_EQUAL(true, pImpressView->GetValue());
         CPPUNIT_ASSERT_EQUAL(false, pNotesView->GetValue());
     }
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testIMESupport()
 {
     // Load the document with notes view.
+    comphelper::LibreOfficeKit::setActive();
+
     SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
     VclPtr<vcl::Window> pDocWindow = pXImpressDocument->getDocWindow();
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
@@ -1911,11 +2006,14 @@ void SdTiledRenderingTest::testIMESupport()
     rEditView.SetSelection(aWordSelection);
     // content contains only the last IME composition, not all
     CPPUNIT_ASSERT_EQUAL(OUString("x").concat(aInputs[aInputs.size() - 1]), rEditView.GetSelected());
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testTdf115783()
 {
     // Load the document.
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("tdf115783.fodp");
     sd::ViewShell* pViewShell = pXImpressDocument->GetDocShell()->GetViewShell();
     SdPage* pActualPage = pViewShell->GetActualPage();
@@ -1977,11 +2075,14 @@ void SdTiledRenderingTest::testTdf115783()
     int nHeight = xPropertySet->getPropertyValue("CharHeight").get<float>();
     // Make sure that the single font size for the cell is the expected one.
     CPPUNIT_ASSERT_EQUAL(12, nHeight);
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testPasteTextOnSlide()
 {
     // Load the document.
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("paste_text_onslide.odp");
     CPPUNIT_ASSERT(pXImpressDocument);
 
@@ -2039,10 +2140,13 @@ void SdTiledRenderingTest::testPasteTextOnSlide()
     Point aPos = pTextObj->GetLastBoundRect().TopLeft();
     CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(12990), aPos.getX(), 100);
     CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(7393), aPos.getY(), 100);
+
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testTdf115873()
 {
+    comphelper::LibreOfficeKit::setActive();
     // Initialize the navigator.
     SdXImpressDocument* pXImpressDocument = createDoc("tdf115873.fodp");
     SfxViewShell* pViewShell = SfxViewShell::Current();
@@ -2074,10 +2178,12 @@ void SdTiledRenderingTest::testTdf115873()
     // This failed, single-click did not result in a shape selection (only
     // double-click did).
     CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rMarkList.GetMarkCount());
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testTdf115873Group()
 {
+    comphelper::LibreOfficeKit::setActive();
     // Initialize the navigator.
     SdXImpressDocument* pXImpressDocument = createDoc("tdf115873-group.fodp");
     SfxViewShell* pViewShell = SfxViewShell::Current();
@@ -2089,11 +2195,13 @@ void SdTiledRenderingTest::testTdf115873Group()
     // This failed, Fill() and IsEqualToDoc() were out of sync for group
     // shapes.
     CPPUNIT_ASSERT(pObjects->IsEqualToDoc(pXImpressDocument->GetDoc()));
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 void SdTiledRenderingTest::testCutSelectionChange()
 {
     // Load the document.
+    comphelper::LibreOfficeKit::setActive();
     SdXImpressDocument* pXImpressDocument = createDoc("cut_selection_change.odp");
     CPPUNIT_ASSERT(pXImpressDocument);
 
@@ -2127,6 +2235,7 @@ void SdTiledRenderingTest::testCutSelectionChange()
 
     // Selection is removed
     CPPUNIT_ASSERT_EQUAL(static_cast<std::size_t>(0), m_aSelection.size());
+    comphelper::LibreOfficeKit::setActive(false);
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(SdTiledRenderingTest);


More information about the Libreoffice-commits mailing list