officecfg/registry/schema/org/openoffice/Office/Writer.xcs |    2 +-
 sw/qa/core/layout/flycnt.cxx                               |    1 -
 sw/qa/inc/swmodeltestbase.hxx                              |    1 +
 sw/qa/unit/swmodeltestbase.cxx                             |    4 +++-
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx   |    4 ++--
 5 files changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 51e87b81d65e8a73004d313f4191dec808beb9c3
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Wed Apr 12 08:13:07 2023 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Thu Apr 20 08:12:38 2023 +0200

    tdf#61594 sw floattable: import floating tables as split flys by default
    
    To get wider testing.
    
    (cherry picked from commit ce3308a926f036b87515b8cd97d2b197063dc77a)
    
    Change-Id: Ic05844c6ae48429feb9a0cd3217a7afce6c902dc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150311
    Tested-by: Miklos Vajna <vmik...@collabora.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 9b74752acac1..ebd1765e060e 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 85dae0e7cfab..c72f9fff0459 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 83daf0ee6c5a..0d43d4aca3b9 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 6ba17903f837..5999828fa8ca 100644
--- a/sw/qa/unit/swmodeltestbase.cxx
+++ b/sw/qa/unit/swmodeltestbase.cxx
@@ -36,6 +36,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,
@@ -47,7 +49,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 d19f1750c4df..6018c0df2acc 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;

Reply via email to