diff options
author | Eike Rathke <erack@redhat.com> | 2013-05-08 18:12:32 +0200 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-06-28 12:00:06 +0000 |
commit | da11528150df545a31df3c9863bd4c3925ccdf21 (patch) | |
tree | ad7eb65227b7d03972637fcaf23a8b96cc1c55a4 /sw | |
parent | 7f50f4092b7beafa5545a9a783dde760b260df4c (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)
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>
(cherry picked from commit 2af1f5691e8d64afd5246d245d7876b5a2cd5cd8)
Conflicts:
editeng/inc/editeng/editeng.hxx
editeng/inc/editeng/outliner.hxx
editeng/inc/editeng/unoedprx.hxx
editeng/inc/editeng/unoedsrc.hxx
editeng/inc/editeng/unofored.hxx
editeng/inc/editeng/unoforou.hxx
editeng/inc/editeng/unotext.hxx
editeng/source/accessibility/AccessibleHyperlink.cxx
editeng/source/accessibility/AccessibleHyperlink.hxx
editeng/source/editeng/editeng.cxx
editeng/source/editeng/editobj.cxx
editeng/source/editeng/editobj2.hxx
editeng/source/editeng/impedit.hxx
editeng/source/editeng/impedit3.cxx
editeng/source/editeng/impedit4.cxx
editeng/source/outliner/outleeng.cxx
editeng/source/outliner/outleeng.hxx
editeng/source/outliner/outliner.cxx
editeng/source/outliner/outlvw.cxx
editeng/source/uno/unoedprx.cxx
editeng/source/uno/unofored.cxx
editeng/source/uno/unoforou.cxx
editeng/source/uno/unotext.cxx
include/editeng/editobj.hxx
sc/inc/editutil.hxx
sc/qa/unit/subsequent_filters-test.cxx
sc/source/core/data/cellvalue.cxx
sc/source/core/tool/editutil.cxx
sc/source/filter/xml/xmlcelli.hxx
sc/source/ui/unoobj/fielduno.cxx
sd/source/ui/inc/OutlineView.hxx
sd/source/ui/view/drtxtob1.cxx
starmath/source/accessibility.cxx
starmath/source/accessibility.hxx
svx/inc/svx/svdoutl.hxx
svx/source/accessibility/AccessibleEmptyEditSource.cxx
svx/source/sdr/properties/textproperties.cxx
svx/source/svdraw/svdoutl.cxx
Change-Id: I62d1b9c399cd709a4f93dbac31b219a61c46ec00
Reviewed-on: https://gerrit.libreoffice.org/4368
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/docufld.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/fields/docufld.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/rtf/rtftbl.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/rtf/swparrtf.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/rtf/swparrtf.hxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxexport.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfsdrexport.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.hxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/docvw/AnnotationWin.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/docvw/PostItMgr.cxx | 3 | ||||
-rw-r--r-- | sw/source/ui/docvw/SidebarWin.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/shells/annotsh.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/shells/drwtxtsh.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/shells/langhelper.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/uno/unotxdoc.cxx | 8 |
18 files changed, 40 insertions, 39 deletions
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx index 35ea4c156154..34e211806cf5 100644 --- a/sw/inc/docufld.hxx +++ b/sw/inc/docufld.hxx @@ -556,7 +556,7 @@ public: const OutlinerParaObject* GetTextObject() const; void SetTextObject( OutlinerParaObject* pText ); - sal_uInt32 GetNumberOfParagraphs() const; + sal_Int32 GetNumberOfParagraphs() const; virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ) const; virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhich ); diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index ebee25966357..db1fd81b0003 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -1850,7 +1850,7 @@ void SwPostItField::SetTextObject( OutlinerParaObject* pText ) mpText = pText; } -sal_uInt32 SwPostItField::GetNumberOfParagraphs() const +sal_Int32 SwPostItField::GetNumberOfParagraphs() const { return (mpText) ? mpText->Count() : 1; } diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx index ae920d449e7d..f4107d4a3523 100644 --- a/sw/source/filter/rtf/rtftbl.cxx +++ b/sw/source/filter/rtf/rtftbl.cxx @@ -867,7 +867,7 @@ void SwRTFParser::NewTblLine() pBox = pLns->back()->GetTabBoxes().front(); - sal_uLong nOldPos = pPam->GetPoint()->nNode.GetIndex(); + sal_Int32 nOldPos = pPam->GetPoint()->nNode.GetIndex(); pPam->GetPoint()->nNode = *pBox->GetSttNd(); pPam->Move( fnMoveForward ); m_nCurrentBox = 0; @@ -909,7 +909,7 @@ void SwRTFParser::NewTblLine() SvxRTFItemStack& rAttrStk = GetAttrStack(); const SvxRTFItemStackType* pStk; for( size_t n = 0; n < rAttrStk.size(); ++n ) - if( ( pStk = rAttrStk[ n ])->GetSttNodeIdx() == sal_uLong(nOldPos) && + if( ( pStk = rAttrStk[ n ])->GetSttNodeIdx() == nOldPos && !pStk->GetSttCnt() ) ((SvxRTFItemStackType*)pStk)->SetStartPos( SwxPosition( pPam ) ); } diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index 13216ca96723..25a1dc0657fb 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -3643,7 +3643,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc ) // wurde an der Position ein Escapement aufgespannt, so entferne // das jetzt. Fussnoten sind bei uns immer hochgestellt. SvxRTFItemStackType* pTmp = aSaveStack.empty() ? 0 : aSaveStack.back(); - if( pTmp && pTmp->GetSttNodeIdx() == + if( pTmp && static_cast<sal_uLong>(pTmp->GetSttNodeIdx()) == pPam->GetPoint()->nNode.GetIndex() && pTmp->GetSttCnt() == nPos ) pTmp->GetAttrSet().ClearItem( RES_CHRATR_ESCAPEMENT ); @@ -4168,7 +4168,7 @@ void SwRTFParser::DelLastNode() { SvxRTFItemStackType* pStkEntry = (SvxRTFItemStackType*) GetAttrStack()[ --n ]; - if( nNodeIdx == pStkEntry->GetSttNode().GetIdx() ) + if( nNodeIdx == static_cast<sal_uLong>(pStkEntry->GetSttNode().GetIdx()) ) { if( !bMove ) { @@ -4205,7 +4205,7 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet ) // Crsr nicht mehr in der Tabelle ? if( !pPam->GetNode()->FindTableNode() && _do ) { - sal_uLong nOldPos = pPam->GetPoint()->nNode.GetIndex(); + sal_Int32 nOldPos = pPam->GetPoint()->nNode.GetIndex(); // dann wieder in die letzte Box setzen // (kann durch einlesen von Flys geschehen!) @@ -4385,7 +4385,7 @@ bool BookmarkPosition::operator==(const BookmarkPosition rhs) return(maMkNode.GetIndex() == rhs.maMkNode.GetIndex() && mnMkCntnt == rhs.mnMkCntnt); } -sal_uLong SwNodeIdx::GetIdx() const +sal_Int32 SwNodeIdx::GetIdx() const { return aIdx.GetIndex(); } @@ -4405,7 +4405,7 @@ SvxNodeIdx* SwxPosition::MakeNodeIdx() const return new SwNodeIdx( pPam->GetPoint()->nNode ); } -sal_uLong SwxPosition::GetNodeIdx() const +sal_Int32 SwxPosition::GetNodeIdx() const { return pPam->GetPoint()->nNode.GetIndex(); } diff --git a/sw/source/filter/rtf/swparrtf.hxx b/sw/source/filter/rtf/swparrtf.hxx index b60dc50933e3..c4cb1c32d4e8 100644 --- a/sw/source/filter/rtf/swparrtf.hxx +++ b/sw/source/filter/rtf/swparrtf.hxx @@ -69,7 +69,7 @@ class SwNodeIdx : public SvxNodeIdx SwNodeIndex aIdx; public: SwNodeIdx( const SwNodeIndex& rIdx ) : aIdx( rIdx ) {} - virtual sal_uLong GetIdx() const; + virtual sal_Int32 GetIdx() const; virtual SvxNodeIdx* Clone() const; }; @@ -94,7 +94,7 @@ class SwxPosition : public SvxPosition public: SwxPosition( SwPaM* pCrsr ) : pPam( pCrsr ) {} - virtual sal_uLong GetNodeIdx() const; + virtual sal_Int32 GetNodeIdx() const; virtual xub_StrLen GetCntIdx() const; // erzeuge von sich selbst eine Kopie diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index a233f1281e40..9cab8f63e94f 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -2477,11 +2477,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 0cbb453f0fa7..1d1a22bf0415 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -751,8 +751,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 91fe3002b267..eabf06e03811 100644 --- a/sw/source/filter/ww8/rtfsdrexport.cxx +++ b/sw/source/filter/ww8/rtfsdrexport.cxx @@ -530,10 +530,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 3263817c0759..86051f2cabb5 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -844,7 +844,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 @@ -1124,9 +1124,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 165274023890..2856c5ba1d92 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -1393,7 +1393,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; @@ -1409,7 +1409,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 c432363ab79c..073377a239b1 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -464,9 +464,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) ) { @@ -481,7 +481,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. diff --git a/sw/source/ui/docvw/AnnotationWin.cxx b/sw/source/ui/docvw/AnnotationWin.cxx index b5eb64c74f83..f2a1ea26c711 100644 --- a/sw/source/ui/docvw/AnnotationWin.cxx +++ b/sw/source/ui/docvw/AnnotationWin.cxx @@ -242,12 +242,12 @@ void SwAnnotationWin::InitAnswer(OutlinerParaObject* pText) GetOutlinerView()->InsertText(rtl::OUString("..."),false); GetOutlinerView()->InsertText(rtl::OUString("\"\n"),false); - GetOutlinerView()->SetSelection(ESelection(0x0,0x0,0xFFFF,0xFFFF)); + GetOutlinerView()->SetSelection(ESelection(0,0,EE_PARA_ALL,EE_TEXTPOS_ALL)); SfxItemSet aAnswerSet( DocView().GetDocShell()->GetPool() ); aAnswerSet.Put(SvxFontHeightItem(200,80,EE_CHAR_FONTHEIGHT)); aAnswerSet.Put(SvxPostureItem(ITALIC_NORMAL,EE_CHAR_ITALIC)); GetOutlinerView()->SetAttribs(aAnswerSet); - GetOutlinerView()->SetSelection(ESelection(0xFFFF,0xFFFF,0xFFFF,0xFFFF)); + GetOutlinerView()->SetSelection(ESelection(EE_PARA_MAX_COUNT,EE_TEXTPOS_MAX_COUNT,EE_PARA_MAX_COUNT,EE_TEXTPOS_MAX_COUNT)); //remove all attributes and reset our standard ones GetOutlinerView()->GetEditView().RemoveAttribsKeepLanguages(true); diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx index 4a37c000bb04..33c72db50808 100644 --- a/sw/source/ui/docvw/PostItMgr.cxx +++ b/sw/source/ui/docvw/PostItMgr.cxx @@ -1768,7 +1768,8 @@ sal_uInt16 SwPostItMgr::SearchReplace(const SwFmtFld &pFld, const ::com::sun::st if (bSrchForward) pWin->GetOutlinerView()->SetSelection(ESelection(0,0,0,0)); else - pWin->GetOutlinerView()->SetSelection(ESelection(0xFFFF,0xFFFF,0xFFFF,0xFFFF)); + pWin->GetOutlinerView()->SetSelection( + ESelection(EE_PARA_MAX_COUNT,EE_TEXTPOS_MAX_COUNT,EE_PARA_MAX_COUNT,EE_TEXTPOS_MAX_COUNT)); SvxSearchItem aItem(SID_SEARCH_ITEM ); aItem.SetSearchOptions(rSearchOptions); aItem.SetBackward(!bSrchForward); diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx index c0417adb9eff..17c0aead3cb4 100644 --- a/sw/source/ui/docvw/SidebarWin.cxx +++ b/sw/source/ui/docvw/SidebarWin.cxx @@ -762,7 +762,7 @@ void SwSidebarWin::SetLanguage(const SvxLanguageItem aNewItem) Engine()->SetModifyHdl( Link() ); ESelection aOld = GetOutlinerView()->GetSelection(); - ESelection aNewSelection( 0, 0, (sal_uInt16)Engine()->GetParagraphCount()-1, USHRT_MAX ); + ESelection aNewSelection( 0, 0, Engine()->GetParagraphCount()-1, EE_TEXTPOS_ALL ); GetOutlinerView()->SetSelection( aNewSelection ); SfxItemSet aEditAttr(GetOutlinerView()->GetAttribs()); aEditAttr.Put(aNewItem); diff --git a/sw/source/ui/shells/annotsh.cxx b/sw/source/ui/shells/annotsh.cxx index 117a0d20b267..4cf79c584c1e 100644 --- a/sw/source/ui/shells/annotsh.cxx +++ b/sw/source/ui/shells/annotsh.cxx @@ -256,9 +256,9 @@ void SwAnnotationShell::Exec( SfxRequest &rReq ) Outliner * pOutliner = pOLV->GetOutliner(); if(pOutliner) { - sal_uLong nParaCount = pOutliner->GetParagraphCount(); + sal_Int32 nParaCount = pOutliner->GetParagraphCount(); if (nParaCount > 0) - pOLV->SelectRange(0L, sal_uInt16(nParaCount) ); + pOLV->SelectRange(0L, nParaCount ); } break; } diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index 281c5323531e..6d62d1fea580 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -446,9 +446,9 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq) SdrOutliner * pOutliner = pSdrView->GetTextEditOutliner(); if(pOutliner) { - sal_uLong nParaCount = pOutliner->GetParagraphCount(); + sal_Int32 nParaCount = pOutliner->GetParagraphCount(); if (nParaCount > 0) - pOLV->SelectRange(0L, sal_uInt16(nParaCount) ); + pOLV->SelectRange(0L, nParaCount ); } } break; diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx index 469aed3e78fa..c66a472d758b 100644 --- a/sw/source/ui/shells/langhelper.cxx +++ b/sw/source/ui/shells/langhelper.cxx @@ -592,7 +592,7 @@ namespace SwLangHelper void SelectPara( EditView &rEditView, const ESelection &rCurSel ) { - ESelection aParaSel( rCurSel.nStartPara, 0, rCurSel.nStartPara, USHRT_MAX ); + ESelection aParaSel( rCurSel.nStartPara, 0, rCurSel.nStartPara, EE_TEXTPOS_ALL ); rEditView.SetSelection( aParaSel ); } diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index ceca2337472a..eb44eb4c7ae8 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -3243,12 +3243,12 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( if(pOutliner) { EditEngine& rEditEng = (EditEngine&)pOutliner->GetEditEngine(); - sal_uLong nParCount = pOutliner->GetParagraphCount(); - for (sal_uLong nPar=0; nPar<nParCount; nPar++) + sal_Int32 nParCount = pOutliner->GetParagraphCount(); + for (sal_Int32 nPar=0; nPar<nParCount; nPar++) { //every paragraph std::vector<sal_uInt16> aPortions; - rEditEng.GetPortions( (sal_uInt16)nPar, aPortions ); + rEditEng.GetPortions( nPar, aPortions ); for ( size_t nPos = aPortions.size(); nPos; ) { @@ -3256,7 +3256,7 @@ uno::Sequence< lang::Locale > SAL_CALL SwXTextDocument::getDocumentLanguages( --nPos; sal_uInt16 nEnd = aPortions[ nPos ]; sal_uInt16 nStart = nPos ? aPortions[ nPos - 1 ] : 0; - ESelection aSelection( (sal_uInt16)nPar, nStart, (sal_uInt16)nPar, nEnd ); + ESelection aSelection( nPar, nStart, nPar, nEnd ); SfxItemSet aAttr = rEditEng.GetAttribs( aSelection ); LanguageType nLang = LANGUAGE_DONTKNOW; |