summaryrefslogtreecommitdiff
path: root/sd/source
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 /sd/source
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 'sd/source')
-rw-r--r--sd/source/core/sdpage_animations.cxx4
-rw-r--r--sd/source/core/text/textapi.cxx2
-rw-r--r--sd/source/filter/html/htmlex.cxx18
-rw-r--r--sd/source/filter/html/htmlex.hxx2
-rw-r--r--sd/source/filter/ppt/pptinanimations.cxx7
-rw-r--r--sd/source/filter/xml/sdtransform.cxx4
-rw-r--r--sd/source/ui/annotations/annotationmanager.cxx8
-rw-r--r--sd/source/ui/annotations/annotationwindow.cxx4
-rw-r--r--sd/source/ui/app/sdmod2.cxx2
-rw-r--r--sd/source/ui/dlg/dlgassim.cxx6
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx4
-rw-r--r--sd/source/ui/func/fuexpand.cxx20
-rw-r--r--sd/source/ui/func/fuinsfil.cxx14
-rw-r--r--sd/source/ui/func/fuprobjs.cxx4
-rw-r--r--sd/source/ui/func/fusumry.cxx4
-rw-r--r--sd/source/ui/func/futext.cxx2
-rw-r--r--sd/source/ui/inc/OutlineView.hxx6
-rw-r--r--sd/source/ui/unoidl/unosrch.cxx4
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx8
-rw-r--r--sd/source/ui/view/Outliner.cxx2
-rw-r--r--sd/source/ui/view/drawview.cxx6
-rw-r--r--sd/source/ui/view/drtxtob.cxx10
-rw-r--r--sd/source/ui/view/drtxtob1.cxx10
-rw-r--r--sd/source/ui/view/outlnvs2.cxx4
-rw-r--r--sd/source/ui/view/outlnvsh.cxx22
-rw-r--r--sd/source/ui/view/outlview.cxx44
-rw-r--r--sd/source/ui/view/sdview.cxx6
-rw-r--r--sd/source/ui/view/sdview2.cxx10
28 files changed, 121 insertions, 116 deletions
diff --git a/sd/source/core/sdpage_animations.cxx b/sd/source/core/sdpage_animations.cxx
index 0c322d1d9f01..6b7aa967ae00 100644
--- a/sd/source/core/sdpage_animations.cxx
+++ b/sd/source/core/sdpage_animations.cxx
@@ -106,6 +106,8 @@ void SdPage::onParagraphInserted( ::Outliner* pOutliner, Paragraph* pPara, SdrOb
{
ParagraphTarget aTarget;
aTarget.Shape = Reference< XShape >( pObj->getUnoShape(), UNO_QUERY );
+ /* FIXME: Paragraph should be sal_Int32, though more than 64k
+ * paragrapsh at a shape are unlikely.. */
aTarget.Paragraph = (sal_Int16)pOutliner->GetAbsPos( pPara );
getMainSequence()->insertTextRange( makeAny( aTarget ) );
@@ -119,6 +121,8 @@ void SdPage::onParagraphRemoving( ::Outliner* pOutliner, Paragraph* pPara, SdrOb
{
ParagraphTarget aTarget;
aTarget.Shape = Reference< XShape >( pObj->getUnoShape(), UNO_QUERY );
+ /* FIXME: Paragraph should be sal_Int32, though more than 64k
+ * paragrapsh at a shape are unlikely.. */
aTarget.Paragraph = (sal_Int16)pOutliner->GetAbsPos( pPara );
getMainSequence()->disposeTextRange( makeAny( aTarget ) );
diff --git a/sd/source/core/text/textapi.cxx b/sd/source/core/text/textapi.cxx
index 8e76f7e6a5f2..afe6e80075ff 100644
--- a/sd/source/core/text/textapi.cxx
+++ b/sd/source/core/text/textapi.cxx
@@ -171,7 +171,7 @@ void TextApiObject::SetText( OutlinerParaObject& rText )
pModel->AddUndo( new UndoTextAPIChanged( *pModel, this ) );
mpSource->SetText( rText );
- maSelection.nStartPara = 0xffff;
+ maSelection.nStartPara = EE_PARA_MAX_COUNT;
}
String TextApiObject::GetText()
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index a792e20b8041..bc5891b64924 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -334,7 +334,7 @@ String HtmlState::SetLink( const String& aLink, const String& aTarget )
// methods of the class HtmlExport
// *********************************************************************
-static String getParagraphStyle( SdrOutliner* pOutliner, sal_uInt16 nPara )
+static String getParagraphStyle( SdrOutliner* pOutliner, sal_Int32 nPara )
{
SfxItemSet aParaSet( pOutliner->GetParaAttribs( nPara ) );
@@ -1203,19 +1203,19 @@ String HtmlExport::CreateTextForPage( SdrOutliner* pOutliner,
pOutliner->Clear();
pOutliner->SetText( *pOPO );
- sal_uLong nCount = pOutliner->GetParagraphCount();
+ sal_Int32 nCount = pOutliner->GetParagraphCount();
Paragraph* pPara = NULL;
sal_Int16 nActDepth = -1;
String aParaText;
- for (sal_uLong nPara = 0; nPara < nCount; nPara++)
+ for (sal_Int32 nPara = 0; nPara < nCount; nPara++)
{
pPara = pOutliner->GetParagraph(nPara);
if(pPara == 0)
continue;
- const sal_Int16 nDepth = (sal_uInt16) pOutliner->GetDepth( (sal_uInt16) nPara );
+ const sal_Int16 nDepth = (sal_uInt16) pOutliner->GetDepth( nPara );
aParaText = ParagraphToHTMLString(pOutliner,nPara,rBackgroundColor);
if(aParaText.Len() == 0)
@@ -1300,8 +1300,8 @@ String HtmlExport::CreateTextForNotesPage( SdrOutliner* pOutliner,
pOutliner->Clear();
pOutliner->SetText( *pOPO );
- sal_uLong nCount = pOutliner->GetParagraphCount();
- for (sal_uLong nPara = 0; nPara < nCount; nPara++)
+ sal_Int32 nCount = pOutliner->GetParagraphCount();
+ for (sal_Int32 nPara = 0; nPara < nCount; nPara++)
{
aStr.AppendAscii("<p style=\"");
aStr.Append( getParagraphStyle( pOutliner, nPara ) );
@@ -1318,7 +1318,7 @@ String HtmlExport::CreateTextForNotesPage( SdrOutliner* pOutliner,
// =====================================================================
// converts a paragraph of the outliner to html
// =====================================================================
-String HtmlExport::ParagraphToHTMLString( SdrOutliner* pOutliner, sal_uLong nPara, const Color& rBackgroundColor )
+String HtmlExport::ParagraphToHTMLString( SdrOutliner* pOutliner, sal_Int32 nPara, const Color& rBackgroundColor )
{
String aStr;
@@ -1336,14 +1336,14 @@ String HtmlExport::ParagraphToHTMLString( SdrOutliner* pOutliner, sal_uLong nPar
HtmlState aState( (mbUserAttr || mbDocColors) ? maTextColor : Color(COL_BLACK) );
std::vector<sal_uInt16> aPortionList;
- rEditEngine.GetPortions( (sal_uInt16) nPara, aPortionList );
+ rEditEngine.GetPortions( nPara, aPortionList );
sal_uInt16 nPos1 = 0;
for( std::vector<sal_uInt16>::const_iterator it( aPortionList.begin() ); it != aPortionList.end(); ++it )
{
sal_uInt16 nPos2 = *it;
- ESelection aSelection( (sal_uInt16) nPara, nPos1, (sal_uInt16) nPara, nPos2);
+ ESelection aSelection( nPara, nPos1, nPara, nPos2);
SfxItemSet aSet( rEditEngine.GetAttribs( aSelection ) );
diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx
index e9b35a9d6dda..4bffc1e1718d 100644
--- a/sd/source/filter/html/htmlex.hxx
+++ b/sd/source/filter/html/htmlex.hxx
@@ -177,7 +177,7 @@ class HtmlExport
String CreateNavBar( sal_uInt16 nSdPage, bool bIsText ) const;
String CreateBodyTag() const;
- String ParagraphToHTMLString( SdrOutliner* pOutliner, sal_uLong nPara, const Color& rBackgroundColor );
+ String ParagraphToHTMLString( SdrOutliner* pOutliner, sal_Int32 nPara, const Color& rBackgroundColor );
String TextAttribToHTMLString( SfxItemSet* pSet, HtmlState* pState, const Color& rBackgroundColor );
String CreateTextForTitle( SdrOutliner* pOutliner, SdPage* pPage, const Color& rBackgroundColor );
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index dc0ccda28375..75b426dc1435 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -3070,9 +3070,9 @@ sal_Int32 AnimationImporter::importTargetElementContainer( const Atom* pAtom, An
const EditTextObject& rEditTextObject = pOPO->GetTextObject();
- const sal_uInt16 nParaCount = rEditTextObject.GetParagraphCount();
+ const sal_Int32 nParaCount = rEditTextObject.GetParagraphCount();
- sal_uInt16 nPara = 0;
+ sal_Int32 nPara = 0;
while( (nPara < nParaCount) && (begin > 0) )
{
@@ -3086,7 +3086,8 @@ sal_Int32 AnimationImporter::importTargetElementContainer( const Atom* pAtom, An
{
ParagraphTarget aParaTarget;
rTarget >>= aParaTarget.Shape;
- aParaTarget.Paragraph = nPara;
+ /* FIXME: Paragraph should be sal_Int32 as well */
+ aParaTarget.Paragraph = static_cast<sal_Int16>(nPara);
rTarget = makeAny( aParaTarget );
rSubType = ShapeAnimationSubType::ONLY_TEXT;
diff --git a/sd/source/filter/xml/sdtransform.cxx b/sd/source/filter/xml/sdtransform.cxx
index e8c622f53720..53f785132728 100644
--- a/sd/source/filter/xml/sdtransform.cxx
+++ b/sd/source/filter/xml/sdtransform.cxx
@@ -192,11 +192,11 @@ void SdTransformOOo2xDocument::transformTextShape( SdrTextObj& rTextShape )
{
mrOutliner.SetText( *pOPO );
- sal_uInt32 nCount = mrOutliner.GetParagraphCount();
+ sal_Int32 nCount = mrOutliner.GetParagraphCount();
bool bChange = false;
- for(sal_uInt16 nPara = 0; nPara < nCount; nPara++)
+ for(sal_Int32 nPara = 0; nPara < nCount; nPara++)
{
SfxItemSet aParaSet( mrOutliner.GetParaAttribs( nPara ) );
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 3a50ba4510d9..20233f2c9038 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -473,9 +473,9 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq )
aStr.Append( sQuote );
aStr.Append( OUString("\"\n") );
- sal_uInt16 nParaCount = comphelper::string::getTokenCount(aStr, '\n');
- for( sal_uInt16 nPara = 0; nPara < nParaCount; nPara++ )
- pOutliner->Insert( aStr.GetToken( nPara, '\n' ), LIST_APPEND, -1 );
+ sal_Int32 nParaCount = comphelper::string::getTokenCount(aStr, '\n');
+ for( sal_Int32 nPara = 0; nPara < nParaCount; nPara++ )
+ pOutliner->Insert( aStr.GetToken( nPara, '\n' ), EE_PARA_APPEND, -1 );
if( pOutliner->GetParagraphCount() > 1 )
{
@@ -483,7 +483,7 @@ void AnnotationManagerImpl::ExecuteReplyToAnnotation( SfxRequest& rReq )
aAnswerSet.Put(SvxPostureItem(ITALIC_NORMAL,EE_CHAR_ITALIC));
ESelection aSel;
- aSel.nEndPara = (sal_uInt16)pOutliner->GetParagraphCount()-2;
+ aSel.nEndPara = pOutliner->GetParagraphCount()-2;
aSel.nEndPos = pOutliner->GetText( pOutliner->GetParagraph( aSel.nEndPara ) ).Len();
pOutliner->QuickSetAttribs( aAnswerSet, aSel );
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index f539d1f4800a..876853171cc0 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -362,7 +362,7 @@ void AnnotationWindow::InitControls()
void AnnotationWindow::StartEdit()
{
- getView()->SetSelection(ESelection(0xFFFF,0xFFFF,0xFFFF,0xFFFF));
+ getView()->SetSelection(ESelection(EE_PARA_MAX_COUNT,EE_TEXTPOS_MAX_COUNT,EE_PARA_MAX_COUNT,EE_TEXTPOS_MAX_COUNT));
getView()->ShowCursor();
}
@@ -467,7 +467,7 @@ void AnnotationWindow::SetLanguage(const SvxLanguageItem &aNewItem)
Engine()->SetModifyHdl( Link() );
ESelection aOld = getView()->GetSelection();
- ESelection aNewSelection( 0, 0, (sal_uInt16)Engine()->GetParagraphCount()-1, USHRT_MAX );
+ ESelection aNewSelection( 0, 0, Engine()->GetParagraphCount()-1, EE_TEXTPOS_ALL );
getView()->SetSelection( aNewSelection );
SfxItemSet aEditAttr(getView()->GetAttribs());
aEditAttr.Put(aNewItem);
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index fe5a28590a5a..ed8e7c29a5d9 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -99,7 +99,7 @@ static SdPage* GetCurrentPage( sd::ViewShell* pViewSh, EditFieldInfo* pInfo, boo
int nPgNum = 0;
Outliner* pOutl = pSdView->GetOutliner();
long nPos = pInfo->GetPara();
- sal_uLong nParaPos = 0;
+ sal_Int32 nParaPos = 0;
for( Paragraph* pPara = pOutl->GetParagraph( 0 ); pPara && nPos >= 0; pPara = pOutl->GetParagraph( ++nParaPos ), nPos-- )
{
diff --git a/sd/source/ui/dlg/dlgassim.cxx b/sd/source/ui/dlg/dlgassim.cxx
index 49709ed8f21d..809266998d79 100644
--- a/sd/source/ui/dlg/dlgassim.cxx
+++ b/sd/source/ui/dlg/dlgassim.cxx
@@ -137,14 +137,14 @@ void SdPageListControl::Fill( SdDrawDocument* pDoc )
pOutliner->Clear();
pOutliner->SetText( *pOPO );
- sal_uLong nCount = pOutliner->GetParagraphCount();
+ sal_Int32 nCount = pOutliner->GetParagraphCount();
Paragraph* pPara = NULL;
- for (sal_uLong nPara = 0; nPara < nCount; nPara++)
+ for (sal_Int32 nPara = 0; nPara < nCount; nPara++)
{
pPara = pOutliner->GetParagraph(nPara);
- if(pPara && pOutliner->GetDepth( (sal_uInt16) nPara ) == 0 )
+ if(pPara && pOutliner->GetDepth( nPara ) == 0 )
{
String aParaText = pOutliner->GetText(pPara);
if(aParaText.Len() != 0)
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index fd18aacb957b..6e5b5af9e5f4 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -750,8 +750,8 @@ void HeaderFooterTabPage::GetOrSetDateTimeLanguage( LanguageType &rLanguage, boo
EFieldInfo aFieldInfo;
aFieldInfo.pFieldItem = NULL;
- sal_uInt16 nParaCount = pEdit->GetParagraphCount();
- sal_uInt16 nPara;
+ sal_Int32 nParaCount = pEdit->GetParagraphCount();
+ sal_Int32 nPara;
for( nPara = 0; (nPara < nParaCount) && (aFieldInfo.pFieldItem == NULL); nPara++ )
{
sal_uInt16 nFieldCount = pEdit->GetFieldCount( nPara );
diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx
index 2fe6e0984166..ce2e0ba33e91 100644
--- a/sd/source/ui/func/fuexpand.cxx
+++ b/sd/source/ui/func/fuexpand.cxx
@@ -116,9 +116,9 @@ void FuExpandPage::DoExecute( SfxRequest& )
// remove hard paragraph- and character attributes
SfxItemSet aEmptyEEAttr(mpDoc->GetPool(), EE_ITEMS_START, EE_ITEMS_END);
- sal_uLong nParaCount1 = pOutl->GetParagraphCount();
+ sal_Int32 nParaCount1 = pOutl->GetParagraphCount();
- for (sal_uInt16 nPara = 0; nPara < nParaCount1; nPara++)
+ for (sal_Int32 nPara = 0; nPara < nParaCount1; nPara++)
{
pOutl->QuickRemoveCharAttribs(nPara);
pOutl->SetParaAttribs(nPara, aEmptyEEAttr);
@@ -129,8 +129,8 @@ void FuExpandPage::DoExecute( SfxRequest& )
while (pPara)
{
- sal_uLong nParaPos = pOutl->GetAbsPos( pPara );
- sal_Int16 nDepth = pOutl->GetDepth( (sal_uInt16) nParaPos );
+ sal_Int32 nParaPos = pOutl->GetAbsPos( pPara );
+ sal_Int16 nDepth = pOutl->GetDepth( nParaPos );
if ( nDepth == 0 )
{
// page with title & structuring!
@@ -181,7 +181,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
// create title text objects
SdrTextObj* pTextObj = (SdrTextObj*) pPage->GetPresObj(PRESOBJ_TITLE);
- OutlinerParaObject* pOutlinerParaObject = pOutl->CreateParaObject( (sal_uInt16) nParaPos, 1);
+ OutlinerParaObject* pOutlinerParaObject = pOutl->CreateParaObject( nParaPos, 1);
pOutlinerParaObject->SetOutlinerMode(OUTLINERMODE_TITLEOBJECT);
if( pOutlinerParaObject->GetDepth(0) != -1 )
@@ -205,7 +205,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
SfxStyleSheet* pSheet = pPage->GetStyleSheetForPresObj(PRESOBJ_TITLE);
pTextObj->NbcSetStyleSheet(pSheet, sal_False);
- sal_uLong nChildCount = pOutl->GetChildCount(pPara);
+ sal_Int32 nChildCount = pOutl->GetChildCount(pPara);
if (nChildCount > 0)
{
@@ -213,18 +213,18 @@ void FuExpandPage::DoExecute( SfxRequest& )
SdrTextObj* pOutlineObj = (SdrTextObj*) pPage->GetPresObj(PRESOBJ_OUTLINE);
pPara = pOutl->GetParagraph( ++nParaPos );
- OutlinerParaObject* pOPO = pOutl->CreateParaObject( (sal_uInt16) nParaPos, (sal_uInt16) nChildCount);
+ OutlinerParaObject* pOPO = pOutl->CreateParaObject( nParaPos, nChildCount);
SdrOutliner* pTempOutl = SdrMakeOutliner( OUTLINERMODE_OUTLINEOBJECT, mpDoc );
pTempOutl->SetText( *pOPO );
- sal_uLong nParaCount2 = pTempOutl->GetParagraphCount();
- sal_uLong nPara;
+ sal_Int32 nParaCount2 = pTempOutl->GetParagraphCount();
+ sal_Int32 nPara;
for( nPara = 0; nPara < nParaCount2; nPara++ )
{
pTempOutl->SetDepth (
pTempOutl->GetParagraph( nPara ),
- pTempOutl->GetDepth((sal_uInt16) nPara ) - 1);
+ pTempOutl->GetDepth( nPara ) - 1);
}
delete pOPO;
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 96de0c01aa15..e84696fc78f3 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -570,14 +570,14 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
while( !pDocliner->HasParaFlag( pPara, PARAFLAG_ISPAGE ) )
pPara = pDocliner->GetParent(pPara);
- sal_uLong nTargetPos = pDocliner->GetAbsPos(pPara) + 1;
+ sal_Int32 nTargetPos = pDocliner->GetAbsPos(pPara) + 1;
// apply layout of predecessor page
sal_uInt16 nPage = 0;
pPara = pDocliner->GetParagraph( pDocliner->GetAbsPos( pPara ) - 1 );
while (pPara)
{
- sal_uLong nPos = pDocliner->GetAbsPos( pPara );
+ sal_Int32 nPos = pDocliner->GetAbsPos( pPara );
if ( pDocliner->HasParaFlag( pPara, PARAFLAG_ISPAGE ) )
nPage++;
pPara = pDocliner->GetParagraph( nPos - 1 );
@@ -613,14 +613,14 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
}
else
{
- sal_uLong nParaCount = pOutliner->GetParagraphCount();
+ sal_Int32 nParaCount = pOutliner->GetParagraphCount();
// for progress bar: number of level-0-paragraphs
sal_uInt16 nNewPages = 0;
pPara = pOutliner->GetParagraph( 0 );
while (pPara)
{
- sal_uLong nPos = pOutliner->GetAbsPos( pPara );
+ sal_Int32 nPos = pOutliner->GetAbsPos( pPara );
if( pOutliner->HasParaFlag( pPara, PARAFLAG_ISPAGE ) )
nNewPages++;
pPara = pOutliner->GetParagraph( ++nPos );
@@ -637,13 +637,13 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
pDocliner->GetUndoManager().EnterListAction(
String(SdResId(STR_UNDO_INSERT_FILE)), String() );
- sal_uLong nSourcePos = 0;
+ sal_Int32 nSourcePos = 0;
SfxStyleSheet* pStyleSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE );
Paragraph* pSourcePara = pOutliner->GetParagraph( 0 );
while (pSourcePara)
{
- sal_uLong nPos = pOutliner->GetAbsPos( pSourcePara );
- sal_Int16 nDepth = pOutliner->GetDepth( (sal_uInt16) nPos );
+ sal_Int32 nPos = pOutliner->GetAbsPos( pSourcePara );
+ sal_Int16 nDepth = pOutliner->GetDepth( nPos );
// only take the last paragraph if it is filled
if (nSourcePos < nParaCount - 1 ||
diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx
index 1b4535143d2a..81e3d588b7a7 100644
--- a/sd/source/ui/func/fuprobjs.cxx
+++ b/sd/source/ui/func/fuprobjs.cxx
@@ -89,14 +89,14 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
std::vector<Paragraph*>::const_iterator iter = aSelList.begin();
Paragraph* pPara = aSelList.empty() ? NULL : *iter;
- nDepth = pOutl->GetDepth((sal_uInt16)pOutl->GetAbsPos( pPara ) );
+ nDepth = pOutl->GetDepth(pOutl->GetAbsPos( pPara ) );
bool bPage = pOutl->HasParaFlag( pPara, PARAFLAG_ISPAGE );
while( iter != aSelList.end() )
{
pPara = *iter;
- nTmp = pOutl->GetDepth((sal_uInt16) pOutl->GetAbsPos( pPara ) );
+ nTmp = pOutl->GetDepth( pOutl->GetAbsPos( pPara ) );
if( nDepth != nTmp )
{
diff --git a/sd/source/ui/func/fusumry.cxx b/sd/source/ui/func/fusumry.cxx
index 1d915002af9a..4009e31c7099 100644
--- a/sd/source/ui/func/fusumry.cxx
+++ b/sd/source/ui/func/fusumry.cxx
@@ -189,9 +189,9 @@ void FuSummaryPage::DoExecute( SfxRequest& )
// remove hard break- and character attributes
SfxItemSet aEmptyEEAttr(mpDoc->GetPool(), EE_ITEMS_START, EE_ITEMS_END);
- sal_uLong nParaCount = pOutl->GetParagraphCount();
+ sal_Int32 nParaCount = pOutl->GetParagraphCount();
- for (sal_uInt16 nPara = 0; nPara < nParaCount; nPara++)
+ for (sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
{
pOutl->SetStyleSheet( nPara, pStyle );
pOutl->QuickRemoveCharAttribs(nPara);
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 7830f199a29c..a6c04a596925 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -1010,7 +1010,7 @@ void FuText::SetInEditMode(const MouseEvent& rMEvt, sal_Bool bQuickDrag)
if (!GetTextObj()->GetOutlinerParaObject() && mpView->GetTextEditOutliner())
{
::Outliner* pOutl = mpView->GetTextEditOutliner();
- sal_uLong nParaAnz = pOutl->GetParagraphCount();
+ sal_Int32 nParaAnz = pOutl->GetParagraphCount();
Paragraph* p1stPara = pOutl->GetParagraph( 0 );
if (nParaAnz==1 && p1stPara)
diff --git a/sd/source/ui/inc/OutlineView.hxx b/sd/source/ui/inc/OutlineView.hxx
index 7b7c2aa64b44..b25dc9fbb349 100644
--- a/sd/source/ui/inc/OutlineView.hxx
+++ b/sd/source/ui/inc/OutlineView.hxx
@@ -155,7 +155,7 @@ public:
/** creates and inserts an empty slide for the given paragraph. */
SdPage* InsertSlideForParagraph( Paragraph* pPara );
- void UpdateParagraph( sal_uInt16 nPara );
+ void UpdateParagraph( sal_Int32 nPara );
protected:
virtual void OnBeginPasteOrDrop( PasteOrDropInfos* pInfos );
@@ -183,8 +183,8 @@ private:
std::vector<Paragraph*> maOldParaOrder;
std::vector<Paragraph*> maSelectedParas;
- sal_uInt16 mnPagesToProcess; // for the progress bar
- sal_uInt16 mnPagesProcessed;
+ sal_Int32 mnPagesToProcess; // for the progress bar
+ sal_Int32 mnPagesProcessed;
sal_Bool mbFirstPaint;
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index 1ce91e46e96a..aa736a6142ec 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -601,8 +601,8 @@ uno::Reference< text::XTextRange > SdUnoSearchReplaceShape::Search( uno::Refere
{
if( nStartPos <= nTextLen && nEndPos <= nTextLen )
{
- ESelection aSelection( (sal_uInt16)pConvertPara[nStartPos], (sal_uInt16)pConvertPos[nStartPos],
- (sal_uInt16)pConvertPara[nEndPos], (sal_uInt16)pConvertPos[nEndPos] );
+ ESelection aSelection( pConvertPara[nStartPos], (sal_uInt16)pConvertPos[nStartPos],
+ pConvertPara[nEndPos], (sal_uInt16)pConvertPos[nEndPos] );
SvxUnoTextRange *pRange;
SvxUnoTextBase* pParent = SvxUnoTextBase::getImplementation( xParent );
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index a6533b1898d2..a544515609f1 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1751,7 +1751,7 @@ private:
pTextObj = dynamic_cast<SdrTextObj*>(pPage->GetPresObj(PRESOBJ_TEXT)); // Untertitel vorhanden?
}
- sal_uLong nParaCount1 = pOutliner->GetParagraphCount();
+ sal_Int32 nParaCount1 = pOutliner->GetParagraphCount();
if (pTextObj!=NULL
&& !pTextObj->IsEmptyPresObj()
@@ -1766,7 +1766,7 @@ private:
for (sal_Int32 nPara=nParaCount1; nPara<nParaCount2; ++nPara)
{
Paragraph* pP = pOutliner->GetParagraph(nPara);
- if (pP!=NULL && pOutliner->GetDepth((sal_uInt16)nPara) > 0)
+ if (pP!=NULL && pOutliner->GetDepth(nPara) > 0)
pOutliner->SetDepth(pP, 0);
}
}
@@ -1778,9 +1778,9 @@ private:
// the current page.
if (nH > nPageH && pPara!=NULL)
{
- sal_uLong nCnt = pOutliner->GetAbsPos(
+ sal_Int32 nCnt = pOutliner->GetAbsPos(
pOutliner->GetParagraph( pOutliner->GetParagraphCount() - 1 ) );
- sal_uLong nParaPos = pOutliner->GetAbsPos( pPara );
+ sal_Int32 nParaPos = pOutliner->GetAbsPos( pPara );
nCnt -= nParaPos;
pPara = pOutliner->GetParagraph( ++nParaPos );
if ( nCnt && pPara )
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index d6b9e608ebca..b64532f390c5 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1403,7 +1403,7 @@ ESelection Outliner::GetSearchStartPosition (void)
{
// Retrieve the position after the last character in the last
// paragraph.
- sal_uInt16 nParagraphCount = static_cast<sal_uInt16>(GetParagraphCount());
+ sal_Int32 nParagraphCount = GetParagraphCount();
if (nParagraphCount == 0)
aPosition = ESelection();
else
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index ce740e74cafb..ff7f3c4cc488 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -201,8 +201,8 @@ sal_Bool DrawView::SetAttributes(const SfxItemSet& rSet,
while (pPara)
{
- sal_uLong nParaPos = pOutliner->GetAbsPos( pPara );
- sal_Int16 nDepth = pOutliner->GetDepth( (sal_uInt16) nParaPos );
+ sal_Int32 nParaPos = pOutliner->GetAbsPos( pPara );
+ sal_Int16 nDepth = pOutliner->GetDepth( nParaPos );
String aName(rPage.GetLayoutName());
aName += (sal_Unicode)(' ');
aName += OUString::number( (nDepth <= 0) ? 1 : nDepth + 1 );
@@ -243,7 +243,7 @@ sal_Bool DrawView::SetAttributes(const SfxItemSet& rSet,
pPara = iter != aSelList.rend() ? *iter : NULL;
if( !pPara && nDepth > 0 && rSet.GetItemState( EE_PARA_NUMBULLET ) == SFX_ITEM_ON &&
- pOutliner->GetDepth( (sal_uInt16) pOutliner->GetAbsPos(*(aSelList.begin())) ) > 0 )
+ pOutliner->GetDepth( pOutliner->GetAbsPos(*(aSelList.begin())) ) > 0 )
pPara = pOutliner->GetParagraph( 0 ); // Put NumBulletItem in outline level 1
}
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 4f016f101aa1..f285f815ad96 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -282,7 +282,7 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
{
pPara = *iter;
- sal_Int16 nDepth = pOutl->GetDepth( (sal_uInt16) pOutl->GetAbsPos( pPara ) );
+ sal_Int16 nDepth = pOutl->GetDepth( pOutl->GetAbsPos( pPara ) );
if (nDepth > 0 || (bOutlineViewSh && (nDepth <= 0) && !pOutl->HasParaFlag( pPara, PARAFLAG_ISPAGE )) )
{
@@ -427,17 +427,17 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
{
ESelection aSel = pOLV->GetSelection();
aSel.Adjust();
- sal_uLong nStartPara = aSel.nStartPara;
- sal_uLong nEndPara = aSel.nEndPara;
+ sal_Int32 nStartPara = aSel.nStartPara;
+ sal_Int32 nEndPara = aSel.nEndPara;
if( !aSel.HasRange() )
{
nStartPara = 0;
nEndPara = pOLV->GetOutliner()->GetParagraphCount() - 1;
}
long nUpper = 0L;
- for( sal_uLong nPara = nStartPara; nPara <= nEndPara; nPara++ )
+ for( sal_Int32 nPara = nStartPara; nPara <= nEndPara; nPara++ )
{
- const SfxItemSet& rItems = pOLV->GetOutliner()->GetParaAttribs( (sal_uInt16)nPara );
+ const SfxItemSet& rItems = pOLV->GetOutliner()->GetParaAttribs( nPara );
const SvxULSpaceItem& rItem = (const SvxULSpaceItem&) rItems.Get( EE_PARA_ULSPACE );
nUpper = std::max( nUpper, (long)rItem.GetUpper() );
}
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index b88b515a9af4..9d5cf273e53e 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -132,14 +132,14 @@ void TextObjectBar::Execute( SfxRequest &rReq )
{
ESelection aSel = pOLV->GetSelection();
aSel.Adjust();
- sal_uLong nStartPara = aSel.nStartPara;
- sal_uLong nEndPara = aSel.nEndPara;
+ sal_Int32 nStartPara = aSel.nStartPara;
+ sal_Int32 nEndPara = aSel.nEndPara;
if( !aSel.HasRange() )
{
nStartPara = 0;
nEndPara = pOLV->GetOutliner()->GetParagraphCount() - 1;
}
- for( sal_uLong nPara = nStartPara; nPara <= nEndPara; nPara++ )
+ for( sal_Int32 nPara = nStartPara; nPara <= nEndPara; nPara++ )
{
SfxStyleSheet* pStyleSheet = NULL;
if (pOLV->GetOutliner() != NULL)
@@ -147,7 +147,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
if (pStyleSheet != NULL)
{
SfxItemSet aAttr( pStyleSheet->GetItemSet() );
- SfxItemSet aTmpSet( pOLV->GetOutliner()->GetParaAttribs( (sal_uInt16) nPara ) );
+ SfxItemSet aTmpSet( pOLV->GetOutliner()->GetParaAttribs( nPara ) );
aAttr.Put( aTmpSet, sal_False ); // sal_False= InvalidItems is not default, handle it as "holes"
const SvxULSpaceItem& rItem = (const SvxULSpaceItem&) aAttr.Get( EE_PARA_ULSPACE );
SvxULSpaceItem* pNewItem = (SvxULSpaceItem*) rItem.Clone();
@@ -175,7 +175,7 @@ void TextObjectBar::Execute( SfxRequest &rReq )
SfxItemSet aNewAttrs( aAttr );
aNewAttrs.Put( *pNewItem );
delete pNewItem;
- pOLV->GetOutliner()->SetParaAttribs( (sal_uInt16)nPara, aNewAttrs );
+ pOLV->GetOutliner()->SetParaAttribs( nPara, aNewAttrs );
}
}
}
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index 586c6c873259..93db7ea6ccfd 100644
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
@@ -222,10 +222,10 @@ void OutlineViewShell::FuTemporary(SfxRequest &rReq)
case SID_SELECTALL:
{
::Outliner* pOutl = pOlView->GetOutliner();
- sal_uLong nParaCount = pOutl->GetParagraphCount();
+ sal_Int32 nParaCount = pOutl->GetParagraphCount();
if (nParaCount > 0)
{
- pOutlinerView->SelectRange( 0, (sal_uInt16) nParaCount );
+ pOutlinerView->SelectRange( 0, nParaCount );
}
Cancel();
}
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 6cb2004271af..743a6b22b7a2 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -770,7 +770,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
// allow 'Select All'?
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_SELECTALL ) )
{
- sal_uLong nParaCount = pOutl->GetParagraphCount();
+ sal_Int32 nParaCount = pOutl->GetParagraphCount();
sal_Bool bDisable = nParaCount == 0;
if (!bDisable && nParaCount == 1)
{
@@ -819,14 +819,14 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
Paragraph* pPara = *iter;
sal_Int16 nDepth;
- sal_Int16 nTmpDepth = pOutl->GetDepth( (sal_uInt16) pOutl->GetAbsPos( pPara ) );
+ sal_Int16 nTmpDepth = pOutl->GetDepth( pOutl->GetAbsPos( pPara ) );
bool bPage = pOutl->HasParaFlag( pPara, PARAFLAG_ISPAGE );
while (iter != aSelList.begin())
{
pPara = *iter;
- nDepth = pOutl->GetDepth( (sal_uInt16) pOutl->GetAbsPos( pPara ) );
+ nDepth = pOutl->GetDepth( pOutl->GetAbsPos( pPara ) );
if( nDepth != nTmpDepth || bPage != pOutl->HasParaFlag( pPara, PARAFLAG_ISPAGE ))
bUnique = sal_False;
@@ -875,7 +875,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
// otherwise look through all paragraphs
if (bDisableCollapseAll || bDisableExpandAll)
{
- sal_uLong nParaPos = 0;
+ sal_Int32 nParaPos = 0;
Paragraph* pPara = pOutl->GetParagraph( nParaPos );
while (pPara && (bDisableCollapseAll || bDisableExpandAll))
{
@@ -1685,7 +1685,7 @@ bool OutlineViewShell::UpdateTitleObject( SdPage* pPage, Paragraph* pPara )
// if we have a title object and a text, set the text
if( pTO )
{
- pOPO = pOutliner->CreateParaObject( (sal_uInt16) pOutliner->GetAbsPos( pPara ), 1 );
+ pOPO = pOutliner->CreateParaObject( pOutliner->GetAbsPos( pPara ), 1 );
pOPO->SetOutlinerMode( OUTLINERMODE_TITLEOBJECT );
pOPO->SetVertical( pTO->IsVerticalWriting() );
if( pTO->GetOutlinerParaObject() && (pOPO->GetTextObject() == pTO->GetOutlinerParaObject()->GetTextObject()) )
@@ -1761,9 +1761,9 @@ bool OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
}
// how many paragraphs in the outline?
- sal_uLong nTitlePara = pOutliner->GetAbsPos( pPara );
- sal_uLong nPara = nTitlePara + 1;
- sal_uLong nParasInLayout = 0L;
+ sal_Int32 nTitlePara = pOutliner->GetAbsPos( pPara );
+ sal_Int32 nPara = nTitlePara + 1;
+ sal_Int32 nParasInLayout = 0L;
pPara = pOutliner->GetParagraph( nPara );
while( pPara && !pOutliner->HasParaFlag(pPara, PARAFLAG_ISPAGE) )
{
@@ -1774,7 +1774,7 @@ bool OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara )
{
// create an OutlinerParaObject
pPara = pOutliner->GetParagraph( nTitlePara + 1 );
- pOPO = pOutliner->CreateParaObject( (sal_uInt16) nTitlePara + 1, (sal_uInt16) nParasInLayout );
+ pOPO = pOutliner->CreateParaObject( nTitlePara + 1, nParasInLayout );
}
if( pOPO )
@@ -1864,10 +1864,10 @@ sal_uLong OutlineViewShell::Read(SvStream& rInput, const String& rBaseURL, sal_u
SfxStyleSheet* pTitleSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_TITLE );
SfxStyleSheet* pOutlSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE );
- sal_uInt16 nParaCount = (sal_uInt16)pOutl->GetParagraphCount();
+ sal_Int32 nParaCount = pOutl->GetParagraphCount();
if ( nParaCount > 0 )
{
- for ( sal_uInt16 nPara = 0; nPara < nParaCount; nPara++ )
+ for ( sal_Int32 nPara = 0; nPara < nParaCount; nPara++ )
{
pOlView->UpdateParagraph( nPara );
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 63d8de6483f8..3c863013afd0 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -395,7 +395,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 );
@@ -617,7 +617,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++;
}
@@ -717,7 +717,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;
@@ -757,8 +757,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) )
@@ -785,7 +785,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 );
@@ -793,9 +793,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 );
}
}
}
@@ -868,7 +868,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;
@@ -905,7 +905,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)
@@ -1149,7 +1149,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 ) );
@@ -1157,9 +1157,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())
@@ -1177,14 +1177,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 )
{
@@ -1220,7 +1220,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)
{
@@ -1302,7 +1302,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 )
{
@@ -1368,7 +1368,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;
@@ -1728,7 +1728,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) )
@@ -1803,7 +1803,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 );
@@ -1823,7 +1823,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 );
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 68f47ff36e0b..06249b80bc2b 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -606,7 +606,7 @@ void View::SelectAll()
{
OutlinerView* pOLV = GetTextEditOutlinerView();
const ::Outliner* pOutliner = GetTextEditOutliner();
- pOLV->SelectRange( 0, (sal_uInt16) pOutliner->GetParagraphCount() );
+ pOLV->SelectRange( 0, pOutliner->GetParagraphCount() );
}
else
{
@@ -1177,7 +1177,7 @@ void View::OnEndPasteOrDrop( PasteOrDropInfos* pInfos )
// new paragraph, depending on the paragraph depth
SfxStyleSheetBasePool* pStylePool = GetDoc().GetStyleSheetPool();
- for ( sal_uInt16 nPara = pInfos->nStartPara; nPara <= pInfos->nEndPara; nPara++ )
+ for ( sal_Int32 nPara = pInfos->nStartPara; nPara <= pInfos->nEndPara; nPara++ )
{
sal_Int16 nDepth = pOutliner->GetDepth( nPara );
@@ -1200,7 +1200,7 @@ void View::OnEndPasteOrDrop( PasteOrDropInfos* pInfos )
else
{
// just put the object style on each new paragraph
- for ( sal_uInt16 nPara = pInfos->nStartPara; nPara <= pInfos->nEndPara; nPara++ )
+ for ( sal_Int32 nPara = pInfos->nStartPara; nPara <= pInfos->nEndPara; nPara++ )
{
pOutliner->SetStyleSheet( nPara, pStyleSheet );
}
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index eece2095344e..e030435357f7 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -320,13 +320,13 @@ void View::DoPaste (::Window* pWindow)
pOutliner->SetUpdateMode( sal_False );
const EditEngine& rEdit = pOutliner->GetEditEngine();
- const int nParaCount = rEdit.GetParagraphCount();
+ const sal_Int32 nParaCount = rEdit.GetParagraphCount();
- for( int nPara = nParaCount - 2; nPara >= 0; nPara-- )
+ for( sal_Int32 nPara = nParaCount - 2; nPara >= 0; nPara-- )
{
- const sal_uInt16 nParaLen = (sal_uInt16)rEdit.GetTextLen( (sal_uInt16)nPara );
- pOutliner->QuickDelete( ESelection( (sal_uInt16)nPara, nParaLen, (sal_uInt16)nPara+1, 0 ) );
- pOutliner->QuickInsertLineBreak( ESelection( (sal_uInt16)nPara, nParaLen, (sal_uInt16)nPara, nParaLen ) );
+ const sal_uInt16 nParaLen = (sal_uInt16)rEdit.GetTextLen( nPara );
+ pOutliner->QuickDelete( ESelection( nPara, nParaLen, nPara+1, 0 ) );
+ pOutliner->QuickInsertLineBreak( ESelection( nPara, nParaLen, nPara, nParaLen ) );
}
DBG_ASSERT( rEdit.GetParagraphCount() <= 1, "Titelobjekt contains hard line breaks" );