tdf#61594 sw floattable: import floating tables as split flys by default

To get wider testing.

Change-Id: Ic05844c6ae48429feb9a0cd3217a7afce6c902dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150252
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 1177b54..200572a 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -5667,7 +5667,7 @@
              <desc>Specifies whether a floating table should be imported as a split text frame.</desc>
              <label>Import floating table as split frame.</label>
            </info>
            <value>false</value>
            <value>true</value>
          </prop>
        </group>
      </group>
diff --git a/sw/qa/core/layout/flycnt.cxx b/sw/qa/core/layout/flycnt.cxx
index 85dae0e..c72f9ff 100644
--- a/sw/qa/core/layout/flycnt.cxx
+++ b/sw/qa/core/layout/flycnt.cxx
@@ -89,7 +89,6 @@ void Test::Create1x2SplitFly()
CPPUNIT_TEST_FIXTURE(Test, testSplitFlyWithTable)
{
    // Given a document with a multi-page floating table:
    SwModelTestBase::FlySplitGuard aGuard;
    createSwDoc("floattable.docx");

    // When laying out that document:
diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx
index 4e62d3b..472c72a 100644
--- a/sw/qa/inc/swmodeltestbase.hxx
+++ b/sw/qa/inc/swmodeltestbase.hxx
@@ -110,6 +110,7 @@ public:
    /// Temporarily enables DOCX::ImportFloatingTableAsSplitFly.
    class SWQAHELPER_DLLPUBLIC FlySplitGuard
    {
        bool m_bOldValue = false;
    public:
        FlySplitGuard();
        ~FlySplitGuard();
diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx
index 496f1ed..5f48985 100644
--- a/sw/qa/unit/swmodeltestbase.cxx
+++ b/sw/qa/unit/swmodeltestbase.cxx
@@ -38,6 +38,8 @@ using namespace css;

SwModelTestBase::FlySplitGuard::FlySplitGuard()
{
    m_bOldValue
        = officecfg::Office::Writer::Filter::Import::DOCX::ImportFloatingTableAsSplitFly::get();
    std::shared_ptr<comphelper::ConfigurationChanges> pChanges(
        comphelper::ConfigurationChanges::create());
    officecfg::Office::Writer::Filter::Import::DOCX::ImportFloatingTableAsSplitFly::set(true,
@@ -49,7 +51,7 @@ SwModelTestBase::FlySplitGuard::~FlySplitGuard()
{
    std::shared_ptr<comphelper::ConfigurationChanges> pChanges(
        comphelper::ConfigurationChanges::create());
    officecfg::Office::Writer::Filter::Import::DOCX::ImportFloatingTableAsSplitFly::set(false,
    officecfg::Office::Writer::Filter::Import::DOCX::ImportFloatingTableAsSplitFly::set(m_bOldValue,
                                                                                        pChanges);
    pChanges->commit();
}
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 70fdcae..51de86e8 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -66,9 +66,9 @@ bool IsFlySplitAllowed()
    bool bRet
        = officecfg::Office::Writer::Filter::Import::DOCX::ImportFloatingTableAsSplitFly::get();

    if (!bRet)
    if (bRet)
    {
        bRet = getenv("SW_FORCE_FLY_SPLIT") != nullptr;
        bRet = getenv("SW_DISABLE_FLY_SPLIT") == nullptr;
    }

    return bRet;