summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-05-08 18:12:32 +0200
committerEike Rathke <erack@redhat.com>2013-05-10 14:01:38 +0000
commit2af1f5691e8d64afd5246d245d7876b5a2cd5cd8 (patch)
treee8a51d852010730d4af4a14d445664cf8ee6475c /sw/source/filter/ww8
parentebef182253e7d49c5439ab5053a7243ad24207a7 (diff)
resolved fdo#35756 import more than 64k HTML table cells
Enhanced EditEngine to be able to hold more than 64k paragraphs. Used also in RTF import Calc and Writer, so that could benefit as well. * changed all EditEngine,Outliner,... related paragraph index/count variables from sal_uInt16 to sal_Int32 * sal_Int32 instead of sal_uInt32 to match accessibility API * matched some Outliner methods' paragraph parameters from sal_uLong to sal_Int32 * containers capable to hold size_t nevertheless are limited to a maximum of sal_Int32 * changed definition of EE_PARA_NOT_FOUND and EE_PARA_ALL to SAL_MAX_INT32 + added EE_PARA_MAX_COUNT and EE_TEXTPOS_MAX_COUNT to initialize ESelection with what previously were hard coded 0xFFFF all over the place + for similar reason added EE_TEXTPOS_ALL corresponding to EE_PARA_ALL to initialize an ESelection spanning all available text like aSel(0,0,EE_PARA_ALL,EE_TEXTPOS_ALL) Change-Id: I62d1b9c399cd709a4f93dbac31b219a61c46ec00 Reviewed-on: https://gerrit.libreoffice.org/3838 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx4
-rw-r--r--sw/source/filter/ww8/docxexport.cxx4
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx4
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx6
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx4
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx8
6 files changed, 15 insertions, 15 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 95ce729b259b..6130b7d51f49 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2618,11 +2618,11 @@ void DocxAttributeOutput::WriteOutliner(const OutlinerParaObject& rParaObj)
const EditTextObject& rEditObj = rParaObj.GetTextObject();
MSWord_SdrAttrIter aAttrIter( m_rExport, rEditObj, TXT_HFTXTBOX );
- sal_uInt16 nPara = rEditObj.GetParagraphCount();
+ sal_Int32 nPara = rEditObj.GetParagraphCount();
m_pSerializer->startElementNS( XML_w, XML_textbox, FSEND );
m_pSerializer->startElementNS( XML_w, XML_txbxContent, FSEND );
- for (sal_uInt16 n = 0; n < nPara; ++n)
+ for (sal_Int32 n = 0; n < nPara; ++n)
{
if( n )
aAttrIter.NextPara( n );
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index e04f12d93e91..9840c45704e3 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -756,8 +756,8 @@ void DocxExport::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTy
const EditTextObject& rEditObj = rParaObj.GetTextObject();
MSWord_SdrAttrIter aAttrIter( *this, rEditObj, nTyp );
- sal_uInt16 nPara = rEditObj.GetParagraphCount();
- for( sal_uInt16 n = 0; n < nPara; ++n )
+ sal_Int32 nPara = rEditObj.GetParagraphCount();
+ for( sal_Int32 n = 0; n < nPara; ++n )
{
if( n )
aAttrIter.NextPara( n );
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index b42d0291194e..dc9c1b627ca0 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -532,10 +532,10 @@ void RtfSdrExport::WriteOutliner(const OutlinerParaObject& rParaObj)
const EditTextObject& rEditObj = rParaObj.GetTextObject();
MSWord_SdrAttrIter aAttrIter( m_rExport, rEditObj, TXT_HFTXTBOX );
- sal_uInt16 nPara = rEditObj.GetParagraphCount();
+ sal_Int32 nPara = rEditObj.GetParagraphCount();
m_rAttrOutput.RunText().append('{').append(OOO_STRING_SVTOOLS_RTF_SHPTXT).append(' ');
- for (sal_uInt16 n = 0; n < nPara; ++n)
+ for (sal_Int32 n = 0; n < nPara; ++n)
{
if( n )
aAttrIter.NextPara( n );
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 2e0ad109b163..6cbd5abf673f 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -843,7 +843,7 @@ MSWord_SdrAttrIter::MSWord_SdrAttrIter( MSWordExportBase& rWr,
NextPara( 0 );
}
-void MSWord_SdrAttrIter::NextPara( sal_uInt16 nPar )
+void MSWord_SdrAttrIter::NextPara( sal_Int32 nPar )
{
nPara = nPar;
// Attributwechsel an Pos 0 wird ignoriert, da davon ausgegangen
@@ -1123,9 +1123,9 @@ void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTyp
const EditTextObject& rEditObj = rParaObj.GetTextObject();
MSWord_SdrAttrIter aAttrIter( *this, rEditObj, nTyp );
- sal_uInt16 nPara = rEditObj.GetParagraphCount();
+ sal_Int32 nPara = rEditObj.GetParagraphCount();
sal_uInt8 bNul = 0;
- for( sal_uInt16 n = 0; n < nPara; ++n )
+ for( sal_Int32 n = 0; n < nPara; ++n )
{
if( n )
aAttrIter.NextPara( n );
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 3339bfe614a2..c48e101a97fc 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -1398,7 +1398,7 @@ private:
std::vector<EECharAttrib> aTxtAtrArr;
std::vector<const EECharAttrib*> aChrTxtAtrArr;
std::vector<rtl_TextEncoding> aChrSetArr;
- sal_uInt16 nPara;
+ sal_Int32 nPara;
xub_StrLen nAktSwPos;
xub_StrLen nTmpSwPos; // for HasItem()
rtl_TextEncoding eNdChrSet;
@@ -1414,7 +1414,7 @@ private:
public:
MSWord_SdrAttrIter( MSWordExportBase& rWr, const EditTextObject& rEditObj,
sal_uInt8 nType );
- void NextPara( sal_uInt16 nPar );
+ void NextPara( sal_Int32 nPar );
void OutParaAttr(bool bCharAttr);
void OutEEField(const SfxPoolItem& rHt);
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index e27f56954617..f1b7244531bb 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -461,9 +461,9 @@ SdrObject* SwWW8ImplReader::ReadPolyLine( WW8_DPHEAD* pHd, const WW8_DO* pDo,
ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
{
- sal_uInt16 nPCnt = mpDrawEditEngine->GetParagraphCount();
- sal_uInt16 nSP = 0;
- sal_uInt16 nEP = 0;
+ sal_Int32 nPCnt = mpDrawEditEngine->GetParagraphCount();
+ sal_Int32 nSP = 0;
+ sal_Int32 nEP = 0;
while( (nSP < nPCnt)
&& (nCpStart >= mpDrawEditEngine->GetTextLen( nSP ) + 1) )
{
@@ -478,7 +478,7 @@ ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
nCpEnd -= mpDrawEditEngine->GetTextLen( nEP ) + 1;
nEP++;
}
- return ESelection( nSP, (sal_uInt16)nCpStart, nEP, (sal_uInt16)nCpEnd );
+ return ESelection( nSP, nCpStart, nEP, nCpEnd );
}
// InsertTxbxStyAttrs() setzt die Style-Attribute in den uebergebenen ItemSet.