summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/CppunitTest_sw_uiwriter.mk30
-rw-r--r--sw/qa/extras/inc/swmodeltestbase.hxx40
-rw-r--r--sw/qa/extras/uiwriter/data/cp1000115.fodt208
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx13
-rw-r--r--sw/source/core/text/frmform.cxx8
5 files changed, 270 insertions, 29 deletions
diff --git a/sw/CppunitTest_sw_uiwriter.mk b/sw/CppunitTest_sw_uiwriter.mk
index 7d9bee81132a..3e572719f2b1 100644
--- a/sw/CppunitTest_sw_uiwriter.mk
+++ b/sw/CppunitTest_sw_uiwriter.mk
@@ -52,35 +52,7 @@ $(eval $(call gb_CppunitTest_use_api,sw_uiwriter,\
$(eval $(call gb_CppunitTest_use_ure,sw_uiwriter))
-$(eval $(call gb_CppunitTest_use_components,sw_uiwriter,\
- basic/util/sb \
- comphelper/util/comphelp \
- configmgr/source/configmgr \
- embeddedobj/util/embobj \
- filter/source/config/cache/filterconfig1 \
- framework/util/fwk \
- i18npool/util/i18npool \
- linguistic/source/lng \
- package/util/package2 \
- package/source/xstor/xstor \
- sw/util/sw \
- sw/util/swd \
- sax/source/expatwrap/expwrap \
- sfx2/util/sfx \
- svl/source/fsstor/fsstorage \
- svtools/util/svt \
- toolkit/util/tk \
- ucb/source/core/ucb1 \
- ucb/source/ucp/file/ucpfile1 \
- unotools/util/utl \
- unoxml/source/service/unoxml \
- uui/util/uui \
- $(if $(filter-out MACOSX WNT,$(OS)), \
- vcl/vcl.unx \
- ) \
- $(if $(filter DESKTOP,$(BUILD_TYPE)),xmlhelp/util/ucpchelp1) \
- xmloff/util/xo \
-))
+$(eval $(call gb_CppunitTest_use_rdb,sw_uiwriter,services))
$(eval $(call gb_CppunitTest_use_configuration,sw_uiwriter))
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index f59d14e8af18..03aa0546692c 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -34,6 +34,9 @@
#include <libxml/xmlwriter.h>
#include <libxml/xpath.h>
+#include <libxml/tree.h>
+#include <libxml/xpathInternals.h>
+#include <libxml/parserInternals.h>
using namespace com::sun::star;
@@ -267,6 +270,15 @@ protected:
return xAutoStyleFamily;
}
+ /// Similar to parseExport(), but this gives the xmlDocPtr of the layout dump.
+ xmlDocPtr parseLayoutDump()
+ {
+ if (!mpXmlBuffer)
+ dumpLayout();
+
+ return xmlParseMemory((const char*)xmlBufferContent(mpXmlBuffer), xmlBufferLength(mpXmlBuffer));;
+ }
+
/**
* Extract a value from the layout dump using an XPath expression and an attribute name.
*
@@ -295,6 +307,34 @@ protected:
return aRet;
}
+ void registerNamespaces(xmlXPathContextPtr& pXmlXpathCtx)
+ {
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("w"), BAD_CAST("http://schemas.openxmlformats.org/wordprocessingml/2006/main"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("v"), BAD_CAST("urn:schemas-microsoft-com:vml"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("mc"), BAD_CAST("http://schemas.openxmlformats.org/markup-compatibility/2006"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("wps"), BAD_CAST("http://schemas.microsoft.com/office/word/2010/wordprocessingShape"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("wpg"), BAD_CAST("http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("wp"), BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("wp14"), BAD_CAST("http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("a"), BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/main"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("pic"), BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/picture"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("rels"), BAD_CAST("http://schemas.openxmlformats.org/package/2006/relationships"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("w14"), BAD_CAST("http://schemas.microsoft.com/office/word/2010/wordml"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("m"), BAD_CAST("http://schemas.openxmlformats.org/officeDocument/2006/math"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("ContentType"), BAD_CAST("http://schemas.openxmlformats.org/package/2006/content-types"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("lc"), BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("extended-properties"), BAD_CAST("http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("a14"), BAD_CAST("http://schemas.microsoft.com/office/drawing/2010/main"));
+ }
+
+ xmlNodeSetPtr getXPathNode(xmlDocPtr pXmlDoc, const OString& rXPath)
+ {
+ xmlXPathContextPtr pXmlXpathCtx = xmlXPathNewContext(pXmlDoc);
+ registerNamespaces(pXmlXpathCtx);
+ xmlXPathObjectPtr pXmlXpathObj = xmlXPathEvalExpression(BAD_CAST(rXPath.getStr()), pXmlXpathCtx);
+ return pXmlXpathObj->nodesetval;
+ }
+
template< typename T >
T getProperty( const uno::Any& obj, const OUString& name ) const
{
diff --git a/sw/qa/extras/uiwriter/data/cp1000115.fodt b/sw/qa/extras/uiwriter/data/cp1000115.fodt
new file mode 100644
index 000000000000..55227ff56e1e
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/cp1000115.fodt
@@ -0,0 +1,208 @@
+<?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:oasis: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:font-face-decls>
+ <style:font-face style:name="Lohit Hindi" svg:font-family="&apos;Lohit Hindi&apos;, &apos;Times New Roman&apos;"/>
+ <style:font-face style:name="Liberation Serif1" svg:font-family="&apos;Liberation Serif&apos;, &apos;Times New Roman&apos;" style:font-family-generic="roman"/>
+ <style:font-face style:name="Lucida Sans1" svg:font-family="&apos;Lucida Sans&apos;" style:font-family-generic="swiss"/>
+ <style:font-face style:name="Droid Sans Fallback" svg:font-family="&apos;Droid Sans Fallback&apos;, &apos;Times New Roman&apos;" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lucida Sans" svg:font-family="&apos;Lucida Sans&apos;" 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="#3465a4" draw:fill-color="#729fcf" 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="false"/>
+ <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="Tahoma" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </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="Tahoma" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" 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="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <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="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Tahoma" style:font-family-asian="Tahoma" 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="&apos;Lucida Sans&apos;" 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="&apos;Lucida Sans&apos;" 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="&apos;Lucida Sans&apos;" 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="&apos;Lucida Sans&apos;" style:font-family-generic-complex="swiss"/>
+ </style:style>
+ <style:style style:name="Heading_20_3" style:display-name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="3" style:class="text">
+ <style:paragraph-properties fo:margin-top="0.101cm" fo:margin-bottom="0.101cm" loext:contextual-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties fo:font-size="10pt" fo:font-weight="normal" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="Standard_20__28_user_29_" style:display-name="Standard (user)" style:family="paragraph">
+ <style:paragraph-properties fo:orphans="0" fo:widows="0" fo:hyphenation-ladder-count="no-limit" style:vertical-align="baseline"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif1" fo:font-family="&apos;Liberation Serif&apos;, &apos;Times New Roman&apos;" style:font-family-generic="roman" fo:font-size="12pt" style:letter-kerning="true" style:font-name-asian="Droid Sans Fallback" style:font-family-asian="&apos;Droid Sans Fallback&apos;, &apos;Times New Roman&apos;" style:font-pitch-asian="variable" style:font-size-asian="12pt" style:font-name-complex="Lohit Hindi" style:font-family-complex="&apos;Lohit Hindi&apos;, &apos;Times New Roman&apos;" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:style>
+ <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard_20__28_user_29_" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+ </style:style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Tabel1" style:family="table">
+ <style:table-properties style:width="17.713cm" fo:margin-left="0cm" fo:break-before="page" table:align="left"/>
+ </style:style>
+ <style:style style:name="Tabel1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="8.885cm"/>
+ </style:style>
+ <style:style style:name="Tabel1.B" style:family="table-column">
+ <style:table-column-properties style:column-width="8.828cm"/>
+ </style:style>
+ <style:style style:name="Tabel1.1" style:family="table-row">
+ <style:table-row-properties style:min-row-height="0.002cm"/>
+ </style:style>
+ <style:style style:name="Tabel1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding-left="0.101cm" fo:padding-right="0.4cm" fo:padding-top="0.101cm" fo:padding-bottom="0.101cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="Tabel1.B1" style:family="table-cell">
+ <style:table-cell-properties fo:background-color="transparent" fo:padding-left="0.101cm" fo:padding-right="0.4cm" fo:padding-top="0.101cm" fo:padding-bottom="0.101cm" fo:border="none">
+ <style:background-image/>
+ </style:table-cell-properties>
+ </style:style>
+ <style:style style:name="Tabel2" style:family="table">
+ <style:table-properties style:width="8.327cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Tabel2.A" style:family="table-column">
+ <style:table-column-properties style:column-width="2.432cm" style:rel-column-width="19138*"/>
+ </style:style>
+ <style:style style:name="Tabel2.B" style:family="table-column">
+ <style:table-column-properties style:column-width="5.895cm" style:rel-column-width="46397*"/>
+ </style:style>
+ <style:style style:name="Tabel2.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="Tabel2.B1" 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="Tabel3" style:family="table">
+ <style:table-properties style:width="8.327cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Tabel3.A" style:family="table-column">
+ <style:table-column-properties style:column-width="1.697cm" style:rel-column-width="13354*"/>
+ </style:style>
+ <style:style style:name="Tabel3.B" style:family="table-column">
+ <style:table-column-properties style:column-width="2.464cm" style:rel-column-width="19392*"/>
+ </style:style>
+ <style:style style:name="Tabel3.C" style:family="table-column">
+ <style:table-column-properties style:column-width="2.69cm" style:rel-column-width="21169*"/>
+ </style:style>
+ <style:style style:name="Tabel3.D" style:family="table-column">
+ <style:table-column-properties style:column-width="1.476cm" style:rel-column-width="11620*"/>
+ </style:style>
+ <style:style style:name="Tabel3.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="Tabel3.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="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties fo:font-size="10pt" fo:language="en" fo:country="GB" fo:font-weight="bold" officeooo:paragraph-rsid="00168480" style:font-size-asian="10pt" style:font-weight-asian="bold" style:font-size-complex="10pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties fo:font-size="8pt" officeooo:paragraph-rsid="00168480" fo:background-color="transparent" style:font-size-asian="8pt" style:font-size-complex="8pt"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:paragraph-rsid="00168480"/>
+ </style:style>
+ <style:style style:name="P4" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ <style:text-properties fo:font-size="8pt" fo:font-weight="bold" officeooo:paragraph-rsid="00168480" style:font-size-asian="8pt" style:font-weight-asian="bold" style:font-size-complex="8pt" style:font-weight-complex="bold"/>
+ </style:style>
+ <style:style style:name="P5" style:family="paragraph" style:parent-style-name="Heading_20_3">
+ <style:text-properties fo:font-size="10pt" fo:font-weight="normal" officeooo:paragraph-rsid="00168480" fo:background-color="transparent" style:font-size-asian="10pt" style:font-weight-asian="normal" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="P6" style:family="paragraph" style:parent-style-name="Heading_20_3">
+ <style:text-properties officeooo:paragraph-rsid="00168480"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="9.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="1.3cm" 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="Standard" style:page-layout-name="pm1"/>
+ </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>
+ <table:table table:name="Tabel1" table:style-name="Tabel1">
+ <table:table-column table:style-name="Tabel1.A"/>
+ <table:table-column table:style-name="Tabel1.B"/>
+ <table:table-row table:style-name="Tabel1.1">
+ <table:table-cell table:style-name="Tabel1.A1" office:value-type="string">
+ <text:p text:style-name="Standard">Start.</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabel1.B1" office:value-type="string">
+ <table:table table:name="Tabel2" table:style-name="Tabel2">
+ <table:table-column table:style-name="Tabel2.A"/>
+ <table:table-column table:style-name="Tabel2.B"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabel2.A1" office:value-type="string">
+ <text:p text:style-name="Standard">First table.</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabel2.B1" office:value-type="string">
+ <text:p text:style-name="Standard"/>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:h text:style-name="Heading_20_3" text:outline-level="3">one point one<text:line-break/></text:h>
+ <text:h text:style-name="Heading_20_3" text:outline-level="3">two point one<text:line-break/><text:line-break/><text:line-break/><text:line-break/><text:line-break/><text:line-break/><text:line-break/><text:line-break/><text:line-break/><text:soft-page-break/></text:h>
+ <table:table table:name="Tabel3" table:style-name="Tabel3">
+ <table:table-column table:style-name="Tabel3.A"/>
+ <table:table-column table:style-name="Tabel3.B"/>
+ <table:table-column table:style-name="Tabel3.C"/>
+ <table:table-column table:style-name="Tabel3.D"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabel3.A1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents">2nd</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabel3.A1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabel3.A1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabel3.D1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="Standard">End.</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="P1"/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 98bde55ad6a3..c70684b7c466 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -30,6 +30,7 @@ public:
void testFdo75110();
void testFdo75898();
void testCp1000071();
+ void testCp1000115();
CPPUNIT_TEST_SUITE(SwUiWriterTest);
CPPUNIT_TEST(testReplaceForward);
@@ -38,6 +39,7 @@ public:
CPPUNIT_TEST(testFdo75110);
CPPUNIT_TEST(testFdo75898);
CPPUNIT_TEST(testCp1000071);
+ CPPUNIT_TEST(testCp1000115);
CPPUNIT_TEST_SUITE_END();
private:
@@ -190,6 +192,17 @@ void SwUiWriterTest::testCp1000071()
CPPUNIT_ASSERT_EQUAL( redlineEnd1Index, rTbl[ 1 ]->End()->nContent.GetIndex());
}
+void SwUiWriterTest::testCp1000115()
+{
+ createDoc("cp1000115.fodt");
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ xmlNodeSetPtr pXmlNodes = getXPathNode(pXmlDoc, "/root/page[2]/body/tab/row/cell[2]/txt");
+ // This was 1: the long paragraph in the B1 cell did flow over to the
+ // second page, so there was only one paragraph in the second cell of the
+ // second page.
+ CPPUNIT_ASSERT_EQUAL(2, xmlXPathNodeSetGetLength(pXmlNodes));
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index c4a9033b6e79..ff81c5800de8 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -1074,6 +1074,14 @@ void SwTxtFrm::FormatAdjust( SwTxtFormatter &rLine,
{
nNew |= 3;
}
+ else if (FindTabFrm() && nEnd > 0 && rLine.GetInfo().GetChar(nEnd - 1) == CH_BREAK)
+ {
+ // We are in a table, the paragraph has a follow and the text
+ // ends with a hard line break. Don't join the follow just
+ // because the follow would have no content, we may still need it
+ // for the paragraph mark.
+ nNew |= 1;
+ }
CHG_OFFSET( GetFollow(), nEnd )
GetFollow()->ManipOfst( nEnd );
}