summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-03-20 12:37:32 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-03-20 12:47:52 +0100
commit56dd3c277ab342edf08f1f01955ca2a84f7112b1 (patch)
treef7b2b50378819663855994ddd90516ef6db68cc0
parent7057d1c9097b7c7aa4d232a9f67199bbf406d3f6 (diff)
DocxAttributeOutput::EndStyles: avoid hardwired 4091
Change-Id: I637cec62eb6cf951cb3d7c9e83c896494d6e1701
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx2
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index e0dc99754967..69d4759e8230 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3320,7 +3320,7 @@ void DocxAttributeOutput::EndStyles( sal_uInt16 nNumberOfStyles )
// Ms Office seems to have an internal limitation of 4091 styles
// and refuses to load .docx with more, even though the spec seems to allow that;
// so simply if there are more styles, don't export those
- sal_uInt16 nCountStylesToWrite = (4091 == nNumberOfStyles) ? 0 : (4091 - nNumberOfStyles);
+ sal_uInt16 nCountStylesToWrite = MSWORD_MAX_STYLES_LIMIT - nNumberOfStyles;
m_pTableStyleExport->TableStyles(nCountStylesToWrite);
m_pSerializer->endElementNS( XML_w, XML_styles );
}
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index c1acb3be80ff..271d1183fb6d 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -692,8 +692,6 @@ void WW8AttributeOutput::EndStyles( sal_uInt16 nNumberOfStyles )
SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, m_nStyAnzPos, nNumberOfStyles );
}
-#define MSWORD_MAX_STYLES_LIMIT 4091;
-
void MSWordStyles::OutputStylesTable()
{
m_rExport.bStyDef = true;
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 9a1d7b5d0147..883d1e34bf5f 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -1601,6 +1601,8 @@ public:
const SwNumRule* GetSwNumRule(sal_uInt16 nId) const;
};
+#define MSWORD_MAX_STYLES_LIMIT 4091
+
sal_Int16 GetWordFirstLineOffset(const SwNumFmt &rFmt);
// A bit of a bag on the side for now
OUString FieldString(ww::eField eIndex);