summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-04-12 08:13:07 +0200
committerMiklos Vajna <vmiklos@collabora.com>2023-04-12 09:12:17 +0200
commitce3308a926f036b87515b8cd97d2b197063dc77a (patch)
tree54362c2e47d0f297e489deebcd1d5ee0e188939a
parent31b365d1fe49eb71409ff78ff3fbcc7fface4040 (diff)
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
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Writer.xcs2
-rw-r--r--sw/qa/core/layout/flycnt.cxx1
-rw-r--r--sw/qa/inc/swmodeltestbase.hxx1
-rw-r--r--sw/qa/unit/swmodeltestbase.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx4
5 files changed, 7 insertions, 5 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 1177b5472dcd..200572a620f3 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 4e62d3b07ff7..472c72a1e052 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 496f1ed713f0..5f48985c86fe 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 70fdcae061de..51de86e89fe6 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;