summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-02-24 09:03:22 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-02-24 09:14:46 +0100
commit0cf6f241e40b8be3c9d809c528b367df32f3f2ee (patch)
tree70c3726d89cb89683eb14d41b599765062066672 /sw/source
parent83aa6d8180f289e5ae4034560dbd95ab160b1ac2 (diff)
abi#11739 DOCX export: fix validation error, wrong order of some elements
Change-Id: Ic1c0174718ba6853fcc8795324a99b2a332b865e
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx24
-rw-r--r--sw/source/filter/ww8/docxtablestyleexport.cxx4
2 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index d37fe60a4ec3..9dd8cd52706b 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3739,7 +3739,18 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
FSNS( XML_w, XML_val ), OUStringToOString( OUString( rName ), RTL_TEXTENCODING_UTF8 ).getStr(),
FSEND );
- // Output properties from grab-bag.
+ if ( nBase != 0x0FFF && eType != STYLE_TYPE_LIST)
+ {
+ m_pSerializer->singleElementNS( XML_w, XML_basedOn,
+ FSNS( XML_w, XML_val ), m_rExport.pStyles->GetStyleId(nBase).getStr(),
+ FSEND );
+ }
+
+ if (!aLink.isEmpty())
+ m_pSerializer->singleElementNS(XML_w, XML_link,
+ FSNS(XML_w, XML_val), OUStringToOString(aLink, RTL_TEXTENCODING_UTF8).getStr(),
+ FSEND);
+
if (!aUiPriority.isEmpty())
m_pSerializer->singleElementNS(XML_w, XML_uiPriority,
FSNS(XML_w, XML_val), OUStringToOString(aUiPriority, RTL_TEXTENCODING_UTF8).getStr(),
@@ -3750,10 +3761,6 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
m_pSerializer->singleElementNS(XML_w, XML_semiHidden, FSEND);
if (bUnhideWhenUsed)
m_pSerializer->singleElementNS(XML_w, XML_unhideWhenUsed, FSEND);
- if (!aLink.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_link,
- FSNS(XML_w, XML_val), OUStringToOString(aLink, RTL_TEXTENCODING_UTF8).getStr(),
- FSEND);
if (bLocked)
m_pSerializer->singleElementNS(XML_w, XML_locked, FSEND);
if (!aRsid.isEmpty())
@@ -3761,13 +3768,6 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
FSNS(XML_w, XML_val), OUStringToOString(aRsid, RTL_TEXTENCODING_UTF8).getStr(),
FSEND);
- if ( nBase != 0x0FFF && eType != STYLE_TYPE_LIST)
- {
- m_pSerializer->singleElementNS( XML_w, XML_basedOn,
- FSNS( XML_w, XML_val ), m_rExport.pStyles->GetStyleId(nBase).getStr(),
- FSEND );
- }
-
if ( nNext != nId && eType != STYLE_TYPE_LIST)
{
m_pSerializer->singleElementNS( XML_w, XML_next,
diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx
index dc0297a7eec8..5cd154c354de 100644
--- a/sw/source/filter/ww8/docxtablestyleexport.cxx
+++ b/sw/source/filter/ww8/docxtablestyleexport.cxx
@@ -618,12 +618,12 @@ void DocxTableStyleExport::Impl::TableStyle(uno::Sequence<beans::PropertyValue>&
m_pSerializer->singleElementNS(XML_w, XML_uiPriority,
FSNS(XML_w, XML_val), OUStringToOString(aUiPriority, RTL_TEXTENCODING_UTF8).getStr(),
FSEND);
- if (bQFormat)
- m_pSerializer->singleElementNS(XML_w, XML_qFormat, FSEND);
if (bSemiHidden)
m_pSerializer->singleElementNS(XML_w, XML_semiHidden, FSEND);
if (bUnhideWhenUsed)
m_pSerializer->singleElementNS(XML_w, XML_unhideWhenUsed, FSEND);
+ if (bQFormat)
+ m_pSerializer->singleElementNS(XML_w, XML_qFormat, FSEND);
if (!aRsid.isEmpty())
m_pSerializer->singleElementNS(XML_w, XML_rsid,
FSNS(XML_w, XML_val), OUStringToOString(aRsid, RTL_TEXTENCODING_UTF8).getStr(),