diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-03-17 14:00:17 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-03-17 14:10:34 +0000 |
commit | d477fa8ac1b0d3ee81427217bbb5950278ab16db (patch) | |
tree | eff80bbdb718f81b11e0c7eb5c96dbf2f96508df /sw/qa/unit | |
parent | 57914a4084da9107ec6815b1916a4be117c400bf (diff) |
sw floattable: unconditionally map <w:tblpPr> to SwFormatFlySplit
CppunitTest_sw_ooxmlexport8's testN816593 failed in the
SW_FORCE_FLY_SPLIT=1 case because the re-import of the document merged
two tables into one.
The problem starts earlier, we didn't import the table with a <w:tblpPr>
as a floating table, but we should.
Fix the problem by never going via m_aPendingFloatingTables in the
SW_FORCE_FLY_SPLIT=1 case, since that was only a workaround for layout
limitations. This conditionally reverts commit
78d1f1c2835b9fae0f91ed771fc1d594c7817502 (fdo#68607 bnc#816593
DomainMapperTableHandler: don't always start a frame, 2013-09-03).
Also add a SwModelTestBase::FlySplitGuard, so it's just a one-liner
change to test the SW_FORCE_FLY_SPLIT=1 case from cppunit. The goal is
to have this on by default once it's mature enough.
Change-Id: I9d94a49f7a0c27dd43e8fd388867c65d6d25f2e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149044
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/qa/unit')
-rw-r--r-- | sw/qa/unit/swmodeltestbase.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx index 035866b68838..823148151377 100644 --- a/sw/qa/unit/swmodeltestbase.cxx +++ b/sw/qa/unit/swmodeltestbase.cxx @@ -23,6 +23,8 @@ #include <unotools/streamwrap.hxx> #include <unotools/ucbstreamhelper.hxx> #include <vcl/scheduler.hxx> +#include <comphelper/configuration.hxx> +#include <officecfg/Office/Writer.hxx> #include <IDocumentLayoutAccess.hxx> #include <docsh.hxx> @@ -34,6 +36,24 @@ using namespace css; +SwModelTestBase::FlySplitGuard::FlySplitGuard() +{ + std::shared_ptr<comphelper::ConfigurationChanges> pChanges( + comphelper::ConfigurationChanges::create()); + officecfg::Office::Writer::Filter::Import::DOCX::ImportFloatingTableAsSplitFly::set(true, + pChanges); + pChanges->commit(); +} + +SwModelTestBase::FlySplitGuard::~FlySplitGuard() +{ + std::shared_ptr<comphelper::ConfigurationChanges> pChanges( + comphelper::ConfigurationChanges::create()); + officecfg::Office::Writer::Filter::Import::DOCX::ImportFloatingTableAsSplitFly::set(false, + pChanges); + pChanges->commit(); +} + void SwModelTestBase::paste(std::u16string_view aFilename, uno::Reference<text::XTextRange> const& xTextRange) { |