summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2023-10-12 08:34:33 +0200
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-10-13 16:12:55 +0200
commitba2b66996146fcdaeb58ed044b0e0b5a60dafaa8 (patch)
tree6ed863191f33bdffc19487d7ace10f630bafa9ee /sw/source/filter
parent6ada59c8a8b5e3357577ac00c5249bb61f926a89 (diff)
sw floattable: add an AllowTextAfterFloatingTableBreak compat flag
Word and Writer normally only wrap the anchor text around the split fly frame on the last page, but as <https://bugs.documentfoundation.org/show_bug.cgi?id=61594#c33> points out, Word has an allowTextAfterFloatingTableBreak compat flag that allows wrapping on all pages. Map this to a Writer compat flag for now, which affects all floating tables in the document. The mailing list thread at <https://lists.freedesktop.org/archives/libreoffice/2023-July/thread.html#90670> suggests that possibly there will be demand to control this on a per-frame level: that's not something Word supports, but we could do an OR of the two settings in the future if wanted. This is just the compat flag itself, layout still has to actually handle it. This compat flag is probably quite rare, so only write it to documents if it's true (the default is false). (cherry picked from commit 5b9249e950165015ba57cc2c0503381df9751bf6) Change-Id: Ibc431f7dc11710926c115d8e03f760b7f0784304 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157903 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/xml/xmlexp.cxx1
-rw-r--r--sw/source/filter/xml/xmlimp.cxx10
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 6d9f16f35218..1dad70965e22 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -396,6 +396,7 @@ void SwXMLExport::GetConfigurationSettings( Sequence < PropertyValue >& rProps)
static const std::initializer_list<std::u16string_view> vOmitFalseValues = {
u"DoNotBreakWrappedTables",
+ u"AllowTextAfterFloatingTableBreak",
};
SvXMLUnitConverter::convertPropertySet( rProps, xProps, &vOmitFalseValues );
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 58916ccd3b08..4dfe7b23e52b 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -1309,6 +1309,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
bool bAutoFirstLineIndentDisregardLineSpace = false;
bool bHyphenateURLs = false;
bool bDoNotBreakWrappedTables = false;
+ bool bAllowTextAfterFloatingTableBreak = false;
bool bDropCapPunctuation = false;
const PropertyValue* currentDatabaseDataSource = nullptr;
@@ -1411,6 +1412,10 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
{
rValue.Value >>= bDoNotBreakWrappedTables;
}
+ else if (rValue.Name == "AllowTextAfterFloatingTableBreak")
+ {
+ rValue.Value >>= bAllowTextAfterFloatingTableBreak;
+ }
else if ( rValue.Name == "DropCapPunctuation" )
bDropCapPunctuation = true;
}
@@ -1585,6 +1590,11 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
xProps->setPropertyValue("DoNotBreakWrappedTables", Any(true));
}
+ if (bAllowTextAfterFloatingTableBreak)
+ {
+ xProps->setPropertyValue("AllowTextAfterFloatingTableBreak", Any(true));
+ }
+
// LO 7.4 and previous versions had different drop cap punctuation: very long dashes.
// In order to keep backwards compatibility, DropCapPunctuation option is written to .odt
// files, and the default for new documents is 'true'. Files without this option