summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/outlview.cxx
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-05-08 18:12:32 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-06-28 12:00:06 +0000
commitda11528150df545a31df3c9863bd4c3925ccdf21 (patch)
treead7eb65227b7d03972637fcaf23a8b96cc1c55a4 /sd/source/ui/view/outlview.cxx
parent7f50f4092b7beafa5545a9a783dde760b260df4c (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 'sd/source/ui/view/outlview.cxx')
-rw-r--r--sd/source/ui/view/outlview.cxx44
1 files changed, 22 insertions, 22 deletions
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index ff1db686eb06..c9c946227607 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -433,7 +433,7 @@ IMPL_LINK( OutlineView, ParagraphInsertedHdl, ::Outliner *, pOutliner )
Paragraph* pPara = pOutliner->GetHdlParagraph();
- sal_uInt16 nAbsPos = (sal_uInt16)mrOutliner.GetAbsPos( pPara );
+ sal_Int32 nAbsPos = mrOutliner.GetAbsPos( pPara );
UpdateParagraph( nAbsPos );
@@ -661,7 +661,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
pParagraph = *iter;
if( !pOutliner->HasParaFlag( pParagraph, PARAFLAG_ISPAGE ) &&
- (pOutliner->GetDepth( (sal_uInt16) pOutliner->GetAbsPos( pParagraph ) ) <= 0) )
+ (pOutliner->GetDepth( pOutliner->GetAbsPos( pParagraph ) ) <= 0) )
mnPagesToProcess++;
}
@@ -761,7 +761,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
}
pOutliner->UpdateFields();
}
- else if ( (pOutliner->GetPrevDepth() == 1) && ( pOutliner->GetDepth( (sal_uInt16) pOutliner->GetAbsPos( pPara ) ) == 2 ) )
+ else if ( (pOutliner->GetPrevDepth() == 1) && ( pOutliner->GetDepth( pOutliner->GetAbsPos( pPara ) ) == 2 ) )
{
// how many titles are in front of the title paragraph in question?
sal_Int32 nPos = -1L;
@@ -801,8 +801,8 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
if( pPage )
{
SfxStyleSheet* pStyleSheet = NULL;
- sal_uLong nPara = pOutliner->GetAbsPos( pPara );
- sal_Int16 nDepth = pOutliner->GetDepth( (sal_uInt16) nPara );
+ sal_Int32 nPara = pOutliner->GetAbsPos( pPara );
+ sal_Int16 nDepth = pOutliner->GetDepth( nPara );
bool bSubTitle = pPage->GetPresObj(PRESOBJ_TEXT) != NULL;
if( pOutliner->HasParaFlag(pPara, PARAFLAG_ISPAGE) )
@@ -829,7 +829,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
// before we set the style sheet we need to preserve the bullet item
// since all items will be deleted while setting a new style sheet
- SfxItemSet aOldAttrs( pOutliner->GetParaAttribs( (sal_uInt16)nPara ) );
+ SfxItemSet aOldAttrs( pOutliner->GetParaAttribs( nPara ) );
pOutliner->SetStyleSheet( nPara, pStyleSheet );
@@ -837,9 +837,9 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
if ( pOutliner->GetPrevDepth() != -1 && nDepth != -1 &&
aOldAttrs.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_ON )
{
- SfxItemSet aAttrs( pOutliner->GetParaAttribs( (sal_uInt16)nPara ) );
+ SfxItemSet aAttrs( pOutliner->GetParaAttribs( nPara ) );
aAttrs.Put( *aOldAttrs.GetItem( EE_PARA_NUMBULLET ) );
- pOutliner->SetParaAttribs( (sal_uInt16)nPara, aAttrs );
+ pOutliner->SetParaAttribs( nPara, aAttrs );
}
}
}
@@ -918,7 +918,7 @@ IMPL_LINK( OutlineView, BeginMovingHdl, ::Outliner *, pOutliner )
// select the pages belonging to the paragraphs on level 0 to select
sal_uInt16 nPos = 0;
- sal_uLong nParaPos = 0;
+ sal_Int32 nParaPos = 0;
Paragraph* pPara = pOutliner->GetParagraph( 0 );
std::vector<Paragraph*>::const_iterator fiter;
@@ -958,7 +958,7 @@ IMPL_LINK( OutlineView, EndMovingHdl, ::Outliner *, pOutliner )
// look for the first of the selected paragraphs in the new ordering
sal_uInt16 nPosNewOrder = 0;
- sal_uLong nParaPos = 0;
+ sal_Int32 nParaPos = 0;
Paragraph* pPara = pOutliner->GetParagraph( 0 );
Paragraph* pPrev = NULL;
while (pPara && pPara != pSearchIt)
@@ -1214,7 +1214,7 @@ void OutlineView::FillOutliner()
mrOutliner.SetDepth(pPara, -1);
// do not apply hard attributes from the previous paragraph
- mrOutliner.SetParaAttribs( (sal_uInt16)mrOutliner.GetAbsPos(pPara),
+ mrOutliner.SetParaAttribs( mrOutliner.GetAbsPos(pPara),
mrOutliner.GetEmptyItemSet() );
mrOutliner.SetStyleSheet( mrOutliner.GetAbsPos( pPara ), pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE ) );
@@ -1222,9 +1222,9 @@ void OutlineView::FillOutliner()
mrOutliner.SetParaFlag( pPara, PARAFLAG_ISPAGE );
- sal_uLong nPara = mrOutliner.GetAbsPos( pPara );
+ sal_Int32 nPara = mrOutliner.GetAbsPos( pPara );
- UpdateParagraph( (sal_uInt16)nPara );
+ UpdateParagraph( nPara );
// remember paragraph of currently selected page
if (pPage->IsSelected())
@@ -1242,14 +1242,14 @@ void OutlineView::FillOutliner()
OutlinerParaObject* pOPO = pTO->GetOutlinerParaObject();
if (pOPO)
{
- sal_uInt16 nParaCount1 = (sal_uInt16)mrOutliner.GetParagraphCount();
+ sal_Int32 nParaCount1 = mrOutliner.GetParagraphCount();
sal_Bool bVertical = pOPO->IsVertical();
pOPO->SetVertical( sal_False );
mrOutliner.AddText(*pOPO);
pOPO->SetVertical( bVertical );
- sal_uInt16 nParaCount2 = (sal_uInt16)mrOutliner.GetParagraphCount();
- for (sal_uInt16 n = nParaCount1; n < nParaCount2; n++)
+ sal_Int32 nParaCount2 = mrOutliner.GetParagraphCount();
+ for (sal_Int32 n = nParaCount1; n < nParaCount2; n++)
{
if( bSubTitle )
{
@@ -1288,7 +1288,7 @@ void OutlineView::FillOutliner()
IMPL_LINK_NOARG(OutlineView, RemovingPagesHdl)
{
- sal_uInt16 nNumOfPages = mrOutliner.GetSelPageCount();
+ sal_Int32 nNumOfPages = mrOutliner.GetSelPageCount();
if (nNumOfPages > PROCESS_WITH_PROGRESS_THRESHOLD)
{
@@ -1373,7 +1373,7 @@ Paragraph* OutlineView::GetParagraphForPage( ::Outliner& rOutl, SdPage* pPage )
// we finde the actual page
sal_uInt32 nPagesToSkip = (pPage->GetPageNum() - 1) >> 1;
- sal_uInt32 nParaPos = 0;
+ sal_Int32 nParaPos = 0;
Paragraph* pPara = rOutl.GetParagraph( 0 );
while( pPara )
{
@@ -1445,7 +1445,7 @@ void OutlineView::SetSelectedPages()
// select the pages belonging to the paragraphs on level 0 to select
sal_uInt16 nPos = 0;
- sal_uLong nParaPos = 0;
+ sal_Int32 nParaPos = 0;
Paragraph *pPara = mrOutliner.GetParagraph( 0 );
std::vector<Paragraph*>::const_iterator fiter;
@@ -1821,7 +1821,7 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo)
if( pPara && mrOutliner.HasParaFlag(pPara,PARAFLAG_ISPAGE) )
{
long nPage = 0; // todo, printing??
- for ( sal_uInt16 n = 0; n <= pInfo->mnPara; n++ )
+ for ( sal_Int32 n = 0; n <= pInfo->mnPara; n++ )
{
Paragraph* p = mrOutliner.GetParagraph( n );
if ( mrOutliner.HasParaFlag(p,PARAFLAG_ISPAGE) )
@@ -1896,7 +1896,7 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo)
// --------------------------------------------------------------------
-void OutlineView::UpdateParagraph( sal_uInt16 nPara )
+void OutlineView::UpdateParagraph( sal_Int32 nPara )
{
SfxItemSet aNewAttrs2( mrOutliner.GetParaAttribs( nPara ) );
aNewAttrs2.Put( maLRSpaceItem );
@@ -1916,7 +1916,7 @@ void OutlineView::OnEndPasteOrDrop( PasteOrDropInfos* pInfos )
SdPage* pPage = 0;
SfxStyleSheetBasePool* pStylePool = GetDoc().GetStyleSheetPool();
- for( sal_uInt16 nPara = pInfos->nStartPara; nPara <= pInfos->nEndPara; nPara++ )
+ for( sal_Int32 nPara = pInfos->nStartPara; nPara <= pInfos->nEndPara; nPara++ )
{
Paragraph* pPara = mrOutliner.GetParagraph( nPara );