[Libreoffice-commits] core.git: Branch 'distro/escriba/escriba-5.2.1' - 2 commits - sw/qa sw/source

Miklos Vajna vmiklos at collabora.co.uk
Tue Oct 17 07:52:50 UTC 2017


 sw/qa/extras/uiwriter/data/tdf113153.fodt |  677 ++++++++++++++++++++++++++++++
 sw/qa/extras/uiwriter/uiwriter.cxx        |   34 +
 sw/source/core/layout/sectfrm.cxx         |    6 
 sw/source/core/layout/tabfrm.cxx          |   40 -
 4 files changed, 717 insertions(+), 40 deletions(-)

New commits:
commit ceee3b41103d9ce6ef43c4762fc0fa78ab3ef303
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Oct 16 18:03:15 2017 +0200

    tdf#113153 sw: fix layout loop with split in-table sections
    
    The problem was in SwFrame::GetNextSctLeaf(): it called WrongPageDesc()
    to find out if pLayLeaf is a container that is on an acceptable page,
    but it was too aggressive, and discarded a split table cell that was in
    a follow table (so later it'll be moved to a next page), but on the same
    page.
    
    The result was that a new page was created, but later in
    ::doInsertPage() we noticed this unnecessary page and removed it. The
    effect of that was that the in-progress layout action's m_bIsAgain flag
    was set to true, restart the layout again and again.
    
    Given that in-table split sections never need to create a new page frame
    for the follow section (the cell does this for us already), just don't
    discard pLayLeaf when WrongPageDesc() finds it and we're in the split
    section-in-table case.
    
    Change-Id: Iea98a26c14fc1fb3154378eab24daa2fd6e84459
    Reviewed-on: https://gerrit.libreoffice.org/43429
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>
    (cherry picked from commit a69f48d923628facf7113ebc739a8273c4069122)

diff --git a/sw/qa/extras/uiwriter/data/tdf113153.fodt b/sw/qa/extras/uiwriter/data/tdf113153.fodt
new file mode 100644
index 000000000000..5661f4ca0a3f
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf113153.fodt
@@ -0,0 +1,677 @@
+<?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:document-statistic meta:table-count="3" meta:image-count="0" meta:object-count="0" meta:page-count="3" meta:paragraph-count="46" meta:word-count="49" meta:character-count="68" meta:non-whitespace-character-count="65"/><meta:generator>LibreOfficeDev/5.2.5.1$Linux_X86_64 LibreOffice_project/1d78847be47e76f7fda105d8b497db1c9f60e3a7</meta:generator></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">70758</config:config-item>
+   <config:config-item config:name="ViewAreaHeight" config:type="long">32583</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">5916</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">70757</config:config-item>
+     <config:config-item config:name="VisibleBottom" config:type="long">32581</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">70</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">374081</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"/>
+   <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="OpenSymbol" svg:font-family="OpenSymbol"/>
+  <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"/>
+ </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:writing-mode="lr-tb" 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="Liberation Sans 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="Liberation Sans 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="MS Mincho" style:font-family-asian="'MS Mincho'" style:font-family-generic-asian="system" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Tahoma2" style:font-family-complex="Tahoma" style:font-family-generic-complex="system" 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:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+   <style:text-properties style:font-name-complex="Tahoma1" style:font-family-complex="Tahoma"/>
+  </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="Tahoma1" style:font-family-complex="Tahoma" 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-name-complex="Tahoma1" style:font-family-complex="Tahoma"/>
+  </style:style>
+  <style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+   <style:paragraph-properties text:number-lines="false" text:line-number="0">
+    <style:tab-stops>
+     <style:tab-stop style:position="8.5cm" style:type="center"/>
+     <style:tab-stop style:position="17cm" style:type="right"/>
+    </style:tab-stops>
+   </style:paragraph-properties>
+  </style:style>
+  <style:style style:name="P_5f_Clause_20_Header" style:display-name="P_Clause Header" style:family="paragraph" style:parent-style-name="P_5f_Heading" style:master-page-name="">
+   <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" fo:text-align="start" style:justify-single-word="false" style:page-number="auto"/>
+   <style:text-properties fo:color="#077b99"/>
+  </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>
+  <style:style style:name="Illustration" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/>
+  <style:style style:name="P_5f_Heading" style:display-name="P_Heading" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+   <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.21cm" fo:margin-bottom="0.21cm" loext:contextual-spacing="false" fo:line-height="100%" fo:text-align="center" style:justify-single-word="false" fo:text-indent="0cm" style:auto-text-indent="false"/>
+   <style:text-properties fo:color="#077b99" fo:font-size="14pt" fo:font-weight="bold"/>
+  </style:style>
+  <style:style style:name="P_5f_Default_5f_6pt_20_Arabic" style:display-name="P_Default_6pt Arabic" style:family="paragraph" style:parent-style-name="P_5f_Default_5f_6pt_20_centered" style:master-page-name="">
+   <style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:page-number="auto" style:shadow="none" style:writing-mode="rl-tb"/>
+   <style:text-properties style:font-size-asian="6pt" style:font-name-complex="Liberation Sans1" style:font-family-complex="Liberation Sans" style:font-style-name-complex="Regular" style:font-family-generic-complex="swiss" style:font-pitch-complex="variable" style:font-size-complex="6pt" style:language-complex="ar" style:country-complex="AE"/>
+  </style:style>
+  <style:style style:name="Frame_20_contents" style:display-name="Frame contents" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="extra"/>
+  <style:style style:name="_5f_P_5f_Default_5f_10pt" style:display-name="_P_Default_10pt" style:family="paragraph" style:parent-style-name="Standard">
+   <style:paragraph-properties fo:line-height="0.559cm" fo:text-align="justify" style:justify-single-word="false"/>
+   <style:text-properties style:font-name="Liberation Sans1" fo:font-family="Liberation Sans" style:font-style-name="Regular" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="10pt"/>
+  </style:style>
+  <style:style style:name="P_5f_Default_5f_10pt_5f_left" style:display-name="P_Default_10pt_left" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+   <style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
+  </style:style>
+  <style:style style:name="P_5f_Terms_20_and_20_Conditions_20_Heading_20__28_center_29_" style:display-name="P_Terms and Conditions Heading (center)" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt" style:master-page-name="">
+   <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" fo:text-align="center" style:justify-single-word="false" style:page-number="auto"/>
+  </style:style>
+  <style:style style:name="Table" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/>
+  <style:style style:name="Text" style:family="paragraph" style:parent-style-name="Caption" style:class="extra"/>
+  <style:style style:name="Table_20_Heading" style:display-name="Table Heading" style:family="paragraph" style:parent-style-name="Table_20_Contents" style:class="extra">
+   <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+  </style:style>
+  <style:style style:name="P_5f_Default_5f_6pt" style:display-name="P_Default_6pt" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+   <style:text-properties fo:font-size="6pt"/>
+  </style:style>
+  <style:style style:name="P_5f_Default_5f_8pt" style:display-name="P_Default_8pt" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+   <style:paragraph-properties fo:line-height="0.42cm"/>
+   <style:text-properties fo:font-size="8pt"/>
+  </style:style>
+  <style:style style:name="Sender" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+   <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.106cm" loext:contextual-spacing="false" text:number-lines="false" text:line-number="0"/>
+  </style:style>
+  <style:style style:name="P_5f_Terms_20_and_20_Conditions" style:display-name="P_Terms and Conditions" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt"/>
+  <style:style style:name="Header" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+   <style:paragraph-properties text:number-lines="false" text:line-number="0">
+    <style:tab-stops>
+     <style:tab-stop style:position="8.498cm" style:type="center"/>
+     <style:tab-stop style:position="16.999cm" style:type="right"/>
+    </style:tab-stops>
+   </style:paragraph-properties>
+  </style:style>
+  <style:style style:name="P_5f_Document_20_Header_20__28_left_29_" style:display-name="P_Document Header (left)" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+   <style:text-properties fo:font-variant="normal" fo:text-transform="none" fo:color="#000000" fo:font-size="8pt"/>
+  </style:style>
+  <style:style style:name="P_5f_Subheading" style:display-name="P_Subheading" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt">
+   <loext:graphic-properties draw:fill="none" draw:fill-color="#99ccff"/>
+   <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:text-indent="0cm" style:auto-text-indent="false" fo:background-color="transparent">
+    <style:tab-stops/>
+   </style:paragraph-properties>
+  </style:style>
+  <style:style style:name="P_5f_Default_5f_6pt_20_centered" style:display-name="P_Default_6pt centered" style:family="paragraph" style:parent-style-name="P_5f_Default_5f_6pt">
+   <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
+  </style:style>
+  <style:style style:name="P_5f_Document_20_Header_20__28_right_29_" style:display-name="P_Document Header (right)" style:family="paragraph" style:parent-style-name="P_5f_Document_20_Header_20__28_left_29_">
+   <style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
+  </style:style>
+  <style:style style:name="Endnote_20_Symbol" style:display-name="Endnote Symbol" style:family="text"/>
+  <style:style style:name="Bullet_20_Symbols" style:display-name="Bullet Symbols" style:family="text">
+   <style:text-properties style:font-name="OpenSymbol" fo:font-family="OpenSymbol" style:font-name-asian="OpenSymbol" style:font-family-asian="OpenSymbol" style:font-name-complex="OpenSymbol" style:font-family-complex="OpenSymbol"/>
+  </style:style>
+  <style:style style:name="C_5f_Underlined" style:display-name="C_Underlined" style:family="text">
+   <style:text-properties style:text-underline-style="solid" style:text-underline-width="auto" style:text-underline-color="font-color" fo:font-weight="bold"/>
+  </style:style>
+  <style:style style:name="C_5f_White" style:display-name="C_White" style:family="text">
+   <style:text-properties fo:color="#ffffff"/>
+  </style:style>
+  <style:style style:name="Numbering_20_Symbols" style:display-name="Numbering Symbols" style:family="text"/>
+  <style:style style:name="Footnote_20_Symbol" style:display-name="Footnote Symbol" style:family="text"/>
+  <style:style style:name="C_5f_TODO" style:display-name="C_TODO" style:family="text">
+   <style:text-properties fo:color="#ff0000"/>
+  </style:style>
+  <style:style style:name="C_5f_Bold" style:display-name="C_Bold" style:family="text">
+   <style:text-properties fo:font-weight="bold"/>
+  </style:style>
+  <style:style style:name="C_5f_Capitals" style:display-name="C_Capitals" style:family="text">
+   <style:text-properties fo:text-transform="uppercase"/>
+  </style:style>
+  <style:style style:name="Graphics" style:family="graphic">
+   <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="none" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
+  </style:style>
+  <text:outline-style style:name="Outline">
+   <text:outline-level-style text:level="1" style:num-format="">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="0.762cm" fo:text-indent="-0.762cm" fo:margin-left="0.762cm"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="2" style:num-format="">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.016cm" fo:text-indent="-1.016cm" fo:margin-left="1.016cm"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="3" style:num-format="">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.27cm" fo:text-indent="-1.27cm" fo:margin-left="1.27cm"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="4" style:num-format="">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.524cm" fo:text-indent="-1.524cm" fo:margin-left="1.524cm"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="5" style:num-format="">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.778cm" fo:text-indent="-1.778cm" fo:margin-left="1.778cm"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="6" style:num-format="">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.032cm" fo:text-indent="-2.032cm" fo:margin-left="2.032cm"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="7" style:num-format="">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.286cm" fo:text-indent="-2.286cm" fo:margin-left="2.286cm"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="8" style:num-format="">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.54cm" fo:text-indent="-2.54cm" fo:margin-left="2.54cm"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="9" style:num-format="">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.794cm" fo:text-indent="-2.794cm" fo:margin-left="2.794cm"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="10" style:num-format="">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="3.048cm" fo:text-indent="-3.048cm" fo:margin-left="3.048cm"/>
+    </style:list-level-properties>
+   </text:outline-level-style>
+  </text:outline-style>
+  <text:list-style style:name="L_5f_Numbering" style:display-name="L_Numbering">
+   <text:list-level-style-number text:level="1" style:num-format="">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-format="1">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" style:num-format="1" text:display-levels="2">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="4" text:style-name="Numbering_20_Symbols" style:num-prefix="(" style:num-suffix=")" style:num-format="a">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.499cm" fo:text-indent="-1cm" fo:margin-left="2.499cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.499cm" fo:text-indent="-1cm" fo:margin-left="3.5cm"/>
+    </style:list-level-properties>
+    <style:text-properties style:font-name="Tahoma"/>
+   </text:list-level-style-bullet>
+   <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-bullet>
+   <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-bullet>
+   <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-bullet>
+   <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-bullet>
+   <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-bullet>
+  </text:list-style>
+  <text:list-style style:name="L_5f_Numbering_20_for_20_dual_20_language" style:display-name="L_Numbering for dual language">
+   <text:list-level-style-number text:level="1" style:num-format="">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-format="1">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" style:num-format="1" text:display-levels="2">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.499cm" fo:text-indent="-1.499cm" fo:margin-left="1.499cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-number text:level="4" text:style-name="Numbering_20_Symbols" style:num-prefix="(" style:num-suffix=")" style:num-format="a">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="1.499cm" fo:text-indent="-1cm" fo:margin-left="2.499cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-number>
+   <text:list-level-style-bullet text:level="5" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="2.499cm" fo:text-indent="-1cm" fo:margin-left="3.5cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-bullet>
+   <text:list-level-style-bullet text:level="6" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="4.445cm" fo:text-indent="-0.635cm" fo:margin-left="4.445cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-bullet>
+   <text:list-level-style-bullet text:level="7" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.08cm" fo:text-indent="-0.635cm" fo:margin-left="5.08cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-bullet>
+   <text:list-level-style-bullet text:level="8" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="5.715cm" fo:text-indent="-0.635cm" fo:margin-left="5.715cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-bullet>
+   <text:list-level-style-bullet text:level="9" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.35cm" fo:text-indent="-0.635cm" fo:margin-left="6.35cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-bullet>
+   <text:list-level-style-bullet text:level="10" text:style-name="Bullet_20_Symbols" text:bullet-char="•">
+    <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+     <style:list-level-label-alignment text:label-followed-by="listtab" text:list-tab-stop-position="6.985cm" fo:text-indent="-0.635cm" fo:margin-left="6.985cm"/>
+    </style:list-level-properties>
+   </text:list-level-style-bullet>
+  </text:list-style>
+  <text:notes-configuration text:note-class="footnote" text:citation-style-name="Footnote_20_Symbol" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="page"/>
+  <text:notes-configuration text:note-class="endnote" text:citation-style-name="Endnote_20_Symbol" text:master-page-name="Endnote" style:num-format="1" 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="Table29" style:family="table">
+   <style:table-properties style:width="16.674cm" fo:margin-left="0cm" fo:margin-right="-0.012cm" table:align="margins"/>
+  </style:style>
+  <style:style style:name="Table29.A" style:family="table-column">
+   <style:table-column-properties style:column-width="7.597cm" style:rel-column-width="29862*"/>
+  </style:style>
+  <style:style style:name="Table29.B" style:family="table-column">
+   <style:table-column-properties style:column-width="9.077cm" style:rel-column-width="35673*"/>
+  </style:style>
+  <style:style style:name="Table29.A1" style:family="table-cell">
+   <style:table-cell-properties fo:padding="0.097cm" fo:border="none"/>
+  </style:style>
+  <style:style style:name="Table29" style:family="table">
+   <style:table-properties style:width="16.674cm" fo:margin-left="0cm" fo:margin-right="-0.012cm" table:align="margins"/>
+  </style:style>
+  <style:style style:name="Table29.A" style:family="table-column">
+   <style:table-column-properties style:column-width="7.597cm" style:rel-column-width="29862*"/>
+  </style:style>
+  <style:style style:name="Table29.B" style:family="table-column">
+   <style:table-column-properties style:column-width="9.077cm" style:rel-column-width="35673*"/>
+  </style:style>
+  <style:style style:name="Table29.A1" style:family="table-cell">
+   <style:table-cell-properties fo:padding="0.097cm" fo:border="none"/>
+  </style:style>
+  <style:style style:name="Table16" style:family="table">
+   <style:table-properties style:width="16.662cm" table:align="margins"/>
+  </style:style>
+  <style:style style:name="Table16.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="Table16.1" style:family="table-row">
+   <style:table-row-properties fo:keep-together="always"/>
+  </style:style>
+  <style:style style:name="Table16.A1" style:family="table-cell">
+   <style:table-cell-properties fo:background-color="#0899cc" fo:padding="0.097cm" fo:border-left="1pt solid #000000" fo:border-right="1pt solid #000000" fo:border-top="1pt solid #000000" fo:border-bottom="none">
+    <style:background-image/>
+   </style:table-cell-properties>
+  </style:style>
+  <style:style style:name="Table16.A2" style:family="table-cell">
+   <style:table-cell-properties fo:padding="0cm" fo:border="none"/>
+  </style:style>
+  <style:style style:name="Table20" 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="Table20.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="Table20.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="Table20.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="Table20.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="Table20.1" style:family="table-row">
+   <style:table-row-properties fo:keep-together="auto"/>
+  </style:style>
+  <style:style style:name="Table20.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="Table20.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="Table20.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="Table20.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="P_5f_Default_5f_6pt_20_centered">
+   <style:text-properties fo:language="en" fo:country="GB"/>
+  </style:style>
+  <style:style style:name="P2" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt" style:master-page-name="">
+   <style:paragraph-properties style:page-number="auto"/>
+  </style:style>
+  <style:style style:name="P3" style:family="paragraph" style:parent-style-name="_5f_P_5f_Default_5f_10pt" 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:style style:name="Sect2" 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: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: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="15.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: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:header-footer-properties fo:min-height="0.998cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.499cm" style:dynamic-spacing="false"/>
+   </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="Endnote" style:page-layout-name="pm2"/>
+  <style:master-page style:name="PG_5f_Default" style:display-name="PG_Default" style:page-layout-name="pm3">
+   <style:footer>
+    <table:table table:name="Table29" table:style-name="Table29">
+     <table:table-column table:style-name="Table29.A"/>
+     <table:table-column table:style-name="Table29.B"/>
+     <table:table-row>
+      <table:table-cell table:style-name="Table29.A1" office:value-type="string">
+       <text:p text:style-name="Standard"/>
+      </table:table-cell>
+      <table:table-cell table:style-name="Table29.A1" office:value-type="string">
+       <text:p text:style-name="Standard"/>
+      </table:table-cell>
+     </table:table-row>
+    </table:table>
+    <text:p text:style-name="Footer"/>
+   </style:footer>
+  </style:master-page>
+ </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="P3"/>
+   <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+   <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+   <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+   <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+   <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+   <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+   <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+   <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+   <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+   <text:p text:style-name="_5f_P_5f_Default_5f_10pt"/>
+   <table:table table:name="Table16" table:style-name="Table16">
+    <table:table-column table:style-name="Table16.A"/>
+    <table:table-row table:style-name="Table16.1">
+     <table:table-cell table:style-name="Table16.A1" office:value-type="string">
+      <text:p text:style-name="Standard">row before nested table</text:p>
+     </table:table-cell>
+    </table:table-row>
+    <text:soft-page-break/>
+    <table:table-row table:style-name="Table16.1">
+     <table:table-cell table:style-name="Table16.A2" office:value-type="string">
+      <table:table table:name="Table20" table:style-name="Table20">
+       <table:table-column table:style-name="Table20.A"/>
+       <table:table-column table:style-name="Table20.B"/>
+       <table:table-column table:style-name="Table20.C"/>
+       <table:table-column table:style-name="Table20.D"/>
+       <table:table-row table:style-name="Table20.1">
+        <table:table-cell table:style-name="Table20.A1" office:value-type="string">
+         <text:p text:style-name="Standard">T20:A1-01</text:p>
+         <text:p text:style-name="Standard">T20:A1-02</text:p>
+         <text:p text:style-name="Standard">T20:A1-03</text:p>
+         <text:p text:style-name="Standard">T20:A1-04</text:p>
+         <text:p text:style-name="Standard">T20:A1-05</text:p>
+         <text:p text:style-name="Standard">T20:A1-06</text:p>
+         <text:p text:style-name="Standard">T20:A1-07</text:p>
+         <text:p text:style-name="Standard">T20:A1-08</text:p>
+         <text:p text:style-name="Standard">T20:A1-09</text:p>
+         <text:p text:style-name="Standard">T20:A1-10</text:p>
+         <text:p text:style-name="Standard">T20:A1-11</text:p>
+        </table:table-cell>
+        <table:table-cell table:style-name="Table20.A1" office:value-type="string">
+         <text:p text:style-name="Standard">T20:B1</text:p>
+        </table:table-cell>
+        <table:table-cell table:style-name="Table20.A1" office:value-type="string">
+         <text:p text:style-name="Standard">T20:C1</text:p>
+        </table:table-cell>
+        <table:table-cell table:style-name="Table20.D1" office:value-type="string">
+         <text:p text:style-name="Standard">T20:D1</text:p>
+        </table:table-cell>
+       </table:table-row>
+       <table:table-row table:style-name="Table20.1">
+        <table:table-cell table:style-name="Table20.A2" office:value-type="string">
+         <text:section text:style-name="Sect1" text:name="Section1">
+          <text:p text:style-name="Standard">T20:A2-01</text:p>
+          <text:p text:style-name="Standard">T20:A2-02</text:p>
+          <text:p text:style-name="Standard">T20:A2-03</text:p>
+          <text:p text:style-name="Standard">T20:A2-04</text:p>
+          <text:p text:style-name="Standard">T20:A2-05</text:p>
+          <text:p text:style-name="Standard">T20:A2-06</text:p>
+          <text:p text:style-name="Standard">T20:A2-07</text:p>
+          <text:p text:style-name="Standard">T20:A2-08</text:p>
+          <text:p text:style-name="Standard">T20:A2-09</text:p>
+          <text:p text:style-name="Standard">T20:A2-10</text:p>
+          <text:p text:style-name="Standard">T20:A2-11</text:p>
+          <text:p text:style-name="Standard">T20:A2-12</text:p>
+          <text:p text:style-name="Standard">T20:A2-13</text:p>
+          <text:p text:style-name="Standard">T20:A2-14</text:p>
+          <text:p text:style-name="Standard">T20:A2-15</text:p>
+          <text:p text:style-name="Standard">T20:A2-16</text:p>
+          <text:p text:style-name="Standard">T20:A2-17</text:p>
+          <text:p text:style-name="Standard">T20:A2-18</text:p>
+          <text:p text:style-name="Standard">T20:A2-19</text:p>
+          <text:p text:style-name="Standard">T20:A2-20</text:p>
+          <text:p text:style-name="Standard">T20:A2-21</text:p>
+          <text:p text:style-name="Standard">T20:A2-22</text:p>
+          <text:p text:style-name="Standard">T20:A2-23</text:p>
+          <text:p text:style-name="Standard">T20:A2-24</text:p>
+          <text:p text:style-name="Standard">T20:A2-25</text:p>
+          <text:p text:style-name="Standard">T20:A2-26</text:p>
+          <text:p text:style-name="Standard">T20:A2-27</text:p>
+          <text:p text:style-name="Standard">T20:A2-28</text:p>
+         </text:section>
+        </table:table-cell>
+        <table:table-cell table:style-name="Table20.A2" office:value-type="string">
+         <text:section text:style-name="Sect2" text:name="Section2">
+          <text:p text:style-name="Standard">T20:B2</text:p>
+         </text:section>
+        </table:table-cell>
+        <table:table-cell table:style-name="Table20.A2" office:value-type="string">
+         <text:section text:style-name="Sect2" text:name="Section3">
+          <text:p text:style-name="Standard">T20:C2</text:p>
+         </text:section>
+        </table:table-cell>
+        <table:table-cell table:style-name="Table20.D2" office:value-type="string">
+         <text:section text:style-name="Sect1" text:name="Section4">
+          <text:p text:style-name="P1">T20:D2</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"><text:soft-page-break/></text:p>
+  </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index f6f7bbc980e1..deb4b6c33b6d 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -206,6 +206,7 @@ public:
     void testTableInSectionInTable();
     void testSectionInTableInTable();
     void testSectionInTableInTable2();
+    void testSectionInTableInTable3();
     void testTdf112160();
     void testTdf112741();
     void testTdf112860();
@@ -321,6 +322,7 @@ public:
     CPPUNIT_TEST(testTableInSectionInTable);
     CPPUNIT_TEST(testSectionInTableInTable);
     CPPUNIT_TEST(testSectionInTableInTable2);
+    CPPUNIT_TEST(testSectionInTableInTable3);
     CPPUNIT_TEST(testTdf112160);
     CPPUNIT_TEST(testLinesMoveBackwardsInSectionInTable);
     CPPUNIT_TEST(testTdf112741);
@@ -3884,6 +3886,38 @@ void SwUiWriterTest::testSectionInTableInTable2()
     CPPUNIT_ASSERT_EQUAL(nSection1, nSection2Precede);
 }
 
+void SwUiWriterTest::testSectionInTableInTable3()
+{
+    createDoc("tdf113153.fodt");
+
+    uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+    uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+    uno::Reference<container::XNamed> xTable(xTables->getByIndex(1), uno::UNO_QUERY);
+    CPPUNIT_ASSERT_EQUAL(OUString("Table16"), xTable->getName());
+
+    uno::Reference<text::XTextTable> xRowSupplier(xTable, uno::UNO_QUERY);
+    uno::Reference<table::XTableRows> xRows = xRowSupplier->getRows();
+    uno::Reference<beans::XPropertySet> xRow(xRows->getByIndex(1), uno::UNO_QUERY);
+    xRow->setPropertyValue("IsSplitAllowed", uno::makeAny(true));
+    // This never returned.
+    calcLayout();
+
+    xmlDocPtr pXmlDoc = parseLayoutDump();
+    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();
+    sal_uInt32 nTable2Follow = getXPath(pXmlDoc, "//page[2]//body/tab", "follow").toUInt32();
+    sal_uInt32 nTable3 = getXPath(pXmlDoc, "//page[3]//body/tab", "id").toUInt32();
+    sal_uInt32 nTable3Precede = getXPath(pXmlDoc, "//page[3]//body/tab", "precede").toUInt32();
+
+    // Make sure the outer table frames are linked together properly.
+    CPPUNIT_ASSERT_EQUAL(nTable2, nTable1Follow);
+    CPPUNIT_ASSERT_EQUAL(nTable1, nTable2Precede);
+    CPPUNIT_ASSERT_EQUAL(nTable3, nTable2Follow);
+    CPPUNIT_ASSERT_EQUAL(nTable2, nTable3Precede);
+}
+
 void SwUiWriterTest::testTdf112160()
 {
     // Assert that the A2 cell is on page 1.
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 313e289a0e9b..ade4cca59962 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -1591,7 +1591,11 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage )
                 pLayLeaf = pLayLeaf->GetNextLayoutLeaf();
                 continue;
             }
-            if( WrongPageDesc( pNxtPg ) )
+            // Page desc is never wrong in case of sections-in-tables: in that
+            // case pLayLeaf points to our section's cell's follow, which is
+            // fine to be on the same page. New page creation is handled when
+            // creating / moving the cell frame.
+            if( WrongPageDesc( pNxtPg ) && !bLayLeafTableAllowed )
             {
                 if( bWrongPage )
                     break; // there's a column between me and my right page
commit bd2458fe5ed936a76ee2b56584496d338d18a82b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Oct 17 09:40:49 2017 +0200

    Revert "sw: work around layout loop with split sections inside nested tables"
    
    This reverts commit a3884863aba7807e7b473a0acb3f7aa4e4ae9a37. It was a
    workaround, root cause fix is coming.

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 0a336f9cbe76..0c6db983d50d 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -4319,43 +4319,6 @@ SwTwips SwRowFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
     return nReal;
 }
 
-static bool lcl_ContainsNestedTableContainingSection(SwRowFrame* pRow)
-{
-    SwFrame* pLower = pRow->Lower();
-    if (!pLower)
-        return false;
-    if (!pLower->IsCellFrame())
-        return false;
-    SwCellFrame* pOuterCell = static_cast<SwCellFrame*>(pLower);
-
-    pLower = pOuterCell->Lower();
-    if (!pLower)
-        return false;
-    if (!pLower->IsTabFrame())
-        return false;
-    SwTabFrame* pInnerTab = static_cast<SwTabFrame*>(pLower);
-
-    pLower = pInnerTab->Lower();
-    if (!pLower)
-        return false;
-    if (!pLower->IsRowFrame())
-        return false;
-    SwRowFrame* pInnerRow = static_cast<SwRowFrame*>(pLower);
-
-    pLower = pInnerRow->Lower();
-    if (!pLower)
-        return false;
-    if (!pLower->IsCellFrame())
-        return false;
-    SwCellFrame* pInnerCell = static_cast<SwCellFrame*>(pLower);
-
-    pLower = pInnerCell->Lower();
-    if (!pLower)
-        return false;
-
-    return pLower->IsSctFrame();
-}
-
 SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
 {
     SWRECTFN( this )
@@ -4444,8 +4407,7 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
                  && !pTab->IsInRecalcLowerRow() )
             {
                 SwTabFrame* pMasterTab = pTab->FindMaster();
-                if (!lcl_ContainsNestedTableContainingSection(this))
-                    pMasterTab->InvalidatePos();
+                pMasterTab->InvalidatePos();
             }
         }
         AdjustCells( (Prt().*fnRect->fnGetHeight)() - nReal, true );


More information about the Libreoffice-commits mailing list