summaryrefslogtreecommitdiff
path: root/include/xmloff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-04-10 17:59:10 +0200
committerMichael Stahl <mstahl@redhat.com>2017-04-11 16:56:38 +0200
commit0451019f7522e005853dae27131ca203d8a1a93c (patch)
treedf609e354b2c9321487c51e6190ffe1698fd4720 /include/xmloff
parent87713a4743dbc562227bf25f0232b24d56fcc265 (diff)
OFFICE-2102: ODF export: write <text:s> after non-mark elements too
... and fix the wrong export for <text:meta-field>, which erroneously did not use the same bIsPrevCharSpace flag as everything else (which was obviously a bug, as there should be one flag per paragraph). Interop testing demonstrates that at least Word and Calligra Words differ in their interpretation of spaces following <draw:frame> and other shape elements, and <text:note>: if there is a U+0020 space before the element, LO will not collapse a U+0020 space behind the element but Word and Calligra Words do collapse it. The distinction between "mark elements" and "non-mark elements" in the whitespace collapsing implementation in OOo since the beginning was never explicitly spelled out in ODF, although listing the <text:bookmark> etc. elements in ODF 1.1, 5.1.1 was a strong hint. Fortunately all 3 applications agree that a <text:s> following a <draw:frame> is consumed as a space, and it is valid to write a <text:s> in this situation, so just do that to improve interoperability. Change-Id: I42260c0528db9fe7e87e8dbae5105aeadb83780d
Diffstat (limited to 'include/xmloff')
-rw-r--r--include/xmloff/txtparae.hxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx
index a93615ad83d5..172131a45650 100644
--- a/include/xmloff/txtparae.hxx
+++ b/include/xmloff/txtparae.hxx
@@ -246,8 +246,7 @@ public:
void exportTextRangeEnumeration(
const css::uno::Reference< css::container::XEnumeration > & rRangeEnum,
- bool bAutoStyles, bool bProgress,
- bool bPrvChrIsSpc = true );
+ bool bAutoStyles, bool bProgress, bool & rPrevCharIsSpace);
protected:
@@ -276,7 +275,7 @@ protected:
const css::uno::Reference< css::text::XTextSection > & rBaseSection,
bool bAutoStyles, bool bProgress, bool bExportParagraph, TextPNS eExtensionNS = TextPNS::ODF );
- bool exportTextContentEnumeration(
+ void exportTextContentEnumeration(
const css::uno::Reference< css::container::XEnumeration > & rContentEnum,
bool bAutoStyles,
const css::uno::Reference< css::text::XTextSection > & rBaseSection,
@@ -298,12 +297,12 @@ protected:
void exportTextField(
const css::uno::Reference< css::text::XTextRange > & rTextRange,
- bool bAutoStyles, bool bProgress );
+ bool bAutoStyles, bool bProgress, bool * pPrevCharIsSpace);
void exportTextField(
const css::uno::Reference< css::text::XTextField> & xTextField,
const bool bAutoStyles, const bool bProgress,
- const bool bRecursive );
+ const bool bRecursive, bool * pPrevCharIsSpace);
void exportAnyTextFrame(
const css::uno::Reference< css::text::XTextContent > & rTextContent,
@@ -418,7 +417,7 @@ protected:
/// export a text:meta
void exportMeta(
const css::uno::Reference< css::beans::XPropertySet> & i_xPortion,
- bool i_bAutoStyles, bool i_isProgress );
+ bool i_bAutoStyles, bool i_isProgress, bool & rPrevCharIsSpace);
public: