[Libreoffice-commits] core.git: Branch 'distro/escriba/escriba-5.4' - 11 commits - sw/inc sw/qa sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Aug 13 15:55:25 UTC 2018


 sw/inc/calc.hxx                                               |    1 
 sw/inc/usrfld.hxx                                             |   14 
 sw/qa/extras/layout/data/user-field-type-language.fodt        |   21 
 sw/qa/extras/layout/layout.cxx                                |   24 
 sw/qa/extras/uiwriter/data/split-section-in-nested-table.fodt |  154 +
 sw/qa/extras/uiwriter/data/tdf112109.fodt                     |  170 +
 sw/qa/extras/uiwriter/data/tdf112160.fodt                     |  125 
 sw/qa/extras/uiwriter/data/tdf112741.fodt                     |  405 ++
 sw/qa/extras/uiwriter/data/tdf112860.fodt                     | 1394 ++++++++++
 sw/qa/extras/uiwriter/data/tdf113153.fodt                     |  677 ++++
 sw/qa/extras/uiwriter/data/tdf113287.fodt                     |  291 ++
 sw/qa/extras/uiwriter/data/tdf113445.fodt                     |  348 ++
 sw/qa/extras/uiwriter/data/tdf113520.fodt                     |  292 ++
 sw/qa/extras/uiwriter/data/tdf113686.fodt                     |  278 +
 sw/qa/extras/uiwriter/uiwriter.cxx                            |  227 +
 sw/source/core/bastyp/calc.cxx                                |    5 
 sw/source/core/fields/usrfld.cxx                              |   31 
 sw/source/core/layout/ftnfrm.cxx                              |    1 
 sw/source/core/layout/sectfrm.cxx                             |   70 
 sw/source/core/layout/tabfrm.cxx                              |   42 
 20 files changed, 4537 insertions(+), 33 deletions(-)

New commits:
commit 7e80dd415c7dc8af2d4e61fcfa4f10ebe1dfb71d
Author:     Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Thu Aug 2 17:53:06 2018 +0200
Commit:     Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Mon Aug 13 16:31:46 2018 +0200

    sw user field type: fix locale of string -> float conversion
    
    The key part is the SwUserFieldType::GetValue() hunk, the field type has
    to always use the same locale, which means if we get an SwCalc reference
    that works with the document or field locale that has to be switched
    temporarily.
    
    Reviewed-on: https://gerrit.libreoffice.org/58492
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins
    (cherry picked from commit 6ca5d288ca810f128163da121777ee2e11c46edc)
    
    Conflicts:
            sw/qa/extras/layout/layout.cxx
    
    Change-Id: I26ff18e74f477729a66b066c4baf6d215a7685bc

diff --git a/sw/inc/calc.hxx b/sw/inc/calc.hxx
index c6f3380cceee..125c5e2f6ab9 100644
--- a/sw/inc/calc.hxx
+++ b/sw/inc/calc.hxx
@@ -197,6 +197,7 @@ public:
 
     bool        Push(const SwUserFieldType* pUserFieldType);
     void        Pop();
+    CharClass* GetCharClass();
 
     void        SetCalcError( SwCalcError eErr )    { m_eError = eErr; }
     bool        IsCalcError() const                 { return SwCalcError::NONE != m_eError; }
diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx
index 9d241df8a118..a439a3a7412f 100644
--- a/sw/inc/usrfld.hxx
+++ b/sw/inc/usrfld.hxx
@@ -26,12 +26,20 @@ class SfxPoolItem;
 class SwCalc;
 class SwDoc;
 
+/**
+ * The shared part of a user field.
+ *
+ * Tracks the value, but conversion between the float and string representation
+ * always happens with the system locale.
+ */
 class SW_DLLPUBLIC SwUserFieldType : public SwValueFieldType
 {
     bool    bValidValue : 1;
     bool    bDeleted : 1;
+    /// Float value type.
     double  nValue;
     OUString  aName;
+    /// String value type.
     OUString  aContent;
     sal_uInt16  nType;
 
@@ -83,6 +91,12 @@ inline void SwUserFieldType::SetType(sal_uInt16 nSub)
     EnableFormat(!(nSub & nsSwGetSetExpType::GSE_STRING));
 }
 
+/**
+ * The non-shared part of a user field.
+ *
+ * Tracks the number format and the language, conversion between the float and
+ * string representation is independent from the system locale.
+ */
 class SW_DLLPUBLIC SwUserField : public SwValueField
 {
     sal_uInt16  nSubType;
diff --git a/sw/qa/extras/layout/data/user-field-type-language.fodt b/sw/qa/extras/layout/data/user-field-type-language.fodt
new file mode 100644
index 000000000000..f741add7ddd7
--- /dev/null
+++ b/sw/qa/extras/layout/data/user-field-type-language.fodt
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+  <office:styles>
+    <style:default-style style:family="paragraph">
+      <style:text-properties fo:language="en" fo:country="GB"/>
+    </style:default-style>
+  </office:styles>
+  <office:automatic-styles>
+    <number:number-style style:name="N10004" number:language="en" number:country="GB">
+      <number:number number:decimal-places="2" number:min-integer-digits="1" number:grouping="true"/>
+    </number:number-style>
+  </office:automatic-styles>
+  <office:body>
+    <office:text text:use-soft-page-breaks="true">
+      <text:user-field-decls>
+        <text:user-field-decl office:value-type="float" office:value="1234.56" text:name="user-field-decl-name-example"/>
+      </text:user-field-decls>
+      <text:p>Before <text:user-field-get style:data-style-name="N10004" text:name="user-field-decl-name-example">1,234.56</text:user-field-get> after.</text:p>
+    </office:text>
+  </office:body>
+</office:document>
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 9a73e2025147..7167647ac93b 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -9,6 +9,8 @@
 
 #include <swmodeltestbase.hxx>
 #include <test/mtfxmldump.hxx>
+#include <comphelper/scopeguard.hxx>
+#include <unotools/syslocaleoptions.hxx>
 
 static char const DATA_DIRECTORY[] = "/sw/qa/extras/layout/data/";
 
@@ -19,11 +21,13 @@ public:
     void testTdf116830();
     void testTdf116925();
     void testTdf117028();
+    void testUserFieldTypeLanguage();
 
     CPPUNIT_TEST_SUITE(SwLayoutWriter);
     CPPUNIT_TEST(testTdf116830);
     CPPUNIT_TEST(testTdf116925);
     CPPUNIT_TEST(testTdf117028);
+    CPPUNIT_TEST(testUserFieldTypeLanguage);
     CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -108,6 +112,26 @@ void SwLayoutWriter::testTdf117028()
     assertXPathContent(pXmlDoc, "//textarray/text", "Hello");
 }
 
+void SwLayoutWriter::testUserFieldTypeLanguage()
+{
+    // Set the system locale to German, the document will be English.
+    SvtSysLocaleOptions aOptions;
+    aOptions.SetLocaleConfigString("de-DE");
+    aOptions.Commit();
+    comphelper::ScopeGuard g([&aOptions] {
+        aOptions.SetLocaleConfigString(OUString());
+        aOptions.Commit();
+    });
+
+    SwDoc* pDoc = createDoc("user-field-type-language.fodt");
+    SwViewShell* pViewShell = pDoc->getIDocumentLayoutAccess().GetCurrentViewShell();
+    pViewShell->UpdateFields();
+    xmlDocPtr pXmlDoc = parseLayoutDump();
+    // This was "123,456.00", via a buggy 1234.56 -> 1234,56 -> 123456 ->
+    // 123,456.00 transform chain.
+    assertXPath(pXmlDoc, "/root/page/body/txt/Special[@nType='POR_FLD']", "rText", "1,234.56");
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwLayoutWriter);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 0edb21517878..1532a3a898b7 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -637,6 +637,11 @@ void SwCalc::Pop()
     m_aRekurStack.pop_back();
 }
 
+CharClass* SwCalc::GetCharClass()
+{
+    return m_pCharClass;
+}
+
 SwCalcOper SwCalc::GetToken()
 {
     if( m_nCommandPos >= m_sCommand.getLength() )
diff --git a/sw/source/core/fields/usrfld.cxx b/sw/source/core/fields/usrfld.cxx
index 080dcfc77bd1..0b25a940802a 100644
--- a/sw/source/core/fields/usrfld.cxx
+++ b/sw/source/core/fields/usrfld.cxx
@@ -39,6 +39,18 @@
 
 using namespace ::com::sun::star;
 
+namespace
+{
+/**
+ * Returns the language used for float <-> string conversions in
+ * SwUserFieldType.
+ */
+LanguageType GetFieldTypeLanguage()
+{
+    return LANGUAGE_SYSTEM;
+}
+}
+
 // Userfields
 
 SwUserField::SwUserField(SwUserFieldType* pTyp, sal_uInt16 nSub, sal_uInt32 nFormat)
@@ -222,7 +234,21 @@ double SwUserFieldType::GetValue( SwCalc& rCalc )
         rCalc.SetCalcError( SwCalcError::Syntax );
         return 0;
     }
+
+    // See if we need to temporarily switch rCalc's language: in case it
+    // differs from the field type locale.
+    CharClass* pCharClass = rCalc.GetCharClass();
+    LanguageTag aCalcLanguage = pCharClass->getLanguageTag();
+    LanguageTag aFieldTypeLanguage(GetFieldTypeLanguage());
+    bool bSwitchLanguage = aCalcLanguage != aFieldTypeLanguage;
+    if (bSwitchLanguage)
+        pCharClass->setLanguageTag(aFieldTypeLanguage);
+
     nValue = rCalc.Calculate( aContent ).GetDouble();
+
+    if (bSwitchLanguage)
+        pCharClass->setLanguageTag(aCalcLanguage);
+
     rCalc.Pop();
 
     if( !rCalc.IsCalcError() )
@@ -306,10 +332,7 @@ bool SwUserFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
             rAny >>= fVal;
             nValue = fVal;
 
-            // The following line is in fact wrong, since the language is unknown (is part of the
-            // field) and, thus, aContent should also belong to the field. Each field can have a
-            // different language, but the same content with just different formatting.
-            aContent = DoubleToString(nValue, static_cast<sal_uInt16>(LANGUAGE_SYSTEM));
+            aContent = DoubleToString(nValue, static_cast<sal_uInt16>(GetFieldTypeLanguage()));
         }
         break;
     case FIELD_PROP_PAR2:
commit 6391274bbaf9c3ccd7b4ceb593317b9321a5fe15
Author:     Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Tue Nov 7 10:42:27 2017 +0100
Commit:     Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Mon Aug 13 16:09:35 2018 +0200

    tdf#113686 sw: handle sections when counting height of first content line
    
    When moving back a row that has a single text frame, it should not
    matter if that text frame is in a section frame or not.
    
    The problem was that the bugdoc has a split (outer) table, the follow's
    ShouldBwdMoved() returned false, as
    SwTabFrame::CalcHeightOfFirstContentLine() returned USHRT_MAX, as it had
    no idea how to calc the height of a text frame in a section frame.
    
    Fix this by looking "through" the section frame, and handling "text
    frame" and "text frame in section frame" the same way.
    
    Reviewed-on: https://gerrit.libreoffice.org/44393
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit e024cad7c1365da6a198656c3ca0c32b28938e87)
    
    Conflicts:
            sw/qa/extras/uiwriter/uiwriter.cxx
    
    Change-Id: Ic3605a1e2d28bfaa69bf18f31cfbf1e6e681c04f

diff --git a/sw/qa/extras/uiwriter/data/tdf113686.fodt b/sw/qa/extras/uiwriter/data/tdf113686.fodt
new file mode 100644
index 000000000000..7f7f8ac74a70
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf113686.fodt
@@ -0,0 +1,278 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oas
 is:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:
 experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+  <office:settings>
+    <config:config-item-set config:name="ooo:view-settings">
+      <config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
+      <config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
+      <config:config-item config:name="ViewAreaWidth" config:type="long">49108</config:config-item>
+      <config:config-item config:name="ViewAreaHeight" config:type="long">22809</config:config-item>
+      <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+      <config:config-item-map-indexed config:name="Views">
+        <config:config-item-map-entry>
+          <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
+          <config:config-item config:name="ViewLeft" config:type="long">9377</config:config-item>
+          <config:config-item config:name="ViewTop" config:type="long">3007</config:config-item>
+          <config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
+          <config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
+          <config:config-item config:name="VisibleRight" config:type="long">49107</config:config-item>
+          <config:config-item config:name="VisibleBottom" config:type="long">22807</config:config-item>
+          <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+          <config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
+          <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
+          <config:config-item config:name="ZoomFactor" config:type="short">100</config:config-item>
+          <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
+        </config:config-item-map-entry>
+      </config:config-item-map-indexed>
+    </config:config-item-set>
+    <config:config-item-set config:name="ooo:configuration-settings">
+      <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+      <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintFaxName" config:type="string"/>
+      <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="TabOverflow" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrinterName" config:type="string"/>
+      <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+      <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="Rsid" config:type="int">676140</config:config-item>
+      <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+      <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+      <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="CurrentDatabaseDataSource" config:type="string">writer-data-source-ooxml</config:config-item>
+      <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+      <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="RsidRoot" config:type="int">104774</config:config-item>
+      <config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+      <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+      <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+      <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+      <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+    </config:config-item-set>
+  </office:settings>
+  <office:scripts>
+    <office:script script:language="ooo:Basic">
+      <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
+    </office:script>
+  </office:scripts>
+  <office:font-face-decls>
+    <style:font-face style:name="Liberation Sans" svg:font-family="Liberation Sans" style:font-family-generic="swiss" style:font-pitch="variable"/>
+    <style:font-face style:name="Liberation Serif" svg:font-family="Liberation Serif" style:font-family-generic="roman" style:font-pitch="variable"/>
+    <style:font-face style:name="Arial Unicode MS" svg:font-family="'Arial Unicode MS'" style:font-family-generic="system" style:font-pitch="variable"/>
+    <style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-family-generic="system" style:font-pitch="variable"/>
+  </office:font-face-decls>
+  <office:styles>
+    <style:default-style style:family="paragraph">
+      <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+      <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Arial Unicode MS" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+    </style:default-style>
+    <style:default-style style:family="table">
+      <style:table-properties table:border-model="collapsing"/>
+    </style:default-style>
+    <style:default-style style:family="table-row">
+      <style:table-row-properties fo:keep-together="always"/>
+    </style:default-style>
+    <style:style style:name="Standard" style:family="paragraph" style:class="text">
+      <style:text-properties fo:language="en" fo:country="GB"/>
+    </style:style>
+  </office:styles>
+  <office:automatic-styles>
+    <style:style style:name="Table1" style:family="table">
+      <style:table-properties style:width="16.662cm" table:align="margins"/>
+    </style:style>
+    <style:style style:name="Table1.A" style:family="table-column">
+      <style:table-column-properties style:column-width="16.662cm" style:rel-column-width="65535*"/>
+    </style:style>
+    <style:style style:name="Table1.1" style:family="table-row">
+      <style:table-row-properties fo:keep-together="auto"/>
+    </style:style>
+    <style:style style:name="Table1.A1" style:family="table-cell">
+      <style:table-cell-properties fo:background-color="#0899cc" fo:padding="0cm" fo:border="0.05pt solid #000000">
+        <style:background-image/>
+      </style:table-cell-properties>
+    </style:style>
+    <style:style style:name="Table1.A2" style:family="table-cell">
+      <style:table-cell-properties fo:padding="0cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+    </style:style>
+    <style:style style:name="Table2" style:family="table">
+      <style:table-properties style:width="16.616cm" fo:margin-left="0cm" fo:margin-right="0.046cm" table:align="margins"/>
+    </style:style>
+    <style:style style:name="Table2.A" style:family="table-column">
+      <style:table-column-properties style:column-width="7.664cm" style:rel-column-width="4345*"/>
+    </style:style>
+    <style:style style:name="Table2.B" style:family="table-column">
+      <style:table-column-properties style:column-width="3.025cm" style:rel-column-width="1715*"/>
+    </style:style>
+    <style:style style:name="Table2.C" style:family="table-column">
+      <style:table-column-properties style:column-width="2.738cm" style:rel-column-width="1552*"/>
+    </style:style>
+    <style:style style:name="Table2.D" style:family="table-column">
+      <style:table-column-properties style:column-width="3.189cm" style:rel-column-width="1808*"/>
+    </style:style>
+    <style:style style:name="Table2.1" style:family="table-row">
+      <style:table-row-properties fo:keep-together="auto"/>
+    </style:style>
+    <style:style style:name="Table2.A1" style:family="table-cell">
+      <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="0.05pt solid #000000" fo:border-bottom="0.05pt solid #000000"/>
+    </style:style>
+    <style:style style:name="Table2.D1" style:family="table-cell">
+      <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+    </style:style>
+    <style:style style:name="Table2.A2" style:family="table-cell">
+      <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+    </style:style>
+    <style:style style:name="Table2.D2" style:family="table-cell">
+      <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+    </style:style>
+    <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="PG_5f_Default">
+      <style:paragraph-properties style:page-number="auto"/>
+    </style:style>
+    <style:style style:name="Sect1" style:family="section">
+      <style:section-properties fo:background-color="transparent" style:editable="false">
+        <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+        <style:background-image/>
+      </style:section-properties>
+    </style:style>
+    <style:page-layout style:name="pm1">
+      <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm">
+        <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+      </style:page-layout-properties>
+      <style:header-style/>
+      <style:footer-style/>
+    </style:page-layout>
+    <style:page-layout style:name="pm2">
+      <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm">
+        <style:footnote-sep style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+      </style:page-layout-properties>
+      <style:header-style/>
+      <style:footer-style/>
+    </style:page-layout>
+    <style:page-layout style:name="pm3">
+      <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="6.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.4cm" fo:margin-bottom="0.499cm" fo:margin-left="2.54cm" fo:margin-right="1.799cm" fo:border="none" fo:padding="0cm" style:shadow="none" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm">
+        <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+      </style:page-layout-properties>
+      <style:header-style/>
+      <style:footer-style/>
+    </style:page-layout>
+    <number:number-style style:name="N3">
+      <number:number number:decimal-places="0" loext:min-decimal-places="0" number:min-integer-digits="1" number:grouping="true"/>
+    </number:number-style>
+  </office:automatic-styles>
+  <office:master-styles>
+    <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+    <style:master-page style:name="Endnote" style:page-layout-name="pm2"/>
+    <style:master-page style:name="PG_5f_Default" style:display-name="PG_Default" style:page-layout-name="pm3"/>
+  </office:master-styles>
+  <office:body>
+    <office:text text:use-soft-page-breaks="true">
+      <text:p text:style-name="P1"/>
+      <table:table table:name="Table1" table:style-name="Table1">
+        <table:table-column table:style-name="Table1.A"/>
+        <table:table-row table:style-name="Table1.1">
+          <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+            <table:table table:name="Table2" table:style-name="Table2">
+              <table:table-column table:style-name="Table2.A"/>
+              <table:table-column table:style-name="Table2.B"/>
+              <table:table-column table:style-name="Table2.C"/>
+              <table:table-column table:style-name="Table2.D"/>
+              <table:table-row table:style-name="Table2.1">
+                <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+                  <text:p>Table2:A1-P01</text:p>
+                  <text:p>Table2:A1-P02</text:p>
+                  <text:p>Table2:A1-P03</text:p>
+                  <text:p>Table2:A1-P04</text:p>
+                  <text:p>Table2:A1-P05</text:p>
+                  <text:p>Table2:A1-P06</text:p>
+                  <text:p>Table2:A1-P07</text:p>
+                  <text:p>Table2:A1-P08</text:p>
+                  <text:p>Table2:A1-P09</text:p>
+                  <text:p>Table2:A1-P10</text:p>
+                </table:table-cell>
+                <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+                  <text:p text:style-name="Standard">Table2:B1</text:p>
+                </table:table-cell>
+                <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+                  <text:p text:style-name="Standard">Table2:C1</text:p>
+                </table:table-cell>
+                <table:table-cell table:style-name="Table2.D1" office:value-type="string">
+                  <text:p text:style-name="Standard">Table2:D1</text:p>
+                </table:table-cell>
+              </table:table-row>
+            </table:table>
+            <text:section text:style-name="Sect1" text:name="Section1">
+              <text:p text:style-name="Standard">Table1:A1</text:p>
+            </text:section>
+          </table:table-cell>
+        </table:table-row>
+        <table:table-row table:style-name="Table1.1">
+          <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+            <text:p text:style-name="Standard">Table1:A2</text:p>
+          </table:table-cell>
+        </table:table-row>
+      </table:table>
+      <text:p text:style-name="Standard"/>
+    </office:text>
+  </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index b0cfe249cb32..029d72fd2ae6 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -266,6 +266,7 @@ public:
     void testTdf112860();
     void testTdf113287();
     void testTdf113445();
+    void testTdf113686();
     void testLinesInSectionInTable();
     void testLinesMoveBackwardsInSectionInTable();
 
@@ -423,6 +424,7 @@ public:
     CPPUNIT_TEST(testTdf112860);
     CPPUNIT_TEST(testTdf113287);
     CPPUNIT_TEST(testTdf113445);
+    CPPUNIT_TEST(testTdf113686);
     CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -5226,6 +5228,32 @@ void SwUiWriterTest::testTdf113445()
     CPPUNIT_ASSERT_EQUAL(nCell3Top, nCell4Top);
 }
 
+void SwUiWriterTest::testTdf113686()
+{
+    SwDoc* pDoc = createDoc("tdf113686.fodt");
+    xmlDocPtr pXmlDoc = parseLayoutDump();
+    assertXPath(pXmlDoc, "/root/page", 2);
+    sal_uInt32 nPage1LastNode = getXPath(pXmlDoc, "/root/page[1]/body/tab/row/cell[1]/tab/row/cell[1]/txt[last()]", "txtNodeIndex").toUInt32();
+    CPPUNIT_ASSERT_EQUAL(OUString("Table2:A1-P10"), pDoc->GetNodes()[nPage1LastNode]->GetTextNode()->GetText());
+    sal_uInt32 nPage2FirstNode = getXPath(pXmlDoc, "/root/page[2]/body/tab/row/cell[1]/section/txt[1]", "txtNodeIndex").toUInt32();
+    CPPUNIT_ASSERT_EQUAL(OUString("Table1:A1"), pDoc->GetNodes()[nPage2FirstNode]->GetTextNode()->GetText());
+
+    // Remove page 2.
+    SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+    while (pWrtShell->GetCursor()->Start()->nNode.GetIndex() < nPage1LastNode)
+        pWrtShell->Down(/*bSelect=*/false);
+    pWrtShell->EndPara();
+    for (int i = 0; i < 3; ++i)
+        pWrtShell->Up(/*bSelect=*/true);
+    pWrtShell->DelLeft();
+
+    // Assert that the second page is removed.
+    discardDumpedLayout();
+    pXmlDoc = parseLayoutDump();
+    // This was still 2, content from 2nd page was not moved.
+    assertXPath(pXmlDoc, "/root/page", 1);
+}
+
 void SwUiWriterTest::testTableInSectionInTable()
 {
     // The document has a table, containing a section, containing a nested
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index a6c256681a74..b44a353a6333 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -5294,9 +5294,16 @@ static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrame& rSourceLine )
             {
                 nTmpHeight = static_cast<const SwTabFrame*>(pTmp)->CalcHeightOfFirstContentLine();
             }
-            else if ( pTmp->IsTextFrame() )
+            else if (pTmp->IsTextFrame() || (pTmp->IsSctFrame() && pTmp->GetLower() && pTmp->GetLower()->IsTextFrame()))
             {
-                SwTextFrame* pTextFrame = const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pTmp));
+                // Section frames don't influence the size/position of text
+                // frames, so 'text frame' and 'text frame in section frame' is
+                // the same case.
+                SwTextFrame* pTextFrame = nullptr;
+                if (pTmp->IsTextFrame())
+                    pTextFrame = const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pTmp));
+                else
+                    pTextFrame = const_cast<SwTextFrame*>(static_cast<const SwTextFrame*>(pTmp->GetLower()));
                 pTextFrame->GetFormatted();
                 nTmpHeight = pTextFrame->FirstLineHeight();
             }
commit 526c1c493677ab93382a7b3e2dc652b01bad136d
Author:     Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Mon Oct 30 16:32:39 2017 +0100
Commit:     Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Mon Aug 13 15:45:04 2018 +0200

    tdf#113520 sw split sections in tables: avoid empty page after content del
    
    The problem was that since split sections are allowed in nested tables,
    deleting enough content so that the full content of a page is removed
    results in an empty page, having only a 0 height table.  I.e. the split
    section gets removed properly, the inner table (and its row and column)
    as well, but the outer table is still there, though it is marked to have
    0 height.
    
    This results in a situation that the previous page doesn't have free
    space (the in-table section tries to take as much space as it can), but
    on the other hand we try (and fail) to move the 0 height table on the
    current page to the previous one, as it doesn't have free space. At the
    end the "empty" page still has an invisible table frame, so it is not
    removed.
    
    Fix the problem by allowing the move of a 0 height follow table frame
    from the current page to the previous one, even it has no empty space.
    
    Reviewed-on: https://gerrit.libreoffice.org/44059
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit c9c956f2716c58e2573a9ac07073f712d736ed02)
    
    Conflicts:
            sw/source/core/layout/tabfrm.cxx
    
    Change-Id: I2a5fac88b8b7dc2b91d041b58a4ad1b328f56a6b

diff --git a/sw/qa/extras/uiwriter/data/tdf113520.fodt b/sw/qa/extras/uiwriter/data/tdf113520.fodt
new file mode 100644
index 000000000000..e82f98cb6e4f
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf113520.fodt
@@ -0,0 +1,292 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oas
 is:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:
 experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+  <office:meta>
+    <meta:generator>LibreOfficeDev/6.0.0.0.alpha1$Linux_X86_64 LibreOffice_project/10dd4c228fd4b01fea4b85bbe6d79536cefc9671</meta:generator>
+    <meta:creation-date>2014-11-10T09:45:40.73</meta:creation-date>
+    <dc:date>2017-10-26T12:28:06.120632908</dc:date>
+    <meta:editing-cycles>6</meta:editing-cycles>
+    <meta:editing-duration>PT2M38S</meta:editing-duration>
+    <dc:creator>Miklos Vajna</dc:creator>
+    <meta:document-statistic meta:character-count="9401" meta:image-count="1" meta:non-whitespace-character-count="8229" meta:object-count="0" meta:page-count="7" meta:paragraph-count="289" meta:table-count="28" meta:word-count="1397"/>
+  </office:meta>
+  <office:settings>
+    <config:config-item-set config:name="ooo:view-settings">
+      <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+      <config:config-item-map-indexed config:name="Views">
+        <config:config-item-map-entry>
+          <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+          <config:config-item config:name="ViewLayoutColumns" config:type="short">1</config:config-item>
+          <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
+          <config:config-item config:name="ZoomFactor" config:type="short">100</config:config-item>
+          <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
+          <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
+        </config:config-item-map-entry>
+      </config:config-item-map-indexed>
+    </config:config-item-set>
+    <config:config-item-set config:name="ooo:configuration-settings">
+      <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+      <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintFaxName" config:type="string"/>
+      <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="TabOverflow" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrinterName" config:type="string"/>
+      <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+      <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="Rsid" config:type="int">508478</config:config-item>
+      <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+      <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+      <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="CurrentDatabaseDataSource" config:type="string">writer-data-source-ooxml</config:config-item>
+      <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+      <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="RsidRoot" config:type="int">104774</config:config-item>
+      <config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+      <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+      <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+      <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+      <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+    </config:config-item-set>
+  </office:settings>
+  <office:scripts>
+    <office:script script:language="ooo:Basic">
+      <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
+    </office:script>
+  </office:scripts>
+  <office:font-face-decls>
+    <style:font-face style:name="Lucida Sans1" svg:font-family="'Lucida Sans'" style:font-family-generic="swiss"/>
+    <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
+    <style:font-face style:name="Liberation Sans" svg:font-family="'Liberation Sans'" style:font-family-generic="swiss" style:font-pitch="variable"/>
+    <style:font-face style:name="AR PL SungtiL GB" svg:font-family="'AR PL SungtiL GB'" style:font-family-generic="system" style:font-pitch="variable"/>
+    <style:font-face style:name="Arial Unicode MS" svg:font-family="'Arial Unicode MS'" style:font-family-generic="system" style:font-pitch="variable"/>
+    <style:font-face style:name="Lucida Sans" svg:font-family="'Lucida Sans'" style:font-family-generic="system" style:font-pitch="variable"/>
+    <style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-family-generic="system" style:font-pitch="variable"/>
+  </office:font-face-decls>
+  <office:styles>
+    <style:default-style style:family="graphic">
+      <style:graphic-properties svg:stroke-color="#000000" draw:fill-color="#99ccff" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="true"/>
+      <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false">
+        <style:tab-stops/>
+      </style:paragraph-properties>
+      <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Arial Unicode MS" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"/>
+    </style:default-style>
+    <style:default-style style:family="paragraph">
+      <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+      <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Arial Unicode MS" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+    </style:default-style>
+    <style:default-style style:family="table">
+      <style:table-properties table:border-model="collapsing"/>
+    </style:default-style>
+    <style:default-style style:family="table-row">
+      <style:table-row-properties fo:keep-together="always"/>
+    </style:default-style>
+    <style:style style:name="Standard" style:family="paragraph" style:class="text">
+      <style:text-properties fo:language="en" fo:country="GB"/>
+    </style:style>
+    <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
+      <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" fo:keep-with-next="always"/>
+      <style:text-properties style:font-name="Liberation Sans" fo:font-family="'Liberation Sans'" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="AR PL SungtiL GB" style:font-family-asian="'AR PL SungtiL GB'" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Lucida Sans" style:font-family-complex="'Lucida Sans'" style:font-family-generic-complex="system" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+    </style:style>
+    <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+      <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.247cm" loext:contextual-spacing="false" fo:line-height="120%"/>
+    </style:style>
+    <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+      <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Lucida Sans1" style:font-family-complex="'Lucida Sans'" style:font-family-generic-complex="swiss"/>
+    </style:style>
+    <style:style style:name="Caption" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+      <style:paragraph-properties fo:margin-top="0.212cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
+      <style:text-properties fo:font-size="12pt" fo:font-style="italic" style:font-size-asian="12pt" style:font-style-asian="italic" style:font-name-complex="Lucida Sans1" style:font-family-complex="'Lucida Sans'" style:font-family-generic-complex="swiss" style:font-size-complex="12pt" style:font-style-complex="italic"/>
+    </style:style>
+    <style:style style:name="Index" style:family="paragraph" style:parent-style-name="Standard" style:class="index">
+      <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+      <style:text-properties style:font-size-asian="12pt" style:font-name-complex="Lucida Sans1" style:font-family-complex="'Lucida Sans'" style:font-family-generic-complex="swiss"/>
+    </style:style>
+    <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+      <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+    </style:style>
+    <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+    <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+    <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+  </office:styles>
+  <office:automatic-styles>
+    <style:style style:name="Table1" style:family="table">
+      <style:table-properties style:width="16.662cm" fo:margin-left="0cm" fo:margin-right="0cm" table:align="margins"/>
+    </style:style>
+    <style:style style:name="Table1.A" style:family="table-column">
+      <style:table-column-properties style:column-width="16.662cm" style:rel-column-width="65535*"/>
+    </style:style>
+    <style:style style:name="Table1.1" style:family="table-row">
+      <style:table-row-properties fo:keep-together="auto"/>
+    </style:style>
+    <style:style style:name="Table1.A1" style:family="table-cell">
+      <style:table-cell-properties fo:padding="0cm" fo:border="none"/>
+    </style:style>
+    <style:style style:name="Table2" style:family="table">
+      <style:table-properties style:width="16.623cm" fo:margin-left="0cm" fo:margin-right="0.039cm" table:align="margins"/>
+    </style:style>
+    <style:style style:name="Table2.A" style:family="table-column">
+      <style:table-column-properties style:column-width="16.623cm" style:rel-column-width="65535*"/>
+    </style:style>
+    <style:style style:name="Table2.1" style:family="table-row">
+      <style:table-row-properties fo:keep-together="auto"/>
+    </style:style>
+    <style:style style:name="Table2.A1" style:family="table-cell">
+      <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+    </style:style>
+    <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="">
+      <style:paragraph-properties style:page-number="auto"/>
+    </style:style>
+    <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="PG_5f_Default">
+      <style:paragraph-properties style:page-number="auto"/>
+    </style:style>
+    <style:style style:name="Sect1" style:family="section">
+      <style:section-properties fo:background-color="transparent" style:editable="false">
+        <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+        <style:background-image/>
+      </style:section-properties>
+    </style:style>
+    <style:page-layout style:name="pm1">
+      <style:page-layout-properties fo:page-width="21.59cm" fo:page-height="27.94cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+        <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+      </style:page-layout-properties>
+      <style:header-style/>
+      <style:footer-style/>
+    </style:page-layout>
+    <style:page-layout style:name="pm2">
+      <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="7.001cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.4cm" fo:margin-bottom="0.499cm" fo:margin-left="2.54cm" fo:margin-right="1.799cm" fo:border="none" fo:padding="0cm" style:shadow="none" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="true" style:layout-grid-display="false" style:footnote-max-height="0cm">
+        <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+      </style:page-layout-properties>
+      <style:header-style/>
+      <style:footer-style/>
+    </style:page-layout>
+  </office:automatic-styles>
+  <office:master-styles>
+    <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+    <style:master-page style:name="PG_5f_Default" style:display-name="PG_Default" style:page-layout-name="pm2"/>
+  </office:master-styles>
+  <office:body>
+    <office:text text:use-soft-page-breaks="true">
+      <text:sequence-decls>
+        <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+        <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+        <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+        <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+      </text:sequence-decls>
+      <text:p text:style-name="P2"/>
+      <text:p text:style-name="Standard"/>
+      <table:table table:name="Table1" table:style-name="Table1">
+        <table:table-column table:style-name="Table1.A"/>
+        <table:table-row table:style-name="Table1.1">
+          <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+            <table:table table:name="Table2" table:style-name="Table2">
+              <table:table-column table:style-name="Table2.A"/>
+              <table:table-row table:style-name="Table2.1">
+                <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+                  <text:section text:style-name="Sect1" text:name="Section1">
+                    <text:p text:style-name="Standard">Section1:P01</text:p>
+                    <text:p text:style-name="Standard">Section1:P02</text:p>
+                    <text:p text:style-name="Standard">Section1:P03</text:p>
+                    <text:p text:style-name="Standard">Section1:P04</text:p>
+                    <text:p text:style-name="Standard">Section1:P05</text:p>
+                    <text:p text:style-name="Standard">Section1:P06</text:p>
+                    <text:p text:style-name="Standard">Section1:P07</text:p>
+                    <text:p text:style-name="Standard">Section1:P08</text:p>
+                    <text:p text:style-name="Standard">Section1:P09</text:p>
+                    <text:p text:style-name="Standard">Section1:P10</text:p>
+                    <text:p text:style-name="Standard">Section1:P11</text:p>
+                    <text:p text:style-name="Standard">Section1:P12</text:p>
+                    <text:p text:style-name="Standard">Section1:P13</text:p>
+                    <text:p text:style-name="Standard">Section1:P14</text:p>
+                    <text:p text:style-name="Standard">Section1:P15</text:p>
+                    <text:p text:style-name="Standard">Section1:P16</text:p>
+                    <text:p text:style-name="Standard">Section1:P17</text:p>
+                    <text:p text:style-name="Standard">Section1:P18</text:p>
+                    <text:p text:style-name="Standard">Section1:P19</text:p>
+                    <text:p text:style-name="Standard">Section1:P20</text:p>
+                    <text:p text:style-name="Standard">Section1:P21</text:p>
+                    <text:p text:style-name="Standard">Section1:P22</text:p>
+                    <text:p text:style-name="Standard">Section1:P23</text:p>
+                    <text:p text:style-name="Standard">Section1:P24</text:p>
+                    <text:p text:style-name="Standard">Section1:P25</text:p>
+                    <text:p text:style-name="Standard">Section1:P26</text:p>
+                    <text:p text:style-name="Standard">Section1:P27</text:p>
+                    <text:p text:style-name="Standard">Section1:P28</text:p>
+                    <text:p text:style-name="Standard">Section1:P29</text:p>
+                    <text:p text:style-name="Standard">Section1:P30</text:p>
+                    <text:p text:style-name="Standard">Section1:P31</text:p>
+                    <text:p text:style-name="Standard">Section1:P32</text:p>
+                  </text:section>
+                </table:table-cell>
+              </table:table-row>
+            </table:table>
+            <text:p text:style-name="Standard"/>
+          </table:table-cell>
+        </table:table-row>
+      </table:table>
+      <text:p text:style-name="Standard"/>
+    </office:text>
+  </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 8a1ea0391177..b0cfe249cb32 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -260,6 +260,7 @@ public:
     void testSectionInTableInTable();
     void testSectionInTableInTable2();
     void testSectionInTableInTable3();
+    void testSectionInTableInTable4();
     void testTdf112160();
     void testTdf112741();
     void testTdf112860();
@@ -415,6 +416,7 @@ public:
     CPPUNIT_TEST(testSectionInTableInTable);
     CPPUNIT_TEST(testSectionInTableInTable2);
     CPPUNIT_TEST(testSectionInTableInTable3);
+    CPPUNIT_TEST(testSectionInTableInTable4);
     CPPUNIT_TEST(testTdf112160);
     CPPUNIT_TEST(testLinesMoveBackwardsInSectionInTable);
     CPPUNIT_TEST(testTdf112741);
@@ -5287,6 +5289,41 @@ void SwUiWriterTest::testSectionInTableInTable3()
     CPPUNIT_ASSERT_EQUAL(nTable2, nTable3Precede);
 }
 
+void SwUiWriterTest::testSectionInTableInTable4()
+{
+    SwDoc* pDoc = createDoc("tdf113520.fodt");
+    xmlDocPtr pXmlDoc = parseLayoutDump();
+    assertXPath(pXmlDoc, "/root/page", 3);
+    sal_uInt32 nPage1LastNode = getXPath(pXmlDoc, "/root/page[1]/body/tab/row/cell[1]/tab/row/cell[1]/section/txt[last()]", "txtNodeIndex").toUInt32();
+    CPPUNIT_ASSERT_EQUAL(OUString("Section1:P10"), pDoc->GetNodes()[nPage1LastNode]->GetTextNode()->GetText());
+    sal_uInt32 nPage3FirstNode = getXPath(pXmlDoc, "/root/page[3]/body/tab/row/cell[1]/tab/row/cell[1]/section/txt[1]", "txtNodeIndex").toUInt32();
+    CPPUNIT_ASSERT_EQUAL(OUString("Section1:P23"), pDoc->GetNodes()[nPage3FirstNode]->GetTextNode()->GetText());
+
+    // Remove page 2.
+    SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+    while (pWrtShell->GetCursor()->Start()->nNode.GetIndex() < nPage1LastNode)
+        pWrtShell->Down(/*bSelect=*/false);
+    pWrtShell->EndPara();
+    while (pWrtShell->GetCursor()->End()->nNode.GetIndex() < nPage3FirstNode)
+        pWrtShell->Down(/*bSelect=*/true);
+    pWrtShell->EndPara(/*bSelect=*/true);
+    pWrtShell->DelLeft();
+
+    // Assert that the page is removed.
+    discardDumpedLayout();
+    pXmlDoc = parseLayoutDump();
+    // This was 3, page 2 was emptied, but it wasn't removed.
+    assertXPath(pXmlDoc, "/root/page", 2);
+
+    // Make sure the outer table frames are linked together properly.
+    sal_uInt32 nTable1 = getXPath(pXmlDoc, "//page[1]//body/tab", "id").toUInt32();
+    sal_uInt32 nTable1Follow = getXPath(pXmlDoc, "//page[1]//body/tab", "follow").toUInt32();
+    sal_uInt32 nTable2 = getXPath(pXmlDoc, "//page[2]//body/tab", "id").toUInt32();
+    sal_uInt32 nTable2Precede = getXPath(pXmlDoc, "//page[2]//body/tab", "precede").toUInt32();
+    CPPUNIT_ASSERT_EQUAL(nTable2, nTable1Follow);
+    CPPUNIT_ASSERT_EQUAL(nTable1, nTable2Precede);
+}
+
 void SwUiWriterTest::testTdf112160()
 {
     // Assert that the A2 cell is on page 1.
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 7312138b1816..a6c256681a74 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2085,7 +2085,13 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
                     SwTwips nDeadLine = aRectFnSet.GetPrtBottom(*pTmp);
                     if ( bBrowseMode )
                         nDeadLine += pTmp->Grow( LONG_MAX, true );
-                    if( aRectFnSet.BottomDist( Frame(), nDeadLine ) > 0 )
+                    bool bFits = aRectFnSet.BottomDist(Frame(), nDeadLine) > 0;
+                    if (!bFits && aRectFnSet.GetHeight(GetFollow()->Frame()) == 0)
+                        // The follow should move backwards, so allow the case
+                        // when the upper has no space, but the follow is
+                        // empty.
+                        bFits = aRectFnSet.BottomDist(Frame(), nDeadLine) >= 0;
+                    if (bFits)
                     {
                         // First, we remove an existing follow flow line.
                         if ( HasFollowFlowLine() )
@@ -3382,7 +3388,12 @@ bool SwTabFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool, bool &rReformat
             rReformat = true;
             return true;
         }
-        if (!m_bLockBackMove && nSpace > 0)
+        bool bFits = nSpace > 0;
+        if (!bFits && aRectFnSet.GetHeight(Frame()) == 0)
+            // This frame fits into pNewUpper in case it has no space, but this
+            // frame is empty.
+            bFits = nSpace >= 0;
+        if (!m_bLockBackMove && bFits)
         {
             // #i26945# - check, if follow flow line
             // contains frame, which are moved forward due to its object
commit 33429cb17c39c212316eac4111e63189e97791ea
Author:     Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Wed Oct 25 17:48:32 2017 +0200
Commit:     Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Mon Aug 13 15:38:33 2018 +0200

    tdf#113445 sw: avoid hitting loop control with a dozen of in-table sections
    
    The bugdoc has an (outer) table containing a single cell, which has an
    (inner) table with 12 cells, all content is inside sections, one section
    / cell.
    
    This relatively simple setup can already hit the loop control in
    lcl_RecalcRow(), as the SwLayNotify dtor always does invalidation in an
    async way, so the loop control's counter is incremented after each and
    every table cell.
    
    Instead of increasing the max tolerance in lcl_RecalcRow() (one can
    easily construct a document where the bug is still there even if the max
    is set to 100 instead of the current 10 iterations), just calculate the
    lower synchronously.
    
    Reviewed-on: https://gerrit.libreoffice.org/43848
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>
    
    Conflicts:
            sw/qa/extras/uiwriter/uiwriter.cxx
    
    (cherry picked from commit cb8b20ab3aa3f790d4979385874cdd4e2a87221b)
    
    Change-Id: Ifbffe13e5f2f237e1578bdd3e17d4d8b7c34806d
    (cherry picked from commit 1bf9f8693d61d9abe0dee19d1207b6fb1ca35639)

diff --git a/sw/qa/extras/uiwriter/data/tdf113445.fodt b/sw/qa/extras/uiwriter/data/tdf113445.fodt
new file mode 100644
index 000000000000..b6c3de4bd516
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf113445.fodt
@@ -0,0 +1,348 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:config="urn:oas
 is:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:
 experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+  <office:meta>
+    <meta:generator>LibreOfficeDev/6.0.0.0.alpha1$Linux_X86_64 LibreOffice_project/54a0f24d1650637efb4557c0f72a9978bc9acc96</meta:generator>
+    <meta:creation-date>2014-11-10T09:45:40.73</meta:creation-date>
+    <dc:date>2017-10-02T14:36:23</dc:date>
+    <meta:editing-cycles>4</meta:editing-cycles>
+    <meta:editing-duration>PT1.570S</meta:editing-duration>
+    <meta:document-statistic meta:character-count="15144" meta:image-count="1" meta:non-whitespace-character-count="12952" meta:object-count="0" meta:page-count="6" meta:paragraph-count="498" meta:table-count="28" meta:word-count="2586"/>
+  </office:meta>
+  <office:settings>
+    <config:config-item-set config:name="ooo:view-settings">
+      <config:config-item config:name="ViewAreaTop" config:type="long">0</config:config-item>
+      <config:config-item config:name="ViewAreaLeft" config:type="long">0</config:config-item>
+      <config:config-item config:name="ViewAreaWidth" config:type="long">45563</config:config-item>
+      <config:config-item config:name="ViewAreaHeight" config:type="long">12305</config:config-item>
+      <config:config-item config:name="ShowRedlineChanges" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="InBrowseMode" config:type="boolean">false</config:config-item>
+      <config:config-item-map-indexed config:name="Views">
+        <config:config-item-map-entry>
+          <config:config-item config:name="ViewId" config:type="string">view2</config:config-item>
+          <config:config-item config:name="ViewLeft" config:type="long">4069</config:config-item>
+          <config:config-item config:name="ViewTop" config:type="long">901</config:config-item>
+          <config:config-item config:name="VisibleLeft" config:type="long">0</config:config-item>
+          <config:config-item config:name="VisibleTop" config:type="long">0</config:config-item>
+          <config:config-item config:name="VisibleRight" config:type="long">45561</config:config-item>
+          <config:config-item config:name="VisibleBottom" config:type="long">12303</config:config-item>
+          <config:config-item config:name="ZoomType" config:type="short">0</config:config-item>
+          <config:config-item config:name="ViewLayoutColumns" config:type="short">0</config:config-item>
+          <config:config-item config:name="ViewLayoutBookMode" config:type="boolean">false</config:config-item>
+          <config:config-item config:name="ZoomFactor" config:type="short">100</config:config-item>
+          <config:config-item config:name="IsSelectedFrame" config:type="boolean">false</config:config-item>
+          <config:config-item config:name="AnchoredTextOverflowLegacy" config:type="boolean">false</config:config-item>
+        </config:config-item-map-entry>
+      </config:config-item-map-indexed>
+    </config:config-item-set>
+    <config:config-item-set config:name="ooo:configuration-settings">
+      <config:config-item config:name="PrintProspect" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintLeftPages" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintGraphics" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintPageBackground" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintControls" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintAnnotationMode" config:type="short">0</config:config-item>
+      <config:config-item config:name="PrintRightPages" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintFaxName" config:type="string"/>
+      <config:config-item config:name="PrintPaperFromSetup" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintTextPlaceholder" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="ApplyParagraphMarkFormatToNumbering" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintReversed" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="TabOverMargin" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="EmbedFonts" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="SurroundTextWrapSmall" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="BackgroundParaOverDrawings" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="ClippedPictures" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="FloattableNomargins" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UnbreakableNumberings" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="EmbedSystemFonts" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="TabOverflow" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintTables" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintSingleJobs" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="SmallCapsPercentage66" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="CollapseEmptyCellPara" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="TreatSingleColumnBreakAsPageBreak" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="MathBaselineAlignment" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="AddFrameOffsets" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="IsLabelDocument" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrinterName" config:type="string"/>
+      <config:config-item config:name="OutlineLevelYieldsNumbering" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="MsWordCompTrailingBlanks" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="IgnoreFirstLineIndentInNumbering" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UpdateFromTemplate" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintBlackFonts" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="TableRowKeep" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="EmbeddedDatabaseName" config:type="string"/>
+      <config:config-item config:name="IgnoreTabsAndBlanksForLineCalculation" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UseOldPrinterMetrics" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="InvertBorderSpacing" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="SaveGlobalDocumentLinks" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="TabsRelativeToIndent" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="Rsid" config:type="int">353015</config:config-item>
+      <config:config-item config:name="PrintProspectRTL" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintEmptyPages" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="ApplyUserData" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrintHiddenText" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="AddParaTableSpacingAtStart" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="FieldAutoUpdate" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="UseOldNumbering" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="AddParaTableSpacing" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="CharacterCompressionType" config:type="short">0</config:config-item>
+      <config:config-item config:name="SaveVersionOnClose" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="ChartAutoUpdate" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="PrinterIndependentLayout" config:type="string">high-resolution</config:config-item>
+      <config:config-item config:name="IsKernAsianPunctuation" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UseFormerObjectPositioning" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="AddVerticalFrameOffsets" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="SubtractFlysAnchoredAtFlys" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="AddParaSpacingToTableCells" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="AddExternalLeading" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="CurrentDatabaseDataSource" config:type="string">writer-data-source-ooxml</config:config-item>
+      <config:config-item config:name="AllowPrintJobCancel" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="ProtectForm" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UseFormerLineSpacing" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="PrintDrawings" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="UseFormerTextWrapping" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="UnxForceZeroExtLeading" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="TabAtLeftIndentForParagraphsInList" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="RedlineProtectionKey" config:type="base64Binary"/>
+      <config:config-item config:name="PropLineSpacingShrinksFirstLine" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="ConsiderTextWrapOnObjPos" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="RsidRoot" config:type="int">104774</config:config-item>
+      <config:config-item config:name="StylesNoDefault" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="LinkUpdateMode" config:type="short">1</config:config-item>
+      <config:config-item config:name="AlignTabStopPosition" config:type="boolean">true</config:config-item>
+      <config:config-item config:name="DoNotJustifyLinesWithManualBreak" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="DoNotResetParaAttrsForNumFont" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="CurrentDatabaseCommandType" config:type="int">0</config:config-item>
+      <config:config-item config:name="LoadReadonly" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="DoNotCaptureDrawObjsOnPage" config:type="boolean">false</config:config-item>
+      <config:config-item config:name="CurrentDatabaseCommand" config:type="string"/>
+      <config:config-item config:name="PrinterSetup" config:type="base64Binary"/>
+      <config:config-item config:name="ClipAsCharacterAnchoredWriterFlyFrames" config:type="boolean">false</config:config-item>
+    </config:config-item-set>
+  </office:settings>
+  <office:scripts>
+    <office:script script:language="ooo:Basic">
+      <ooo:libraries xmlns:ooo="http://openoffice.org/2004/office" xmlns:xlink="http://www.w3.org/1999/xlink"/>
+    </office:script>
+  </office:scripts>
+  <office:font-face-decls>
+    <style:font-face style:name="OpenSymbol" svg:font-family="OpenSymbol"/>
+    <style:font-face style:name="Tahoma1" svg:font-family="Tahoma"/>
+    <style:font-face style:name="Tahoma2" svg:font-family="Tahoma" style:font-family-generic="system"/>
+    <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
+    <style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+    <style:font-face style:name="Arial1" svg:font-family="Arial" style:font-adornments="Regular" style:font-family-generic="swiss" style:font-pitch="variable"/>
+    <style:font-face style:name="Arial Unicode MS" svg:font-family="'Arial Unicode MS'" style:font-family-generic="system" style:font-pitch="variable"/>
+    <style:font-face style:name="MS Mincho" svg:font-family="'MS Mincho'" style:font-family-generic="system" style:font-pitch="variable"/>
+    <style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-family-generic="system" style:font-pitch="variable"/>
+  </office:font-face-decls>
+  <office:styles>
+    <style:default-style style:family="graphic">
+      <style:graphic-properties svg:stroke-color="#000000" draw:fill-color="#99ccff" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="true"/>
+      <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false">
+        <style:tab-stops/>
+      </style:paragraph-properties>
+      <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Arial Unicode MS" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"/>
+    </style:default-style>
+    <style:default-style style:family="paragraph">
+      <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+      <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="en" fo:country="US" style:letter-kerning="true" style:font-name-asian="Arial Unicode MS" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+    </style:default-style>
+    <style:default-style style:family="table">
+      <style:table-properties table:border-model="collapsing"/>
+    </style:default-style>
+    <style:default-style style:family="table-row">
+      <style:table-row-properties fo:keep-together="always"/>
+    </style:default-style>
+    <style:style style:name="Standard" style:family="paragraph" style:class="text">
+      <style:text-properties fo:language="en" fo:country="GB"/>
+    </style:style>
+  </office:styles>
+  <office:automatic-styles>
+    <style:style style:name="Table1" style:family="table">
+      <style:table-properties style:width="16.662cm" table:align="margins"/>
+    </style:style>
+    <style:style style:name="Table1.A" style:family="table-column">
+      <style:table-column-properties style:column-width="16.662cm" style:rel-column-width="65535*"/>
+    </style:style>
+    <style:style style:name="Table1.1" style:family="table-row">
+      <style:table-row-properties fo:keep-together="auto"/>
+    </style:style>
+    <style:style style:name="Table1.A1" style:family="table-cell">
+      <style:table-cell-properties fo:padding="0cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+    </style:style>
+    <style:style style:name="Table2" style:family="table">
+      <style:table-properties style:width="16.623cm" fo:margin-left="0cm" fo:margin-right="0.039cm" table:align="margins"/>
+    </style:style>
+    <style:style style:name="Table2.A" style:family="table-column">
+      <style:table-column-properties style:column-width="7.664cm" style:rel-column-width="30218*"/>
+    </style:style>
+    <style:style style:name="Table2.B" style:family="table-column">
+      <style:table-column-properties style:column-width="3.669cm" style:rel-column-width="14461*"/>
+    </style:style>
+    <style:style style:name="Table2.C" style:family="table-column">
+      <style:table-column-properties style:column-width="2.096cm" style:rel-column-width="8260*"/>
+    </style:style>
+    <style:style style:name="Table2.D" style:family="table-column">
+      <style:table-column-properties style:column-width="3.194cm" style:rel-column-width="12596*"/>
+    </style:style>
+    <style:style style:name="Table2.1" style:family="table-row">
+      <style:table-row-properties fo:keep-together="auto"/>
+    </style:style>
+    <style:style style:name="Table2.A1" style:family="table-cell">
+      <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+    </style:style>
+    <style:style style:name="Table2.D1" style:family="table-cell">
+      <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.05pt solid #000000" fo:border-right="0.05pt solid #000000" fo:border-top="none" fo:border-bottom="0.05pt solid #000000"/>
+    </style:style>
+    <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="PG_5f_Default">
+      <style:paragraph-properties style:page-number="auto"/>
+    </style:style>
+    <style:style style:name="Sect1" style:family="section">
+      <style:section-properties fo:background-color="#f2f9fb" style:editable="false">
+        <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+        <style:background-image/>
+      </style:section-properties>
+    </style:style>
+    <style:page-layout style:name="pm3">
+      <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="7.001cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="0.4cm" fo:margin-bottom="0.499cm" fo:margin-left="2.54cm" fo:margin-right="1.799cm" fo:border="none" fo:padding="0cm" style:shadow="none" style:writing-mode="lr-tb" style:footnote-max-height="0cm">
+        <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+      </style:page-layout-properties>
+      <style:header-style/>
+      <style:footer-style/>
+    </style:page-layout>
+  </office:automatic-styles>
+  <office:master-styles>
+    <style:master-page style:name="PG_5f_Default" style:display-name="PG_Default" style:page-layout-name="pm3"/>
+  </office:master-styles>
+  <office:body>
+    <office:text text:use-soft-page-breaks="true">
+      <office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
+      <text:sequence-decls>
+        <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+        <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+        <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+        <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+      </text:sequence-decls>
+      <text:p text:style-name="P1"/>
+      <text:p text:style-name="Standard"/>
+      <text:p text:style-name="Standard"/>
+      <text:p text:style-name="Standard"/>
+      <text:p text:style-name="Standard"/>
+      <text:p text:style-name="Standard"/>
+      <text:p text:style-name="Standard"/>
+      <text:p text:style-name="Standard"/>
+      <text:p text:style-name="Standard"/>
+      <table:table table:name="Table1" table:style-name="Table1">
+        <table:table-column table:style-name="Table1.A"/>
+        <table:table-row table:style-name="Table1.1">
+          <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+            <table:table table:name="Table2" table:style-name="Table2">
+              <table:table-column table:style-name="Table2.A"/>
+              <table:table-column table:style-name="Table2.B"/>
+              <table:table-column table:style-name="Table2.C"/>
+              <table:table-column table:style-name="Table2.D"/>
+              <table:table-row table:style-name="Table2.1">
+                <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+                  <text:p text:style-name="Standard">Table2:A1</text:p>
+                </table:table-cell>
+                <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+                  <text:p text:style-name="Standard">Table2:B1</text:p>
+                </table:table-cell>
+                <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+                  <text:p text:style-name="Standard">Table2:C1</text:p>

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list