summaryrefslogtreecommitdiffstats
path: root/sw/source/filter/ww8/rtfattributeoutput.cxx
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-07-09 08:21:06 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-07-09 09:23:19 +0200
commitdb9e64c2a499c1c3da9d3c1b4e123af04f937933 (patch)
tree05f33b44ed838406e1822742adc7e206449c1a00 /sw/source/filter/ww8/rtfattributeoutput.cxx
parentwriterfilter: avoid PropValVector inheriting from an STL container (diff)
downloadcore-db9e64c2a499c1c3da9d3c1b4e123af04f937933.tar.gz
core-db9e64c2a499c1c3da9d3c1b4e123af04f937933.zip
Better support more than 65k annotations
There isn't really a limit for the annotation count in the RTF/DOCX spec. Thanks Miklos for hints on this. Change-Id: Ib4493b518acb3cabe04312c37b5c6a9c6072cb7e
Diffstat (limited to 'sw/source/filter/ww8/rtfattributeoutput.cxx')
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index e374a9a0afe6..9d164f88b203 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1490,7 +1490,7 @@ void RtfAttributeOutput::WriteAnnotationMarks_Impl(std::vector< OUString >& rSta
OString rName = OUStringToOString(*i, RTL_TEXTENCODING_UTF8);
// Output the annotation mark
- sal_uInt16 nId = m_nNextAnnotationMarkId++;
+ const sal_Int32 nId = m_nNextAnnotationMarkId++;
m_rOpenedAnnotationMarksIds[rName] = nId;
m_aRun->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_ATRFSTART " ");
m_aRun->append(OString::number(nId).getStr());
@@ -1503,10 +1503,10 @@ void RtfAttributeOutput::WriteAnnotationMarks_Impl(std::vector< OUString >& rSta
OString rName = OUStringToOString(*i, RTL_TEXTENCODING_UTF8);
// Get the id of the annotation mark
- std::map<OString, sal_uInt16>::iterator it = m_rOpenedAnnotationMarksIds.find(rName);
+ std::map<OString, sal_Int32>::iterator it = m_rOpenedAnnotationMarksIds.find(rName);
if (it != m_rOpenedAnnotationMarksIds.end())
{
- sal_uInt16 nId = it->second;
+ const sal_Int32 nId = it->second;
m_aRun->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_ATRFEND " ");
m_aRun->append(OString::number(nId).getStr());
m_aRun->append('}');
@@ -3292,7 +3292,7 @@ void RtfAttributeOutput::PostitField(const SwField* pField)
const SwPostItField& rPField = *static_cast<const SwPostItField*>(pField);
OString aName = OUStringToOString(rPField.GetName(), RTL_TEXTENCODING_UTF8);
- std::map<OString, sal_uInt16>::iterator it = m_rOpenedAnnotationMarksIds.find(aName);
+ std::map<OString, sal_Int32>::iterator it = m_rOpenedAnnotationMarksIds.find(aName);
if (it != m_rOpenedAnnotationMarksIds.end())
{
// In case this field is inside annotation marks, we want to write the