[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - chart2/source editeng/inc editeng/source filter/source forms/source sc/inc sc/source sd/source starmath/inc starmath/source svx/inc svx/source sw/inc sw/source

Eike Rathke erack at redhat.com
Fri Jun 28 05:00:32 PDT 2013


 chart2/source/view/axes/VCartesianAxis.cxx                  |    4 
 editeng/inc/editeng/AccessibleParaManager.hxx               |   20 -
 editeng/inc/editeng/editdata.hxx                            |   50 +-
 editeng/inc/editeng/editeng.hxx                             |  122 +++---
 editeng/inc/editeng/editobj.hxx                             |   20 -
 editeng/inc/editeng/editview.hxx                            |   10 
 editeng/inc/editeng/outliner.hxx                            |  184 ++++-----
 editeng/inc/editeng/outlobj.hxx                             |    6 
 editeng/inc/editeng/svxrtf.hxx                              |    8 
 editeng/inc/editeng/unoedhlp.hxx                            |   12 
 editeng/inc/editeng/unoedprx.hxx                            |   56 +--
 editeng/inc/editeng/unoedsrc.hxx                            |   56 +--
 editeng/inc/editeng/unofored.hxx                            |   48 +-
 editeng/inc/editeng/unoforou.hxx                            |   58 +--
 editeng/inc/editeng/unotext.hxx                             |   58 +--
 editeng/source/accessibility/AccessibleEditableTextPara.cxx |   53 +-
 editeng/source/accessibility/AccessibleHyperlink.cxx        |    2 
 editeng/source/accessibility/AccessibleHyperlink.hxx        |    5 
 editeng/source/accessibility/AccessibleImageBullet.cxx      |    6 
 editeng/source/accessibility/AccessibleParaManager.cxx      |   81 ++--
 editeng/source/accessibility/AccessibleStaticTextBase.cxx   |   29 -
 editeng/source/editeng/editdbg.cxx                          |    4 
 editeng/source/editeng/editdoc.cxx                          |  128 ++++--
 editeng/source/editeng/editdoc.hxx                          |   50 +-
 editeng/source/editeng/editeng.cxx                          |  160 ++++----
 editeng/source/editeng/editobj.cxx                          |   81 ++--
 editeng/source/editeng/editobj2.hxx                         |   20 -
 editeng/source/editeng/editundo.cxx                         |   18 
 editeng/source/editeng/editundo.hxx                         |   26 -
 editeng/source/editeng/editview.cxx                         |   28 -
 editeng/source/editeng/edtspell.cxx                         |    6 
 editeng/source/editeng/eehtml.cxx                           |    8 
 editeng/source/editeng/eertfpar.cxx                         |   22 -
 editeng/source/editeng/eertfpar.hxx                         |    4 
 editeng/source/editeng/impedit.cxx                          |   37 +-
 editeng/source/editeng/impedit.hxx                          |   92 ++--
 editeng/source/editeng/impedit2.cxx                         |  157 ++++----
 editeng/source/editeng/impedit3.cxx                         |   56 +--
 editeng/source/editeng/impedit4.cxx                         |   56 +--
 editeng/source/editeng/impedit5.cxx                         |   54 +-
 editeng/source/outliner/outleeng.cxx                        |   32 -
 editeng/source/outliner/outleeng.hxx                        |   26 -
 editeng/source/outliner/outlin2.cxx                         |   38 +-
 editeng/source/outliner/outliner.cxx                        |  222 +++++-------
 editeng/source/outliner/outlobj.cxx                         |   22 -
 editeng/source/outliner/outlundo.cxx                        |   14 
 editeng/source/outliner/outlundo.hxx                        |   18 
 editeng/source/outliner/outlvw.cxx                          |  139 +++----
 editeng/source/outliner/paralist.cxx                        |   58 +--
 editeng/source/outliner/paralist.hxx                        |   27 -
 editeng/source/rtf/svxrtf.cxx                               |    8 
 editeng/source/uno/unoedhlp.cxx                             |    8 
 editeng/source/uno/unoedprx.cxx                             |   70 +--
 editeng/source/uno/unofored.cxx                             |   54 +-
 editeng/source/uno/unoforou.cxx                             |   86 ++--
 editeng/source/uno/unotext.cxx                              |   98 ++---
 editeng/source/uno/unotext2.cxx                             |    4 
 filter/source/msfilter/msdffimp.cxx                         |    8 
 filter/source/msfilter/svdfppt.cxx                          |    2 
 forms/source/richtext/specialdispatchers.cxx                |    4 
 sc/inc/editutil.hxx                                         |    6 
 sc/source/core/data/attrib.cxx                              |    4 
 sc/source/core/data/column2.cxx                             |    4 
 sc/source/core/data/documen8.cxx                            |    2 
 sc/source/core/data/global.cxx                              |    4 
 sc/source/core/data/postit.cxx                              |    2 
 sc/source/core/tool/editutil.cxx                            |   22 -
 sc/source/filter/excel/xehelper.cxx                         |    8 
 sc/source/filter/excel/xicontent.cxx                        |    4 
 sc/source/filter/html/htmlexp.cxx                           |    4 
 sc/source/ui/app/inputhdl.cxx                               |   50 +-
 sc/source/ui/app/inputwin.cxx                               |    2 
 sc/source/ui/app/transobj.cxx                               |    2 
 sc/source/ui/docshell/docfunc.cxx                           |    8 
 sc/source/ui/drawfunc/drtxtob.cxx                           |   12 
 sc/source/ui/pagedlg/tphfedit.cxx                           |    4 
 sc/source/ui/unoobj/fielduno.cxx                            |   16 
 sc/source/ui/view/editsh.cxx                                |    2 
 sc/source/ui/view/output2.cxx                               |    4 
 sc/source/ui/view/viewdata.cxx                              |    2 
 sc/source/ui/view/viewfun4.cxx                              |    6 
 sc/source/ui/view/viewfunc.cxx                              |    2 
 sd/source/core/sdpage_animations.cxx                        |    4 
 sd/source/core/text/textapi.cxx                             |    2 
 sd/source/filter/html/htmlex.cxx                            |   18 
 sd/source/filter/html/htmlex.hxx                            |    2 
 sd/source/filter/ppt/pptinanimations.cxx                    |    7 
 sd/source/filter/xml/sdtransform.cxx                        |    4 
 sd/source/ui/annotations/annotationmanager.cxx              |    8 
 sd/source/ui/annotations/annotationwindow.cxx               |    4 
 sd/source/ui/app/sdmod2.cxx                                 |    2 
 sd/source/ui/dlg/dlgassim.cxx                               |    6 
 sd/source/ui/dlg/headerfooterdlg.cxx                        |    4 
 sd/source/ui/func/fuexpand.cxx                              |   20 -
 sd/source/ui/func/fuinsfil.cxx                              |   14 
 sd/source/ui/func/fuprobjs.cxx                              |    4 
 sd/source/ui/func/fusumry.cxx                               |    4 
 sd/source/ui/func/futext.cxx                                |    2 
 sd/source/ui/inc/OutlineView.hxx                            |    6 
 sd/source/ui/unoidl/unosrch.cxx                             |    4 
 sd/source/ui/view/DocumentRenderer.cxx                      |    8 
 sd/source/ui/view/Outliner.cxx                              |    2 
 sd/source/ui/view/drawview.cxx                              |    6 
 sd/source/ui/view/drtxtob.cxx                               |   10 
 sd/source/ui/view/drtxtob1.cxx                              |   10 
 sd/source/ui/view/outlnvs2.cxx                              |    4 
 sd/source/ui/view/outlnvsh.cxx                              |   22 -
 sd/source/ui/view/outlview.cxx                              |   44 +-
 sd/source/ui/view/sdview.cxx                                |    6 
 sd/source/ui/view/sdview2.cxx                               |   10 
 starmath/inc/edit.hxx                                       |    2 
 starmath/source/accessibility.cxx                           |   52 +-
 starmath/source/accessibility.hxx                           |   48 +-
 starmath/source/cursor.cxx                                  |    2 
 starmath/source/edit.cxx                                    |   15 
 starmath/source/view.cxx                                    |    5 
 svx/inc/svx/svdomeas.hxx                                    |    2 
 svx/inc/svx/svdotext.hxx                                    |    2 
 svx/inc/svx/svdoutl.hxx                                     |    2 
 svx/source/accessibility/AccessibleEmptyEditSource.cxx      |   48 +-
 svx/source/accessibility/AccessibleTextHelper.cxx           |   24 -
 svx/source/customshapes/EnhancedCustomShapeFontWork.cxx     |    2 
 svx/source/sdr/properties/textproperties.cxx                |   34 -
 svx/source/svdraw/svdedxv.cxx                               |   17 
 svx/source/svdraw/svdomeas.cxx                              |    2 
 svx/source/svdraw/svdotext.cxx                              |    4 
 svx/source/svdraw/svdotextpathdecomposition.cxx             |    8 
 svx/source/svdraw/svdotxat.cxx                              |   12 
 svx/source/svdraw/svdotxed.cxx                              |    2 
 svx/source/svdraw/svdotxfl.cxx                              |    2 
 svx/source/svdraw/svdoutl.cxx                               |    2 
 svx/source/svdraw/svdview.cxx                               |    4 
 svx/source/table/cell.cxx                                   |   16 
 svx/source/table/svdotable.cxx                              |    4 
 svx/source/table/tablecontroller.cxx                        |    2 
 svx/source/table/tablertfimporter.cxx                       |    4 
 sw/inc/docufld.hxx                                          |    2 
 sw/source/core/fields/docufld.cxx                           |    2 
 sw/source/filter/rtf/rtftbl.cxx                             |    4 
 sw/source/filter/rtf/swparrtf.cxx                           |   10 
 sw/source/filter/rtf/swparrtf.hxx                           |    4 
 sw/source/filter/ww8/docxattributeoutput.cxx                |    4 
 sw/source/filter/ww8/docxexport.cxx                         |    4 
 sw/source/filter/ww8/rtfsdrexport.cxx                       |    4 
 sw/source/filter/ww8/wrtw8esh.cxx                           |    6 
 sw/source/filter/ww8/wrtww8.hxx                             |    4 
 sw/source/filter/ww8/ww8graf.cxx                            |    8 
 sw/source/ui/docvw/AnnotationWin.cxx                        |    4 
 sw/source/ui/docvw/PostItMgr.cxx                            |    3 
 sw/source/ui/docvw/SidebarWin.cxx                           |    2 
 sw/source/ui/shells/annotsh.cxx                             |    4 
 sw/source/ui/shells/drwtxtsh.cxx                            |    4 
 sw/source/ui/shells/langhelper.cxx                          |    2 
 sw/source/ui/uno/unotxdoc.cxx                               |    8 
 154 files changed, 1866 insertions(+), 1770 deletions(-)

New commits:
commit da11528150df545a31df3c9863bd4c3925ccdf21
Author: Eike Rathke <erack at redhat.com>
Date:   Wed May 8 18:12:32 2013 +0200

    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 at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Eike Rathke <erack at 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 at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index 40b4886..5fe7ef3 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -324,8 +324,8 @@ bool lcl_hasWordBreak( const Reference< drawing::XShape >& rxShape )
                 SvxTextForwarder* pTextForwarder = pTextEditSource->GetTextForwarder();
                 if ( pTextForwarder )
                 {
-                    sal_uInt16 nParaCount = pTextForwarder->GetParagraphCount();
-                    for ( sal_uInt16 nPara = 0; nPara < nParaCount; ++nPara )
+                    sal_Int32 nParaCount = pTextForwarder->GetParagraphCount();
+                    for ( sal_Int32 nPara = 0; nPara < nParaCount; ++nPara )
                     {
                         sal_uInt16 nLineCount = pTextForwarder->GetLineCount( nPara );
                         for ( sal_uInt16 nLine = 0; nLine < nLineCount; ++nLine )
diff --git a/editeng/inc/editeng/AccessibleParaManager.hxx b/editeng/inc/editeng/AccessibleParaManager.hxx
index 90bc3d8..a4c2c33 100644
--- a/editeng/inc/editeng/AccessibleParaManager.hxx
+++ b/editeng/inc/editeng/AccessibleParaManager.hxx
@@ -164,7 +164,7 @@ namespace accessibility
         void SetNum( sal_Int32 nNumParas );
 
         /** Get the number of paragraphs currently possible */
-        sal_uInt32 GetNum() const;
+        sal_Int32 GetNum() const;
 
         // iterators
         VectorOfChildren::iterator begin();
@@ -173,25 +173,25 @@ namespace accessibility
         VectorOfChildren::const_iterator end() const;
 
         // dealing with single paragraphs (release reference, return reference etc)
-        void Release( sal_uInt32 nPara );
+        void Release( sal_Int32 nPara );
         /// Set focus to given child
         void SetFocus( sal_Int32 nChild );
 
-        void FireEvent( sal_uInt32 nPara,
+        void FireEvent( sal_Int32 nPara,
                         const sal_Int16 nEventId,
                         const ::com::sun::star::uno::Any& rNewValue = ::com::sun::star::uno::Any(),
                         const ::com::sun::star::uno::Any& rOldValue = ::com::sun::star::uno::Any() ) const;
 
         static sal_Bool IsReferencable( WeakPara::HardRefType aChild );
-        sal_Bool IsReferencable( sal_uInt32 nChild ) const;
+        sal_Bool IsReferencable( sal_Int32 nChild ) const;
         static void ShutdownPara( const WeakChild& rChild );
 
         Child CreateChild( sal_Int32                                                                                        nChild,
                            const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >& xFrontEnd,
                            SvxEditSourceAdapter&                                                                            rEditSource,
-                           sal_uInt32                                                                                       nParagraphIndex );
+                           sal_Int32                                                                                       nParagraphIndex );
 
-        WeakChild GetChild( sal_uInt32 nParagraphIndex ) const;
+        WeakChild GetChild( sal_Int32 nParagraphIndex ) const;
 
         // forwarder to all paragraphs
         /// Make all children active and editable (or off)
@@ -217,7 +217,7 @@ namespace accessibility
             @param nEndPara
             Index of first paragraph to stop with releasing
          */
-        void Release( sal_uInt32 nStartPara, sal_uInt32 nEndPara );
+        void Release( sal_Int32 nStartPara, sal_Int32 nEndPara );
 
         /** Fire event for the given range of paragraphs
 
@@ -229,8 +229,8 @@ namespace accessibility
             @param nEndPara
             Index of first paragraph to stop with event firing
          */
-        void FireEvent( sal_uInt32 nStartPara,
-                        sal_uInt32 nEndPara,
+        void FireEvent( sal_Int32 nStartPara,
+                        sal_Int32 nEndPara,
                         const sal_Int16 nEventId,
                         const ::com::sun::star::uno::Any& rNewValue = ::com::sun::star::uno::Any(),
                         const ::com::sun::star::uno::Any& rOldValue = ::com::sun::star::uno::Any() ) const;
@@ -309,7 +309,7 @@ namespace accessibility
         void InitChild( AccessibleEditableTextPara&     rChild,
                         SvxEditSourceAdapter&           rEditSource,
                         sal_Int32                       nChild,
-                        sal_uInt32                      nParagraphIndex ) const;
+                        sal_Int32                       nParagraphIndex ) const;
 
         // vector the size of the paragraph number of the underlying EditEngine
         VectorOfChildren maChildren;
diff --git a/editeng/inc/editeng/editdata.hxx b/editeng/inc/editeng/editdata.hxx
index ca2c1b7..025db17 100644
--- a/editeng/inc/editeng/editdata.hxx
+++ b/editeng/inc/editeng/editdata.hxx
@@ -40,10 +40,14 @@ enum EVAnchorMode       {
             ANCHOR_TOP_HCENTER, ANCHOR_VCENTER_HCENTER, ANCHOR_BOTTOM_HCENTER,
             ANCHOR_TOP_RIGHT,   ANCHOR_VCENTER_RIGHT,   ANCHOR_BOTTOM_RIGHT };
 
-#define EE_PARA_NOT_FOUND       0xFFFF
-#define EE_PARA_APPEND          0xFFFF
-#define EE_PARA_ALL             0xFFFF
-#define EE_INDEX_NOT_FOUND      0xFFFF
+#define EE_PARA_NOT_FOUND       SAL_MAX_INT32
+#define EE_PARA_APPEND          SAL_MAX_INT32
+#define EE_PARA_ALL             SAL_MAX_INT32
+#define EE_PARA_MAX_COUNT       SAL_MAX_INT32
+
+#define EE_INDEX_NOT_FOUND      SAL_MAX_UINT16
+#define EE_TEXTPOS_ALL          SAL_MAX_UINT16
+#define EE_TEXTPOS_MAX_COUNT    SAL_MAX_UINT16
 
 EDITENG_DLLPUBLIC extern const size_t EE_APPEND;
 
@@ -96,7 +100,7 @@ class SfxStyleSheet;
 
 struct EPosition
 {
-    sal_uInt16      nPara;
+    sal_Int32   nPara;
     xub_StrLen  nIndex;
 
     EPosition() :
@@ -105,7 +109,7 @@ struct EPosition
     {
     }
 
-    EPosition( sal_uInt16 nPara_, xub_StrLen nPos_ ) :
+    EPosition( sal_Int32 nPara_, xub_StrLen nPos_ ) :
         nPara( nPara_ ),
         nIndex( nPos_ )
     {
@@ -114,14 +118,14 @@ struct EPosition
 
 struct ESelection
 {
-    sal_uInt16      nStartPara;
+    sal_Int32   nStartPara;
     xub_StrLen  nStartPos;
-    sal_uInt16      nEndPara;
+    sal_Int32   nEndPara;
     xub_StrLen  nEndPos;
 
     ESelection() : nStartPara( 0 ), nStartPos( 0 ), nEndPara( 0 ), nEndPos( 0 ) {}
 
-    ESelection( sal_uInt16 nStPara, xub_StrLen nStPos, sal_uInt16 nEPara, xub_StrLen nEPos ) :
+    ESelection( sal_Int32 nStPara, xub_StrLen nStPos, sal_Int32 nEPara, xub_StrLen nEPos ) :
         nStartPara( nStPara ),
         nStartPos( nStPos ),
         nEndPara( nEPara ),
@@ -129,7 +133,7 @@ struct ESelection
     {
     }
 
-    ESelection( sal_uInt16 nPara, xub_StrLen nPos ) :
+    ESelection( sal_Int32 nPara, xub_StrLen nPos ) :
         nStartPara( nPara ),
         nStartPos( nPos ),
         nEndPara( nPara ),
@@ -198,7 +202,7 @@ inline void ESelection::Adjust()
 
     if ( bSwap )
     {
-        sal_uInt16 nSPar = nStartPara; sal_uInt16 nSPos = nStartPos;
+        sal_Int32  nSPar = nStartPara; sal_uInt16 nSPos = nStartPos;
         nStartPara = nEndPara; nStartPos = nEndPos;
         nEndPara = nSPar; nEndPos = nSPos;
     }
@@ -211,7 +215,7 @@ struct EDITENG_DLLPUBLIC EFieldInfo
     EPosition       aPosition;
 
     EFieldInfo();
-    EFieldInfo( const SvxFieldItem& rFieldItem, sal_uInt16 nPara, sal_uInt16 nPos );
+    EFieldInfo( const SvxFieldItem& rFieldItem, sal_Int32 nPara, sal_uInt16 nPos );
     ~EFieldInfo();
 
     EFieldInfo( const EFieldInfo& );
@@ -279,18 +283,18 @@ struct EECharAttrib
 {
     const SfxPoolItem*  pAttr;
 
-    sal_uInt16              nPara;
+    sal_Int32           nPara;
     xub_StrLen          nStart;
     xub_StrLen          nEnd;
 };
 
 struct MoveParagraphsInfo
 {
-    sal_uInt16  nStartPara;
-    sal_uInt16  nEndPara;
-    sal_uInt16  nDestPara;
+    sal_Int32  nStartPara;
+    sal_Int32  nEndPara;
+    sal_Int32  nDestPara;
 
-    MoveParagraphsInfo( sal_uInt16 nS, sal_uInt16 nE, sal_uInt16 nD )
+    MoveParagraphsInfo( sal_Int32 nS, sal_Int32 nE, sal_Int32 nD )
         { nStartPara = nS; nEndPara = nE; nDestPara = nD; }
 };
 
@@ -300,10 +304,10 @@ struct MoveParagraphsInfo
 struct PasteOrDropInfos
 {
     sal_uInt16  nAction;
-    sal_uInt16  nStartPara;
-    sal_uInt16  nEndPara;
+    sal_Int32   nStartPara;
+    sal_Int32   nEndPara;
 
-    PasteOrDropInfos() : nAction(0), nStartPara(0xFFFF), nEndPara(0xFFFF)  {}
+    PasteOrDropInfos() : nAction(0), nStartPara(0xFFFFFFFF), nEndPara(0xFFFFFFFF)  {}
 };
 
 enum EENotifyType
@@ -354,10 +358,10 @@ struct EENotify
     EditEngine*     pEditEngine;
     EditView*       pEditView;
 
-    sal_uInt16          nParagraph; // only valid in PARAGRAPHINSERTED/EE_NOTIFY_PARAGRAPHREMOVED
+    sal_Int32       nParagraph; // only valid in PARAGRAPHINSERTED/EE_NOTIFY_PARAGRAPHREMOVED
 
-    sal_uInt16          nParam1;
-    sal_uInt16          nParam2;
+    sal_Int32       nParam1;
+    sal_Int32       nParam2;
 
     EENotify( EENotifyType eType )
         { eNotificationType = eType; pEditEngine = NULL; pEditView = NULL; nParagraph = EE_PARA_NOT_FOUND; nParam1 = 0; nParam2 = 0; }
diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx
index 0eb4b12..126eaf9 100644
--- a/editeng/inc/editeng/editeng.hxx
+++ b/editeng/inc/editeng/editeng.hxx
@@ -223,7 +223,7 @@ public:
 
     sal_uInt16          GetScriptType( const ESelection& rSelection ) const;
     LanguageType    GetLanguage(const EditPaM& rPaM) const;
-    LanguageType    GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const;
+    LanguageType    GetLanguage( sal_Int32 nPara, sal_uInt16 nPos ) const;
 
     void            TransliterateText( const ESelection& rSelection, sal_Int32 nTransliterationMode );
     EditSelection   TransliterateText( const EditSelection& rSelection, sal_Int32 nTransliterationMode );
@@ -251,23 +251,23 @@ public:
     sal_uInt32      GetTextHeightNTP() const;
     sal_uInt32      CalcTextWidth();
 
-    String          GetText( sal_uInt16 nParagraph ) const;
-    xub_StrLen      GetTextLen( sal_uInt16 nParagraph ) const;
-    sal_uInt32      GetTextHeight( sal_uInt16 nParagraph ) const;
+    String          GetText( sal_Int32 nParagraph ) const;
+    xub_StrLen      GetTextLen( sal_Int32 nParagraph ) const;
+    sal_uInt32      GetTextHeight( sal_Int32 nParagraph ) const;
 
-    sal_uInt16          GetParagraphCount() const;
+    sal_Int32       GetParagraphCount() const;
 
-    sal_uInt16          GetLineCount( sal_uInt16 nParagraph ) const;
-    xub_StrLen      GetLineLen( sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
-    void            GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
-    sal_uInt16          GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
-    sal_uInt32      GetLineHeight( sal_uInt16 nParagraph, sal_uInt16 nLine = 0 );
-    ParagraphInfos  GetParagraphInfos( sal_uInt16 nPara );
-    sal_uInt16          FindParagraph( long nDocPosY );
+    sal_uInt16      GetLineCount( sal_Int32 nParagraph ) const;
+    xub_StrLen      GetLineLen( sal_Int32 nParagraph, sal_uInt16 nLine ) const;
+    void            GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_Int32 nParagraph, sal_uInt16 nLine ) const;
+    sal_uInt16      GetLineNumberAtIndex( sal_Int32 nPara, sal_uInt16 nIndex ) const;
+    sal_uInt32      GetLineHeight( sal_Int32 nParagraph, sal_uInt16 nLine = 0 );
+    ParagraphInfos  GetParagraphInfos( sal_Int32 nPara );
+    sal_Int32       FindParagraph( long nDocPosY );
     EPosition       FindDocPosition( const Point& rDocPos ) const;
     Rectangle       GetCharacterBounds( const EPosition& rPos ) const;
 
-    String          GetWord( sal_uInt16 nPara, xub_StrLen nIndex );
+    String          GetWord( sal_Int32 nPara, xub_StrLen nIndex );
 
     ESelection      GetWord( const ESelection& rSelection, sal_uInt16 nWordType ) const;
 
@@ -275,33 +275,33 @@ public:
     void            SetText( const String& rStr );
 
     EditTextObject* CreateTextObject();
-    EditTextObject* CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas = 1 );
+    EditTextObject* CreateTextObject( sal_Int32 nPara, sal_Int32 nParas = 1 );
     EditTextObject* CreateTextObject( const ESelection& rESelection );
     void            SetText( const EditTextObject& rTextObject );
 
-    void            RemoveParagraph( sal_uInt16 nPara );
-    void            InsertParagraph( sal_uInt16 nPara, const EditTextObject& rTxtObj );
-    void            InsertParagraph( sal_uInt16 nPara, const String& rText);
+    void            RemoveParagraph( sal_Int32 nPara );
+    void            InsertParagraph( sal_Int32 nPara, const EditTextObject& rTxtObj );
+    void            InsertParagraph( sal_Int32 nPara, const String& rText);
 
-    void            SetText( sal_uInt16 nPara, const String& rText);
+    void            SetText( sal_Int32 nPara, const String& rText);
 
-    virtual void                SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet );
-    virtual const SfxItemSet&   GetParaAttribs( sal_uInt16 nPara ) const;
+    virtual void                SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet );
+    virtual const SfxItemSet&   GetParaAttribs( sal_Int32 nPara ) const;
 
-    void                GetCharAttribs( sal_uInt16 nPara, std::vector<EECharAttrib>& rLst ) const;
+    void            GetCharAttribs( sal_Int32 nPara, std::vector<EECharAttrib>& rLst ) const;
 
-    SfxItemSet          GetAttribs( sal_uInt16 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags = 0xFF ) const;
-    SfxItemSet          GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All );
+    SfxItemSet      GetAttribs( sal_Int32 nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_uInt8 nFlags = 0xFF ) const;
+    SfxItemSet      GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All );
 
-    sal_Bool                HasParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich ) const;
-    const SfxPoolItem&  GetParaAttrib( sal_uInt16 nPara, sal_uInt16 nWhich );
+    sal_Bool        HasParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const;
+    const SfxPoolItem&  GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich );
 
-    Font            GetStandardFont( sal_uInt16 nPara );
-    SvxFont         GetStandardSvxFont( sal_uInt16 nPara );
+    Font            GetStandardFont( sal_Int32 nPara );
+    SvxFont         GetStandardSvxFont( sal_Int32 nPara );
 
     void            RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
 
-    void            ShowParagraph( sal_uInt16 nParagraph, sal_Bool bShow = sal_True );
+    void            ShowParagraph( sal_Int32 nParagraph, sal_Bool bShow = sal_True );
 
     ::svl::IUndoManager&
                     GetUndoManager();
@@ -328,10 +328,10 @@ public:
     sal_Bool            IsInSelectionMode() const;
 
     void            StripPortions();
-    void            GetPortions( sal_uInt16 nPara, std::vector<sal_uInt16>& rList );
+    void            GetPortions( sal_Int32 nPara, std::vector<sal_uInt16>& rList );
 
-    long            GetFirstLineStartX( sal_uInt16 nParagraph );
-    Point           GetDocPosTopLeft( sal_uInt16 nParagraph );
+    long            GetFirstLineStartX( sal_Int32 nParagraph );
+    Point           GetDocPosTopLeft( sal_Int32 nParagraph );
     Point           GetDocPos( const Point& rPaperPos ) const;
     sal_Bool            IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder = 0 );
 
@@ -362,14 +362,14 @@ public:
     sal_uInt32      GetControlWord() const;
 
     void            QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel );
-    void            QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 );
+    void            QuickRemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich = 0 );
     void            QuickMarkInvalid( const ESelection& rSel );
     void            QuickFormatDoc( sal_Bool bFull = sal_False );
     void            QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
     void            QuickInsertLineBreak( const ESelection& rSel );
     void            QuickInsertText( const String& rText, const ESelection& rSel );
     void            QuickDelete( const ESelection& rSel );
-    void            QuickMarkToBeRepainted( sal_uInt16 nPara );
+    void            QuickMarkToBeRepainted( sal_Int32 nPara );
 
     void            SetGlobalCharStretching( sal_uInt16 nX = 100, sal_uInt16 nY = 100 );
     void            GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY );
@@ -381,9 +381,9 @@ public:
     SfxStyleSheetPool*  GetStyleSheetPool();
 
     void SetStyleSheet(const EditSelection& aSel, SfxStyleSheet* pStyle);
-    void                SetStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pStyle );
-    const SfxStyleSheet* GetStyleSheet( sal_uInt16 nPara ) const;
-    SfxStyleSheet* GetStyleSheet( sal_uInt16 nPara );
+    void                 SetStyleSheet( sal_Int32 nPara, SfxStyleSheet* pStyle );
+    const SfxStyleSheet* GetStyleSheet( sal_Int32 nPara ) const;
+    SfxStyleSheet* GetStyleSheet( sal_Int32 nPara );
 
     void            SetWordDelimiters( const String& rDelimiters );
     String          GetWordDelimiters() const;
@@ -429,10 +429,10 @@ public:
     bool UpdateFieldsOnly();
     void            RemoveFields( sal_Bool bKeepFieldText, TypeId aType = NULL );
 
-    sal_uInt16          GetFieldCount( sal_uInt16 nPara ) const;
-    EFieldInfo      GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const;
+    sal_uInt16      GetFieldCount( sal_Int32 nPara ) const;
+    EFieldInfo      GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) const;
 
-    sal_Bool            IsRightToLeft( sal_uInt16 nPara ) const;
+    sal_Bool        IsRightToLeft( sal_Int32 nPara ) const;
 
     ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >
                     CreateTransferable( const ESelection& rSelection ) const;
@@ -443,17 +443,17 @@ public:
     void            SetBeginPasteOrDropHdl( const Link& rLink );
     void            SetEndPasteOrDropHdl( const Link& rLink );
 
-    virtual void    PaintingFirstLine( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev );
-    virtual void    ParagraphInserted( sal_uInt16 nNewParagraph );
-    virtual void    ParagraphDeleted( sal_uInt16 nDeletedParagraph );
-    virtual void    ParagraphConnected( sal_uInt16 nLeftParagraph, sal_uInt16 nRightParagraph );
-    virtual void    ParaAttribsChanged( sal_uInt16 nParagraph );
+    virtual void    PaintingFirstLine( sal_Int32 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev );
+    virtual void    ParagraphInserted( sal_Int32 nNewParagraph );
+    virtual void    ParagraphDeleted( sal_Int32 nDeletedParagraph );
+    virtual void    ParagraphConnected( sal_Int32 nLeftParagraph, sal_Int32 nRightParagraph );
+    virtual void    ParaAttribsChanged( sal_Int32 nParagraph );
     virtual void    StyleSheetChanged( SfxStyleSheet* pStyle );
-    virtual void    ParagraphHeightChanged( sal_uInt16 nPara );
+    virtual void    ParagraphHeightChanged( sal_Int32 nPara );
 
     virtual void DrawingText(
         const Point& rStartPos, const String& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen, const sal_Int32* pDXArray,
-        const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
+        const SvxFont& rFont, sal_Int32 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
         const EEngineData::WrongSpellVector* pWrongSpellVector,
         const SvxFieldData* pFieldData,
         bool bEndOfLine,
@@ -465,22 +465,22 @@ public:
 
     virtual void DrawingTab(
         const Point& rStartPos, long nWidth, const String& rChar,
-        const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
+        const SvxFont& rFont, sal_Int32 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
         bool bEndOfLine,
         bool bEndOfParagraph,
         const Color& rOverlineColor,
         const Color& rTextLineColor);
     virtual String  GetUndoComment( sal_uInt16 nUndoId ) const;
-    virtual sal_Bool    FormattingParagraph( sal_uInt16 nPara );
+    virtual sal_Bool    FormattingParagraph( sal_Int32 nPara );
     virtual sal_Bool    SpellNextDocument();
-    virtual void    FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
-    virtual void    FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
-    virtual String  CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor );
+    virtual void    FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos );
+    virtual void    FieldSelected( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos );
+    virtual String  CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor );
 
     // to be overloaded if access to bullet information needs to be provided
-    virtual const SvxNumberFormat * GetNumberFormat( sal_uInt16 nPara ) const;
+    virtual const SvxNumberFormat * GetNumberFormat( sal_Int32 nPara ) const;
 
-    virtual Rectangle GetBulletArea( sal_uInt16 nPara );
+    virtual Rectangle GetBulletArea( sal_Int32 nPara );
 
     static SfxItemPool* CreatePool( sal_Bool bLoadRefCounts = sal_True );
     static SfxItemPool& GetGlobalItemPool();
@@ -543,8 +543,8 @@ public:
     ESelection CreateESelection(const EditSelection& rSel);
     EditSelection CreateSelection(const ESelection& rSel);
 
-    const SfxItemSet& GetBaseParaAttribs(sal_uInt16 nPara) const;
-    void SetParaAttribsOnly(sal_uInt16 nPara, const SfxItemSet& rSet);
+    const SfxItemSet& GetBaseParaAttribs(sal_Int32 nPara) const;
+    void SetParaAttribsOnly(sal_Int32 nPara, const SfxItemSet& rSet);
     void SetAttribs(const EditSelection& rSel, const SfxItemSet& rSet, sal_uInt8 nSpecial = 0);
 
     String GetSelected(const EditSelection& rSel, const LineEnd eParaSep = LINEEND_LF) const;
@@ -552,7 +552,7 @@ public:
 
     sal_uInt16 GetScriptType(const EditSelection& rSel) const;
 
-    void RemoveParaPortion(size_t nNode);
+    void RemoveParaPortion(sal_Int32 nNode);
 
     void SetCallParaInsertedOrDeleted(bool b);
     bool IsCallParaInsertedOrDeleted() const;
@@ -560,15 +560,15 @@ public:
     void AppendDeletedNodeInfo(DeletedNodeInfo* pInfo);
     void UpdateSelections();
 
-    void InsertContent(ContentNode* pNode, sal_uInt16 nPos);
-    EditPaM SplitContent(sal_uInt16 nNode, sal_uInt16 nSepPos);
-    EditPaM ConnectContents(sal_uInt16 nLeftNode, bool bBackward);
+    void InsertContent(ContentNode* pNode, sal_Int32 nPos);
+    EditPaM SplitContent(sal_Int32 nNode, sal_uInt16 nSepPos);
+    EditPaM ConnectContents(sal_Int32 nLeftNode, bool bBackward);
 
     EditPaM InsertFeature(const EditSelection& rEditSelection, const SfxPoolItem& rItem);
 
-    EditSelection MoveParagraphs(const Range& rParagraphs, sal_uInt16 nNewPos, EditView* pCurView);
+    EditSelection MoveParagraphs(const Range& rParagraphs, sal_Int32 nNewPos, EditView* pCurView);
 
-    void RemoveCharAttribs(sal_uInt16 nPara, sal_uInt16 nWhich = 0, bool bRemoveFeatures = false);
+    void RemoveCharAttribs(sal_Int32 nPara, sal_uInt16 nWhich = 0, bool bRemoveFeatures = false);
     void RemoveCharAttribs(const EditSelection& rSel, bool bRemoveParaAttribs, sal_uInt16 nWhich = 0);
 
     ViewsType& GetEditViews();
diff --git a/editeng/inc/editeng/editobj.hxx b/editeng/inc/editeng/editobj.hxx
index 2730b46..7d5622e 100644
--- a/editeng/inc/editeng/editobj.hxx
+++ b/editeng/inc/editeng/editobj.hxx
@@ -79,12 +79,12 @@ public:
     static EditTextObject*  Create( SvStream& rIStream,
                                 SfxItemPool* pGlobalTextObjectPool = 0 );
 
-    virtual size_t GetParagraphCount() const;
+    virtual sal_Int32 GetParagraphCount() const;
 
-    virtual String GetText(size_t nParagraph) const;
-    virtual void Insert(const EditTextObject& rObj, size_t nPara);
-    virtual void RemoveParagraph(size_t nPara);
-    virtual EditTextObject* CreateTextObject(size_t nPara, size_t nParas = 1) const;
+    virtual String GetText(sal_Int32 nParagraph) const;
+    virtual void Insert(const EditTextObject& rObj, sal_Int32 nPara);
+    virtual void RemoveParagraph(sal_Int32 nPara);
+    virtual EditTextObject* CreateTextObject(sal_Int32 nPara, sal_Int32 nParas = 1) const;
 
     virtual sal_Bool        HasPortionInfo() const;
     virtual void        ClearPortionInfo();
@@ -92,7 +92,7 @@ public:
     virtual sal_Bool        HasOnlineSpellErrors() const;
 
     virtual sal_Bool        HasCharAttribs( sal_uInt16 nWhich = 0 ) const;
-    virtual void        GetCharAttribs( sal_uInt16 nPara, std::vector<EECharAttrib>& rLst ) const;
+    virtual void        GetCharAttribs( sal_Int32 nPara, std::vector<EECharAttrib>& rLst ) const;
 
     virtual sal_Bool        RemoveCharAttribs( sal_uInt16 nWhich = 0 );
     virtual sal_Bool        RemoveParaAttribs( sal_uInt16 nWhich = 0 );
@@ -103,12 +103,12 @@ public:
     virtual const SvxFieldItem* GetField() const;
     virtual sal_Bool        HasField( TypeId aType = NULL ) const;
 
-    virtual SfxItemSet GetParaAttribs(size_t nPara) const;
-    virtual void SetParaAttribs(size_t nPara, const SfxItemSet& rAttribs);
+    virtual SfxItemSet GetParaAttribs(sal_Int32 nPara) const;
+    virtual void SetParaAttribs(sal_Int32 nPara, const SfxItemSet& rAttribs);
 
     virtual sal_Bool        HasStyleSheet( const XubString& rName, SfxStyleFamily eFamily ) const;
-    virtual void GetStyleSheet(size_t nPara, String& rName, SfxStyleFamily& eFamily) const;
-    virtual void SetStyleSheet(size_t nPara, const String& rName, const SfxStyleFamily& eFamily);
+    virtual void GetStyleSheet(sal_Int32 nPara, String& rName, SfxStyleFamily& eFamily) const;
+    virtual void SetStyleSheet(sal_Int32 nPara, const String& rName, const SfxStyleFamily& eFamily);
     virtual sal_Bool        ChangeStyleSheets(  const XubString& rOldName, SfxStyleFamily eOldFamily,
                                             const XubString& rNewName, SfxStyleFamily eNewFamily );
     virtual void        ChangeStyleSheetName( SfxStyleFamily eFamily, const XubString& rOldName, const XubString& rNewName );
diff --git a/editeng/inc/editeng/editview.hxx b/editeng/inc/editeng/editview.hxx
index aea70fd..8a4a716 100644
--- a/editeng/inc/editeng/editview.hxx
+++ b/editeng/inc/editeng/editview.hxx
@@ -146,15 +146,15 @@ public:
     void            Redo();
 
     // especially for Oliver Specht
-    Point           GetWindowPosTopLeft( sal_uInt16 nParagraph );
-    void            MoveParagraphs( Range aParagraphs, sal_uInt16 nNewPos );
+    Point           GetWindowPosTopLeft( sal_Int32 nParagraph );
+    void            MoveParagraphs( Range aParagraphs, sal_Int32 nNewPos );
     void            MoveParagraphs( long nDiff );
 
     const SfxItemSet&   GetEmptyItemSet();
     SfxItemSet          GetAttribs();
     void                SetAttribs( const SfxItemSet& rSet );
     void                RemoveAttribs( sal_Bool bRemoveParaAttribs = sal_False, sal_uInt16 nWhich = 0 );
-    void                RemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 );
+    void                RemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich = 0 );
     void                RemoveAttribsKeepLanguages( sal_Bool bRemoveParaAttribs = sal_False );
 
     sal_uLong           Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect = sal_False, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
@@ -199,8 +199,8 @@ public:
 
     void                InsertField( const SvxFieldItem& rFld );
     const SvxFieldItem* GetFieldUnderMousePointer() const;
-    const SvxFieldItem* GetFieldUnderMousePointer( sal_uInt16& nPara, xub_StrLen& nPos ) const;
-    const SvxFieldItem* GetField( const Point& rPos, sal_uInt16* pnPara = NULL, xub_StrLen* pnPos = NULL ) const;
+    const SvxFieldItem* GetFieldUnderMousePointer( sal_Int32& nPara, xub_StrLen& nPos ) const;
+    const SvxFieldItem* GetField( const Point& rPos, sal_Int32* pnPara = NULL, xub_StrLen* pnPos = NULL ) const;
 
     const SvxFieldItem* GetFieldAtSelection() const;
 
diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx
index 61e6a41..41d6b32 100644
--- a/editeng/inc/editeng/outliner.hxx
+++ b/editeng/inc/editeng/outliner.hxx
@@ -157,10 +157,10 @@ private:
 
 struct ParaRange
 {
-    sal_uInt16  nStartPara;
-    sal_uInt16  nEndPara;
+    sal_Int32  nStartPara;
+    sal_Int32  nEndPara;
 
-            ParaRange( sal_uInt16 nS, sal_uInt16 nE ) { nStartPara = nS, nEndPara = nE; }
+            ParaRange( sal_Int32 nS, sal_Int32 nE ) { nStartPara = nS, nEndPara = nE; }
 
     void    Adjust();
     sal_uInt16  Len() const { return 1 + ( ( nEndPara > nStartPara ) ? (nEndPara-nStartPara) : (nStartPara-nEndPara) ); }
@@ -170,7 +170,7 @@ inline void ParaRange::Adjust()
 {
     if ( nStartPara > nEndPara )
     {
-        sal_uInt16 nTmp = nStartPara;
+        sal_Int32 nTmp = nStartPara;
         nStartPara = nEndPara;
         nEndPara = nTmp;
     }
@@ -190,9 +190,9 @@ private:
     sal_Bool        bInDragMode;
     Point       aDDStartPosRef;
     Point       aDDStartPosPix;
-    sal_uLong       nDDStartPara;
-    sal_uLong       nDDStartParaVisChildCount;
-    sal_uLong       nDDCurPara;
+    sal_Int32       nDDStartPara;
+    sal_Int32       nDDStartParaVisChildCount;
+    sal_Int32       nDDCurPara;
     sal_uInt16      nDDStartDepth;
     sal_uInt16      nDDCurDepth;
     sal_uInt16      nDDMaxDepth;
@@ -218,16 +218,16 @@ private:
 
 #ifdef _OUTLINER_CXX
 
-    EDITENG_DLLPRIVATE void         ImplExpandOrCollaps( sal_uInt16 nStartPara, sal_uInt16 nEndPara, sal_Bool bExpand );
+    EDITENG_DLLPRIVATE void         ImplExpandOrCollaps( sal_Int32 nStartPara, sal_Int32 nEndPara, sal_Bool bExpand );
 
-    EDITENG_DLLPRIVATE sal_uLong       ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget);
-    EDITENG_DLLPRIVATE void        ImpToggleExpand( Paragraph* pParentPara );
+    EDITENG_DLLPRIVATE sal_Int32    ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget);
+    EDITENG_DLLPRIVATE void         ImpToggleExpand( Paragraph* pParentPara );
     EDITENG_DLLPRIVATE ParaRange    ImpGetSelectedParagraphs( sal_Bool bIncludeHiddenChildren );
 
-    EDITENG_DLLPRIVATE Pointer     ImpGetMousePointer( MouseTarget eTarget );
-    EDITENG_DLLPRIVATE sal_uInt16      ImpInitPaste( sal_uLong& rStart );
-    EDITENG_DLLPRIVATE void        ImpPasted( sal_uLong nStart, sal_uLong nPrevParaCount, sal_uInt16 nSize);
-    EDITENG_DLLPRIVATE sal_uInt16      ImpCalcSelectedPages( sal_Bool bIncludeFirstSelected );
+    EDITENG_DLLPRIVATE Pointer      ImpGetMousePointer( MouseTarget eTarget );
+    EDITENG_DLLPRIVATE sal_Int32    ImpInitPaste( sal_Int32& rStart );
+    EDITENG_DLLPRIVATE void         ImpPasted( sal_Int32 nStart, sal_Int32 nPrevParaCount, sal_Int32 nSize);
+    EDITENG_DLLPRIVATE sal_Int32    ImpCalcSelectedPages( sal_Bool bIncludeFirstSelected );
     EDITENG_DLLPRIVATE sal_Bool        ImpIsIndentingPages();
 
 #endif
@@ -265,12 +265,12 @@ public:
     void        CreateSelectionList (std::vector<Paragraph*> &aSelList) ;
 
     // Retruns the number of selected paragraphs
-    sal_uLong       Select( Paragraph* pParagraph,
+    sal_Int32   Select( Paragraph* pParagraph,
                     sal_Bool bSelect=sal_True,
                     sal_Bool bWChildren=sal_True);
 
     String      GetSelected() const;
-    void        SelectRange( sal_uLong nFirst, sal_uInt16 nCount );
+    void        SelectRange( sal_Int32 nFirst, sal_Int32 nCount );
     void        SetAttribs( const SfxItemSet& );
     void        Indent( short nDiff );
     void        AdjustDepth( short nDX );   // Later replace with Indent!
@@ -367,7 +367,7 @@ public:
     const String&       mrText;
     sal_uInt16          mnTextStart;
     sal_uInt16          mnTextLen;
-    sal_uInt16          mnPara;
+    sal_Int32           mnPara;
     xub_StrLen          mnIndex;
     const SvxFont&      mrFont;
     const sal_Int32*    mpDXArray;
@@ -397,7 +397,7 @@ public:
         sal_uInt16 nTxtStart,
         sal_uInt16 nTxtLen,
         const SvxFont& rFnt,
-        sal_uInt16 nPar,
+        sal_Int32 nPar,
         xub_StrLen nIdx,
         const sal_Int32* pDXArr,
         const EEngineData::WrongSpellVector* pWrongSpellVector,
@@ -452,14 +452,14 @@ public:
 
 struct EDITENG_DLLPUBLIC PaintFirstLineInfo
 {
-    sal_uInt16 mnPara;
+    sal_Int32 mnPara;
     const Point& mrStartPos;
     long mnBaseLineY;
     const Point& mrOrigin;
     short mnOrientation;
     OutputDevice* mpOutDev;
 
-    PaintFirstLineInfo( sal_uInt16 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev )
+    PaintFirstLineInfo( sal_Int32 nPara, const Point& rStartPos, long nBaseLineY, const Point& rOrigin, short nOrientation, OutputDevice* pOutDev )
         : mnPara( nPara ), mrStartPos( rStartPos ), mnBaseLineY( nBaseLineY ), mrOrigin( rOrigin ), mnOrientation( nOrientation ), mpOutDev( pOutDev )
     {}
 };
@@ -477,7 +477,7 @@ private:
 
     String              aRepresentation;
 
-    sal_uInt16              nPara;
+    sal_Int32           nPara;
     xub_StrLen          nPos;
     sal_Bool                bSimpleClick;
 
@@ -487,7 +487,7 @@ private:
     SdrPage*            mpSdrPage;
 
 public:
-                    EditFieldInfo( Outliner* pOutl, const SvxFieldItem& rFItem, sal_uInt16 nPa, xub_StrLen nPo )
+                    EditFieldInfo( Outliner* pOutl, const SvxFieldItem& rFItem, sal_Int32 nPa, xub_StrLen nPo )
                         : rFldItem( rFItem )
                     {
                         pOutliner = pOutl;
@@ -515,7 +515,7 @@ public:
     void            ClearFldColor()
                         { delete pFldColor; pFldColor = 0; }
 
-    sal_uInt16          GetPara() const { return nPara; }
+    sal_Int32           GetPara() const { return nPara; }
     xub_StrLen          GetPos() const { return nPos; }
 
     sal_Bool            IsSimpleClick() const { return bSimpleClick; }
@@ -536,7 +536,7 @@ struct EBulletInfo
     String      aText;
     SvxFont     aFont;
     Graphic     aGraphic;
-    sal_uInt16      nParagraph;
+    sal_Int32   nParagraph;
     Rectangle   aBounds;
 
     EBulletInfo() : bVisible( sal_False ), nType( 0 ), nParagraph( EE_PARA_NOT_FOUND ) {}
@@ -569,7 +569,7 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
     ViewList            aViewList;
 
     Paragraph*          pHdlParagraph;
-    sal_uLong               mnFirstSelPage;
+    sal_Int32           mnFirstSelPage;
     Link                aDrawPortionHdl;
     Link                aDrawBulletHdl;
     Link                aExpandHdl;
@@ -587,11 +587,11 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
     Link                maBeginPasteOrDropHdl;
     Link                maEndPasteOrDropHdl;
 
-    sal_Int16           nDepthChangedHdlPrevDepth;
-    sal_uInt16              mnDepthChangeHdlPrevFlags;
+    sal_Int32           nDepthChangedHdlPrevDepth;
+    sal_uInt16          mnDepthChangeHdlPrevFlags;
     sal_Int16           nMaxDepth;
     const sal_Int16     nMinDepth;
-    sal_uInt16              nFirstPage;
+    sal_Int32           nFirstPage;
 
     sal_uInt16              nOutlinerMode;
 
@@ -611,53 +611,53 @@ class EDITENG_DLLPUBLIC Outliner : public SfxBroadcaster
     DECL_LINK(              BeginPasteOrDropHdl, PasteOrDropInfos* );
     DECL_LINK(              EndPasteOrDropHdl, PasteOrDropInfos* );
     DECL_LINK(              EditEngineNotifyHdl, EENotify* );
-    void                    ImplCheckParagraphs( sal_uInt16 nStart, sal_uInt16 nEnd );
-    sal_Bool                    ImplHasBullet( sal_uInt16 nPara ) const;
-    Size                    ImplGetBulletSize( sal_uInt16 nPara );
-    sal_uInt16              ImplGetNumbering( sal_uInt16 nPara, const SvxNumberFormat* pParaFmt );
-    void                    ImplCalcBulletText( sal_uInt16 nPara, sal_Bool bRecalcLevel, sal_Bool bRecalcChildren );
-    String                  ImplGetBulletText( sal_uInt16 nPara );
-    void                    ImplCheckNumBulletItem( sal_uInt16 nPara );
-    void                    ImplInitDepth( sal_uInt16 nPara, sal_Int16 nDepth, sal_Bool bCreateUndo, sal_Bool bUndoAction = sal_False );
-    void                    ImplSetLevelDependendStyleSheet( sal_uInt16 nPara, SfxStyleSheet* pLevelStyle = NULL );
+    void                    ImplCheckParagraphs( sal_Int32 nStart, sal_Int32 nEnd );
+    sal_Bool                ImplHasBullet( sal_Int32 nPara ) const;
+    Size                    ImplGetBulletSize( sal_Int32 nPara );
+    sal_uInt16              ImplGetNumbering( sal_Int32 nPara, const SvxNumberFormat* pParaFmt );
+    void                    ImplCalcBulletText( sal_Int32 nPara, sal_Bool bRecalcLevel, sal_Bool bRecalcChildren );
+    String                  ImplGetBulletText( sal_Int32 nPara );
+    void                    ImplCheckNumBulletItem( sal_Int32 nPara );
+    void                    ImplInitDepth( sal_Int32 nPara, sal_Int16 nDepth, sal_Bool bCreateUndo, sal_Bool bUndoAction = sal_False );
+    void                    ImplSetLevelDependendStyleSheet( sal_Int32 nPara, SfxStyleSheet* pLevelStyle = NULL );
 
     void                    ImplBlockInsertionCallbacks( sal_Bool b );
 
-    void                ImplCheckStyleSheet( sal_uInt16 nPara, sal_Bool bReplaceExistingStyle );
-    void                ImpRecalcBulletIndent( sal_uLong nPara );
+    void                ImplCheckStyleSheet( sal_Int32 nPara, sal_Bool bReplaceExistingStyle );
+    void                ImpRecalcBulletIndent( sal_Int32 nPara );
 
-    const SvxBulletItem& ImpGetBullet( sal_uLong nPara, sal_uInt16& );
-    void        ImpFilterIndents( sal_uLong nFirstPara, sal_uLong nLastPara );
-    bool        ImpConvertEdtToOut( sal_uInt32 nPara, EditView* pView = 0 );
+    const SvxBulletItem& ImpGetBullet( sal_Int32 nPara, sal_uInt16& );
+    void        ImpFilterIndents( sal_Int32 nFirstPara, sal_Int32 nLastPara );
+    bool        ImpConvertEdtToOut( sal_Int32 nPara, EditView* pView = 0 );
 
-    void        ImpTextPasted( sal_uLong nStartPara, sal_uInt16 nCount );
-    long        ImpCalcMaxBulletWidth( sal_uInt16 nPara, const SvxBulletItem& rBullet );
-    Font        ImpCalcBulletFont( sal_uInt16 nPara ) const;
-    Rectangle   ImpCalcBulletArea( sal_uInt16 nPara, sal_Bool bAdjust, sal_Bool bReturnPaperPos );
-    long        ImpGetTextIndent( sal_uLong nPara );
+    void        ImpTextPasted( sal_Int32 nStartPara, sal_Int32 nCount );
+    long        ImpCalcMaxBulletWidth( sal_Int32 nPara, const SvxBulletItem& rBullet );
+    Font        ImpCalcBulletFont( sal_Int32 nPara ) const;
+    Rectangle   ImpCalcBulletArea( sal_Int32 nPara, sal_Bool bAdjust, sal_Bool bReturnPaperPos );
+    long        ImpGetTextIndent( sal_Int32 nPara );
     sal_Bool        ImpCanIndentSelectedPages( OutlinerView* pCurView );
     sal_Bool        ImpCanDeleteSelectedPages( OutlinerView* pCurView );
-    sal_Bool        ImpCanDeleteSelectedPages( OutlinerView* pCurView, sal_uInt16 nFirstPage, sal_uInt16 nPages );
+    sal_Bool        ImpCanDeleteSelectedPages( OutlinerView* pCurView, sal_Int32 nFirstPage, sal_Int32 nPages );
 
     sal_uInt16      ImplGetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
     void        ImplCheckDepth( sal_Int16& rnDepth ) const;
 #endif
 
 protected:
-    void            ParagraphInserted( sal_uInt16 nParagraph );
-    void            ParagraphDeleted( sal_uInt16 nParagraph );
-    void            ParaAttribsChanged( sal_uInt16 nParagraph );
+    void            ParagraphInserted( sal_Int32 nParagraph );
+    void            ParagraphDeleted( sal_Int32 nParagraph );
+    void            ParaAttribsChanged( sal_Int32 nParagraph );
 
     virtual void    StyleSheetChanged( SfxStyleSheet* pStyle );
 
-    void        InvalidateBullet( Paragraph* pPara, sal_uLong nPara );
-    void        PaintBullet( sal_uInt16 nPara, const Point& rStartPos,
+    void        InvalidateBullet( Paragraph* pPara, sal_Int32 nPara );
+    void        PaintBullet( sal_Int32 nPara, const Point& rStartPos,
                     const Point& rOrigin, short nOrientation,
                     OutputDevice* pOutDev );
 
     // used by OutlinerEditEng. Allows Outliner objects to provide
     // bullet access to the EditEngine.
-    virtual const SvxNumberFormat*  GetNumberFormat( sal_uInt16 nPara ) const;
+    virtual const SvxNumberFormat*  GetNumberFormat( sal_Int32 nPara ) const;
 
 public:
 
@@ -676,7 +676,7 @@ public:
     EEHorizontalTextDirection   GetDefaultHorizontalTextDirection() const;
 
     sal_uInt16          GetScriptType( const ESelection& rSelection ) const;
-    LanguageType    GetLanguage( sal_uInt16 nPara, sal_uInt16 nPos ) const;
+    LanguageType    GetLanguage( sal_Int32 nPara, sal_uInt16 nPos ) const;
 
     void            SetAsianCompressionMode( sal_uInt16 nCompressionMode );
 
@@ -690,13 +690,13 @@ public:
     OutlinerView*   GetView( size_t nIndex ) const;
     size_t          GetViewCount() const;
 
-    Paragraph*      Insert( const String& rText, sal_uLong nAbsPos = CONTAINER_APPEND, sal_Int16 nDepth = 0 );
+    Paragraph*      Insert( const String& rText, sal_Int32 nAbsPos = EE_PARA_APPEND, sal_Int16 nDepth = 0 );
     void            SetText( const OutlinerParaObject& );
     void            AddText( const OutlinerParaObject& );
     void            SetText( const String& rText, Paragraph* pParagraph );
-    String          GetText( Paragraph* pPara, sal_uLong nParaCount=1 ) const;
+    String          GetText( Paragraph* pPara, sal_Int32 nParaCount=1 ) const;
 
-    OutlinerParaObject* CreateParaObject( sal_uInt16 nStartPara = 0, sal_uInt16 nParaCount = 0xFFFF ) const;
+    OutlinerParaObject* CreateParaObject( sal_Int32 nStartPara = 0, sal_Int32 nParaCount = EE_PARA_ALL ) const;
 
     const SfxItemSet& GetEmptyItemSet() const;
 
@@ -718,17 +718,17 @@ public:
 
     void            RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
 
-    sal_uLong           GetParagraphCount() const;
-    Paragraph*      GetParagraph( sal_uLong nAbsPos ) const;
+    sal_Int32       GetParagraphCount() const;
+    Paragraph*      GetParagraph( sal_Int32 nAbsPos ) const;
 
     sal_Bool            HasParent( Paragraph* pParagraph ) const;
     sal_Bool            HasChildren( Paragraph* pParagraph ) const;
-    sal_uLong           GetChildCount( Paragraph* pParent ) const;
+    sal_Int32       GetChildCount( Paragraph* pParent ) const;
     sal_Bool            IsExpanded( Paragraph* pPara ) const;
     Paragraph*          GetParent( Paragraph* pParagraph ) const;
-    sal_uLong           GetAbsPos( Paragraph* pPara );
+    sal_Int32           GetAbsPos( Paragraph* pPara );
 
-    sal_Int16       GetDepth( sal_uLong nPara ) const;
+    sal_Int16       GetDepth( sal_Int32 nPara ) const;
     void            SetDepth( Paragraph* pParagraph, sal_Int16 nNewDepth );
 
     sal_Bool            IsVisible( Paragraph* pPara ) const { return pPara->IsVisible(); }
@@ -761,8 +761,8 @@ public:
     virtual void    DepthChangedHdl();
     void            SetDepthChangedHdl(const Link& rLink){aDepthChangedHdl=rLink;}
     Link            GetDepthChangedHdl() const { return aDepthChangedHdl; }
-    sal_Int16       GetPrevDepth() const { return nDepthChangedHdlPrevDepth; }
-    sal_uInt16          GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; }
+    sal_Int16       GetPrevDepth() const { return static_cast<sal_Int16>(nDepthChangedHdlPrevDepth); }
+    sal_uInt16      GetPrevFlags() const { return mnDepthChangeHdlPrevFlags; }
 
     virtual long    RemovingPagesHdl( OutlinerView* );
     void            SetRemovingPagesHdl(const Link& rLink){aRemovingPagesHdl=rLink;}
@@ -771,10 +771,10 @@ public:
     void            SetIndentingPagesHdl(const Link& rLink){aIndentingPagesHdl=rLink;}
     Link            GetIndentingPagesHdl() const { return aIndentingPagesHdl; }
     // valid only in the two upper handlers
-    sal_uInt16          GetSelPageCount() const { return nDepthChangedHdlPrevDepth; }
+    sal_Int32       GetSelPageCount() const { return nDepthChangedHdlPrevDepth; }
 
     // valid only in the two upper handlers
-    sal_uLong           GetFirstSelPage() const { return mnFirstSelPage; }
+    sal_Int32       GetFirstSelPage() const { return mnFirstSelPage; }
 
     void            SetCalcFieldValueHdl(const Link& rLink ) { aCalcFieldValueHdl= rLink; }
     Link            GetCalcFieldValueHdl() const { return aCalcFieldValueHdl; }
@@ -805,8 +805,8 @@ public:
     const Size&     GetPaperSize() const;
     void            SetPaperSize( const Size& rSize );
 
-    void            SetFirstPageNumber( sal_uInt16 n )  { nFirstPage = n; }
-    sal_uInt16          GetFirstPageNumber() const      { return nFirstPage; }
+    void            SetFirstPageNumber( sal_Int32 n )  { nFirstPage = n; }
+    sal_Int32       GetFirstPageNumber() const      { return nFirstPage; }
 
     void                SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon );
     void                SetPolygon( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon);
@@ -828,17 +828,17 @@ public:
     void            ForceAutoColor( sal_Bool b );
     sal_Bool            IsForceAutoColor() const;
 
-    EBulletInfo     GetBulletInfo( sal_uInt16 nPara );
+    EBulletInfo     GetBulletInfo( sal_Int32 nPara );
 
     void        SetWordDelimiters( const String& rDelimiters );
     String      GetWordDelimiters() const;
-    String      GetWord( sal_uInt16 nPara, xub_StrLen nIndex );
+    String      GetWord( sal_Int32 nPara, xub_StrLen nIndex );
 
     void            StripPortions();
 
     virtual void DrawingText(
         const Point& rStartPos, const String& rText, sal_uInt16 nTextStart, sal_uInt16 nTextLen,
-        const sal_Int32* pDXArray, const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
+        const sal_Int32* pDXArray, const SvxFont& rFont, sal_Int32 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
         const EEngineData::WrongSpellVector* pWrongSpellVector,
         const SvxFieldData* pFieldData,
         bool bEndOfLine,
@@ -850,7 +850,7 @@ public:
 
     virtual void DrawingTab(
         const Point& rStartPos, long nWidth, const String& rChar,
-        const SvxFont& rFont, sal_uInt16 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
+        const SvxFont& rFont, sal_Int32 nPara, xub_StrLen nIndex, sal_uInt8 nRightToLeft,
         bool bEndOfLine,
         bool bEndOfParagraph,
         const Color& rOverlineColor,
@@ -864,13 +864,13 @@ public:
 
     sal_Bool            IsInSelectionMode() const;
 
-    void            SetStyleSheet( sal_uLong nPara, SfxStyleSheet* pStyle );
-    SfxStyleSheet*  GetStyleSheet( sal_uLong nPara );
+    void            SetStyleSheet( sal_Int32 nPara, SfxStyleSheet* pStyle );
+    SfxStyleSheet*  GetStyleSheet( sal_Int32 nPara );
 
-    void            SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& );
-    SfxItemSet      GetParaAttribs( sal_uInt16 nPara );
+    void            SetParaAttribs( sal_Int32 nPara, const SfxItemSet& );
+    SfxItemSet      GetParaAttribs( sal_Int32 nPara );
 
-    void            Remove( Paragraph* pPara, sal_uLong nParaCount );
+    void            Remove( Paragraph* pPara, sal_Int32 nParaCount );
     sal_Bool            Expand( Paragraph* );
     sal_Bool            Collapse( Paragraph* );
 
@@ -890,9 +890,9 @@ public:
     Link            GetEndMovingHdl() const {return aEndMovingHdl;}
     void            SetEndMovingHdl( const Link& rLink){aEndMovingHdl=rLink;}
 
-    sal_uLong           GetLineCount( sal_uLong nParagraph ) const;
-    sal_uInt16          GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const;
-    sal_uLong           GetLineHeight( sal_uLong nParagraph, sal_uLong nLine = 0 );
+    sal_uLong           GetLineCount( sal_Int32 nParagraph ) const;
+    sal_uInt16          GetLineLen( sal_Int32 nParagraph, sal_uInt16 nLine ) const;
+    sal_uLong           GetLineHeight( sal_Int32 nParagraph, sal_uInt16 nLine = 0 );
 
     // nFormat must be a value from the enum EETextFormat (due to CLOOKS)
     sal_uLong           Read( SvStream& rInput, const String& rBaseURL, sal_uInt16, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
@@ -907,15 +907,15 @@ public:
     // Only for EditEngine mode
     void            QuickInsertText( const String& rText, const ESelection& rSel );
     void            QuickDelete( const ESelection& rSel );
-    void            QuickRemoveCharAttribs( sal_uInt16 nPara, sal_uInt16 nWhich = 0 );
+    void            QuickRemoveCharAttribs( sal_Int32 nPara, sal_uInt16 nWhich = 0 );
     void            QuickFormatDoc( sal_Bool bFull = sal_False );
 
     sal_Bool            UpdateFields();
     void            RemoveFields( sal_Bool bKeepFieldText, TypeId aType = NULL );
 
-    virtual void    FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
-    virtual void    FieldSelected( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
-    virtual String  CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor );
+    virtual void    FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos );
+    virtual void    FieldSelected( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos );
+    virtual String  CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos, Color*& rTxtColor, Color*& rFldColor );
 
     void            SetSpeller( ::com::sun::star::uno::Reference<
                             ::com::sun::star::linguistic2::XSpellChecker1 > &xSpeller );
@@ -948,8 +948,8 @@ public:
     OutputDevice*   GetRefDevice() const;
 
     sal_uLong           GetTextHeight() const;
-    sal_uLong           GetTextHeight( sal_uLong nParagraph ) const;
-    Point           GetDocPosTopLeft( sal_uLong nParagraph );
+    sal_uLong           GetTextHeight( sal_Int32 nParagraph ) const;
+    Point           GetDocPosTopLeft( sal_Int32 nParagraph );
     Point           GetDocPos( const Point& rPaperPos ) const;
     sal_Bool            IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder = 0 );
     sal_Bool            IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder, sal_Bool* pbBuuletPos );
@@ -963,7 +963,7 @@ public:
     const EditEngine& GetEditEngine() const { return *((EditEngine*)pEditEngine); }
 
     // this is needed for StarOffice Api
-    void SetLevelDependendStyleSheet( sal_uInt16 nPara );
+    void SetLevelDependendStyleSheet( sal_Int32 nPara );
 
     sal_uInt16  GetOutlinerMode() const { return nOutlinerMode & OUTLINERMODE_USERMASK; }
 
@@ -989,11 +989,11 @@ public:
     void            SetEndPasteOrDropHdl( const Link& rLink );
     Link            GetEndPasteOrDropHdl() const { return maEndPasteOrDropHdl; }
 
-    virtual sal_Int16 GetNumberingStartValue( sal_uInt16 nPara );
-    virtual void SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue );
+    virtual sal_Int16 GetNumberingStartValue( sal_Int32 nPara );
+    virtual void SetNumberingStartValue( sal_Int32 nPara, sal_Int16 nNumberingStartValue );
 
-    virtual sal_Bool IsParaIsNumberingRestart( sal_uInt16 nPara );
-    virtual void SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Bool bParaIsNumberingRestart );
+    virtual sal_Bool IsParaIsNumberingRestart( sal_Int32 nPara );
+    virtual void SetParaIsNumberingRestart( sal_Int32 nPara, sal_Bool bParaIsNumberingRestart );
 };
 
 #endif
diff --git a/editeng/inc/editeng/outlobj.hxx b/editeng/inc/editeng/outlobj.hxx
index 73eb9b5..8aa45c2 100644
--- a/editeng/inc/editeng/outlobj.hxx
+++ b/editeng/inc/editeng/outlobj.hxx
@@ -68,11 +68,11 @@ public:
     void SetVertical(bool bNew);
 
     // data read access
-    sal_uInt32 Count() const;
-    sal_Int16 GetDepth(sal_uInt16 nPara) const;
+    sal_Int32 Count() const;
+    sal_Int16 GetDepth(sal_Int32 nPara) const;
     const EditTextObject& GetTextObject() const;
     bool IsEditDoc() const;
-    const ParagraphData& GetParagraphData(sal_uInt32 nIndex) const;
+    const ParagraphData& GetParagraphData(sal_Int32 nIndex) const;
 
     // portion info support
     void ClearPortionInfo();
diff --git a/editeng/inc/editeng/svxrtf.hxx b/editeng/inc/editeng/svxrtf.hxx
index 59336d4..073a0db 100644
--- a/editeng/inc/editeng/svxrtf.hxx
+++ b/editeng/inc/editeng/svxrtf.hxx
@@ -59,7 +59,7 @@ class SvxNodeIdx
 {
 public:
     virtual ~SvxNodeIdx() {}
-    virtual sal_uLong   GetIdx() const = 0;
+    virtual sal_Int32   GetIdx() const = 0;
     virtual SvxNodeIdx* Clone() const = 0;  // Cloning itself
 };
 
@@ -68,7 +68,7 @@ class SvxPosition
 public:
     virtual ~SvxPosition() {}
 
-    virtual sal_uLong   GetNodeIdx() const = 0;
+    virtual sal_Int32   GetNodeIdx() const = 0;
     virtual xub_StrLen  GetCntIdx() const = 0;
 
     virtual SvxPosition* Clone() const = 0; // Cloning itself
@@ -428,8 +428,8 @@ public:
     void MoveFullNode(const SvxNodeIdx &rOldNode,
         const SvxNodeIdx &rNewNode);
 
-    sal_uLong GetSttNodeIdx() const { return pSttNd->GetIdx(); }
-    sal_uLong GetEndNodeIdx() const { return pEndNd->GetIdx(); }
+    sal_Int32 GetSttNodeIdx() const { return pSttNd->GetIdx(); }
+    sal_Int32 GetEndNodeIdx() const { return pEndNd->GetIdx(); }
 
     const SvxNodeIdx& GetSttNode() const { return *pSttNd; }
     const SvxNodeIdx& GetEndNode() const { return *pEndNd; }
diff --git a/editeng/inc/editeng/unoedhlp.hxx b/editeng/inc/editeng/unoedhlp.hxx
index 25cf36f..7f8168d 100644
--- a/editeng/inc/editeng/unoedhlp.hxx
+++ b/editeng/inc/editeng/unoedhlp.hxx
@@ -41,17 +41,17 @@ class EditEngine;
 class EDITENG_DLLPUBLIC SvxEditSourceHint : public TextHint
 {
 private:
-    sal_uLong   mnStart;
-    sal_uLong   mnEnd;
+    sal_Int32   mnStart;
+    sal_Int32   mnEnd;
 
 public:
             TYPEINFO();
             SvxEditSourceHint( sal_uLong nId );
-            SvxEditSourceHint( sal_uLong nId, sal_uLong nValue, sal_uLong nStart=0, sal_uLong nEnd=0 );
+            SvxEditSourceHint( sal_uLong nId, sal_uLong nValue, sal_Int32 nStart=0, sal_Int32 nEnd=0 );
 
     sal_uLong   GetValue() const;
-    sal_uLong   GetStartValue() const;
-    sal_uLong   GetEndValue() const;
+    sal_Int32   GetStartValue() const;
+    sal_Int32   GetEndValue() const;
 };
 
 /** Helper class for common functionality in edit sources
@@ -92,7 +92,7 @@ public:
 
         @return sal_True, if the range has been successfully determined
      */
-    static sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, const EditEngine& rEE, sal_uInt16 nPara, sal_uInt16 nIndex );
+    static sal_Bool GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, const EditEngine& rEE, sal_Int32 nPara, sal_uInt16 nIndex );
 
     /** Convert point from edit engine to user coordinate space
 
diff --git a/editeng/inc/editeng/unoedprx.hxx b/editeng/inc/editeng/unoedprx.hxx
index 83ed509..6d59121 100644
--- a/editeng/inc/editeng/unoedprx.hxx
+++ b/editeng/inc/editeng/unoedprx.hxx
@@ -33,20 +33,20 @@ public:
     SvxAccessibleTextAdapter();
     virtual ~SvxAccessibleTextAdapter();
 
-    virtual sal_uInt16          GetParagraphCount() const;
-    virtual sal_uInt16          GetTextLen( sal_uInt16 nParagraph ) const;
+    virtual sal_Int32       GetParagraphCount() const;
+    virtual sal_uInt16      GetTextLen( sal_Int32 nParagraph ) const;
     virtual String          GetText( const ESelection& rSel ) const;
     virtual SfxItemSet      GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const;
-    virtual SfxItemSet      GetParaAttribs( sal_uInt16 nPara ) const;
-    virtual void            SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet );
+    virtual SfxItemSet      GetParaAttribs( sal_Int32 nPara ) const;
+    virtual void            SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet );
     virtual void            RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
-    virtual void            GetPortions( sal_uInt16 nPara, std::vector<sal_uInt16>& rList ) const;
+    virtual void            GetPortions( sal_Int32 nPara, std::vector<sal_uInt16>& rList ) const;
 
-    virtual sal_Int32       CalcLogicalIndex( sal_uInt16 nPara, sal_uInt16 nEEIndex );
-    virtual sal_uInt16          CalcEditEngineIndex( sal_uInt16 nPara, sal_Int32 nLogicalIndex );
+    virtual sal_Int32       CalcLogicalIndex( sal_Int32 nPara, sal_uInt16 nEEIndex );
+    virtual sal_uInt16          CalcEditEngineIndex( sal_Int32 nPara, sal_Int32 nLogicalIndex );
 
      virtual sal_uInt16         GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const;
-    virtual sal_uInt16          GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const;
+    virtual sal_uInt16          GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const;
 
     virtual void            QuickInsertText( const String& rText, const ESelection& rSel );
     virtual void            QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
@@ -55,46 +55,46 @@ public:
 
     virtual SfxItemPool*    GetPool() const;
 
-    virtual XubString       CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
-    virtual void            FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
+    virtual XubString       CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
+    virtual void            FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos );
 
     virtual sal_Bool            IsValid() const;
 
-    virtual LanguageType    GetLanguage( sal_uInt16, sal_uInt16 ) const;
-    virtual sal_uInt16          GetFieldCount( sal_uInt16 nPara ) const;
-    virtual EFieldInfo      GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const;
-    virtual EBulletInfo     GetBulletInfo( sal_uInt16 nPara ) const;
-    virtual Rectangle       GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
-    virtual Rectangle       GetParaBounds( sal_uInt16 nPara ) const;
+    virtual LanguageType    GetLanguage( sal_Int32, sal_uInt16 ) const;
+    virtual sal_uInt16          GetFieldCount( sal_Int32 nPara ) const;
+    virtual EFieldInfo      GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) const;
+    virtual EBulletInfo     GetBulletInfo( sal_Int32 nPara ) const;
+    virtual Rectangle       GetCharBounds( sal_Int32 nPara, sal_uInt16 nIndex ) const;
+    virtual Rectangle       GetParaBounds( sal_Int32 nPara ) const;
     virtual MapMode         GetMapMode() const;
     virtual OutputDevice*   GetRefDevice() const;
-    virtual sal_Bool        GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const;
-    virtual sal_Bool        GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
-    virtual sal_Bool        GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const;
-    virtual sal_uInt16          GetLineCount( sal_uInt16 nPara ) const;
-    virtual sal_uInt16          GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const;
-    virtual void            GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
-    virtual sal_uInt16          GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+    virtual sal_Bool        GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_uInt16& nIndex ) const;
+    virtual sal_Bool        GetWordIndices( sal_Int32 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
+    virtual sal_Bool        GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_Int32 nPara, sal_uInt16 nIndex ) const;
+    virtual sal_uInt16          GetLineCount( sal_Int32 nPara ) const;
+    virtual sal_uInt16          GetLineLen( sal_Int32 nPara, sal_uInt16 nLine ) const;
+    virtual void            GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_Int32 nParagraph, sal_uInt16 nLine ) const;
+    virtual sal_uInt16          GetLineNumberAtIndex( sal_Int32 nPara, sal_uInt16 nIndex ) const;
 
     virtual sal_Bool        Delete( const ESelection& );
     virtual sal_Bool        InsertText( const String&, const ESelection& );
     virtual sal_Bool        QuickFormatDoc( sal_Bool bFull=sal_False );
-    virtual sal_Int16       GetDepth( sal_uInt16 nPara ) const;
-    virtual sal_Bool        SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth );
+    virtual sal_Int16       GetDepth( sal_Int32 nPara ) const;
+    virtual sal_Bool        SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth );
 
     virtual const SfxItemSet*   GetEmptyItemSetPtr();
 
     // implementation functions for XParagraphAppend and XTextPortionAppend
     // (not needed for accessibility, only for new import API)
     virtual void        AppendParagraph();
-    virtual xub_StrLen  AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet );
+    virtual xub_StrLen  AppendTextPortion( sal_Int32 nPara, const String &rText, const SfxItemSet &rSet );
 
     //XTextCopy
     virtual void        CopyText(const SvxTextForwarder& rSource);
 
     void                    SetForwarder( SvxTextForwarder& );
-    sal_Bool                HaveImageBullet( sal_uInt16 nPara ) const;
-    sal_Bool                HaveTextBullet( sal_uInt16 nPara ) const;
+    sal_Bool                HaveImageBullet( sal_Int32 nPara ) const;
+    sal_Bool                HaveTextBullet( sal_Int32 nPara ) const;
 
     /** Query whether all text in given selection is editable
 
diff --git a/editeng/inc/editeng/unoedsrc.hxx b/editeng/inc/editeng/unoedsrc.hxx
index bb5044c..9b29569 100644
--- a/editeng/inc/editeng/unoedsrc.hxx
+++ b/editeng/inc/editeng/unoedsrc.hxx
@@ -140,25 +140,25 @@ class EDITENG_DLLPUBLIC SvxTextForwarder
 public:
     virtual             ~SvxTextForwarder();
 
-    virtual sal_uInt16      GetParagraphCount() const = 0;
-    virtual sal_uInt16      GetTextLen( sal_uInt16 nParagraph ) const = 0;
+    virtual sal_Int32   GetParagraphCount() const = 0;
+    virtual sal_uInt16  GetTextLen( sal_Int32 nParagraph ) const = 0;
     virtual String      GetText( const ESelection& rSel ) const = 0;
     virtual SfxItemSet  GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const = 0;
-    virtual SfxItemSet  GetParaAttribs( sal_uInt16 nPara ) const = 0;
-    virtual void        SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet ) = 0;
+    virtual SfxItemSet  GetParaAttribs( sal_Int32 nPara ) const = 0;
+    virtual void        SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) = 0;
     virtual void        RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich ) = 0;
-    virtual void        GetPortions( sal_uInt16 nPara, std::vector<sal_uInt16>& rList ) const = 0;
+    virtual void        GetPortions( sal_Int32 nPara, std::vector<sal_uInt16>& rList ) const = 0;
 
     virtual sal_uInt16      GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const = 0;
-    virtual sal_uInt16      GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const = 0;
+    virtual sal_uInt16      GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const = 0;
 
     virtual void        QuickInsertText( const String& rText, const ESelection& rSel ) = 0;
     virtual void        QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel ) = 0;
     virtual void        QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) = 0;
     virtual void        QuickInsertLineBreak( const ESelection& rSel ) = 0;
 
-    virtual XubString    CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ) = 0;
-    virtual void         FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos ) = 0;
+    virtual XubString    CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor ) = 0;
+    virtual void         FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos ) = 0;
 
     virtual SfxItemPool* GetPool() const = 0;
 
@@ -166,7 +166,7 @@ public:
 
     // implementation functions for XParagraphAppend and XTextPortionAppend
     virtual void        AppendParagraph() = 0;
-    virtual xub_StrLen  AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet ) = 0;
+    virtual xub_StrLen  AppendTextPortion( sal_Int32 nPara, const String &rText, const SfxItemSet &rSet ) = 0;
 
     // XTextCopy
     virtual void        CopyText(const SvxTextForwarder& rSource) = 0;
@@ -185,14 +185,14 @@ public:
         @param nIndex[0 .. m-1]
         Index of character to query language of
      */
-    virtual LanguageType    GetLanguage( sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0;
+    virtual LanguageType    GetLanguage( sal_Int32 nPara, sal_uInt16 nIndex ) const = 0;
 
     /** Query number of fields in the underlying edit engine
 
         @param nPara[0 .. n-1]
         Index of paragraph to query field number in
      */
-    virtual sal_uInt16          GetFieldCount( sal_uInt16 nPara ) const = 0;
+    virtual sal_uInt16          GetFieldCount( sal_Int32 nPara ) const = 0;
 
     /** Query information for given field number in the underlying edit engine
 
@@ -202,14 +202,14 @@ public:
         @param nField[0 .. m-1]
         Index of field to query information of
      */
-    virtual EFieldInfo      GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const = 0;
+    virtual EFieldInfo      GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) const = 0;
 
     /** Query information regarding bullets for given paragraph on the underlying edit engine
 
         @param nPara[0 .. n-1]
         Index of paragraph to query bullet info on
      */
-    virtual EBulletInfo     GetBulletInfo( sal_uInt16 nPara ) const = 0;
+    virtual EBulletInfo     GetBulletInfo( sal_Int32 nPara ) const = 0;
 
     /** Query the bounding rectangle of the given character
 
@@ -232,7 +232,7 @@ public:
         left corner of text. The coordinates returned here are to be
         interpreted in the map mode given by GetMapMode().
     */
-    virtual Rectangle       GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0;
+    virtual Rectangle       GetCharBounds( sal_Int32 nPara, sal_uInt16 nIndex ) const = 0;
 
     /** Query the bounding rectangle of the given paragraph
 
@@ -243,7 +243,7 @@ public:
         left corner of text. The coordinates returned here are to be
         interpreted in the map mode given by GetMapMode().
      */
-    virtual Rectangle       GetParaBounds( sal_uInt16 nPara ) const = 0;
+    virtual Rectangle       GetParaBounds( sal_Int32 nPara ) const = 0;
 
     /** Query the map mode of the underlying EditEngine/Outliner
 
@@ -280,7 +280,7 @@ public:
         @return sal_True, if the point is over any text and both rPara and rIndex are valid
 
      */
-    virtual sal_Bool        GetIndexAtPoint( const Point& rPoint, sal_uInt16& rPara, sal_uInt16& rIndex ) const = 0;
+    virtual sal_Bool        GetIndexAtPoint( const Point& rPoint, sal_Int32& rPara, sal_uInt16& rIndex ) const = 0;
 
     /** Get the start and the end index of the word at the given index
 
@@ -305,7 +305,7 @@ public:
 
         @return sal_True, if the result is non-empty
      */
-    virtual sal_Bool        GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& rStart, sal_uInt16& rEnd ) const = 0;
+    virtual sal_Bool        GetWordIndices( sal_Int32 nPara, sal_uInt16 nIndex, sal_uInt16& rStart, sal_uInt16& rEnd ) const = 0;
 
     /** Query range of similar attributes
 
@@ -322,7 +322,7 @@ public:
 
         @return sal_True, if the range has been successfully determined
      */
-    virtual sal_Bool        GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0;
+    virtual sal_Bool        GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_Int32 nPara, sal_uInt16 nIndex ) const = 0;
 
     /** Query number of lines in the formatted paragraph
 
@@ -332,7 +332,7 @@ public:
         @return number of lines in given paragraph
 
      */
-    virtual sal_uInt16          GetLineCount( sal_uInt16 nPara ) const = 0;
+    virtual sal_uInt16          GetLineCount( sal_Int32 nPara ) const = 0;
 
     /** Query line length
 
@@ -343,7 +343,7 @@ public:
         Index of line in paragraph to query line length of
 
      */
-    virtual sal_uInt16          GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const = 0;
+    virtual sal_uInt16          GetLineLen( sal_Int32 nPara, sal_uInt16 nLine ) const = 0;
 
     /** Query bounds of line in paragraph
 
@@ -360,7 +360,7 @@ public:
         Index of line in paragraph to query line length of
 
      */
-    virtual void            GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const = 0;
+    virtual void            GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_Int32 nParagraph, sal_uInt16 nLine ) const = 0;
 
     /** Query the line number for a index in the paragraphs text
 
@@ -373,7 +373,7 @@ public:
         @returns [0 .. k-1]
         The line number of the chara in the paragraph
      */
-    virtual sal_uInt16          GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const = 0;
+    virtual sal_uInt16          GetLineNumberAtIndex( sal_Int32 nPara, sal_uInt16 nIndex ) const = 0;
 
     /** Delete given text range and reformat text
 
@@ -412,7 +412,7 @@ public:
         @return the outline level of the given paragraph. The range is
         [0,n), where n is the maximal outline level.
      */
-    virtual sal_Int16       GetDepth( sal_uInt16 nPara ) const = 0;
+    virtual sal_Int16       GetDepth( sal_Int32 nPara ) const = 0;
 
     /** Set the outline depth of given paragraph
 
@@ -427,13 +427,13 @@ public:
         failure are e.g. the text does not support outline level
         (EditEngine), or the depth range is exceeded.
      */
-    virtual sal_Bool        SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth ) = 0;
+    virtual sal_Bool        SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth ) = 0;
 
-    virtual sal_Int16 GetNumberingStartValue( sal_uInt16 nPara );
-    virtual void SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue );
+    virtual sal_Int16 GetNumberingStartValue( sal_Int32 nPara );
+    virtual void SetNumberingStartValue( sal_Int32 nPara, sal_Int16 nNumberingStartValue );
 
-    virtual sal_Bool IsParaIsNumberingRestart( sal_uInt16 nPara );
-    virtual void SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Bool bParaIsNumberingRestart );
+    virtual sal_Bool IsParaIsNumberingRestart( sal_Int32 nPara );
+    virtual void SetParaIsNumberingRestart( sal_Int32 nPara, sal_Bool bParaIsNumberingRestart );
 };
 
 /** Encapsulates the document view for the purpose of unified
diff --git a/editeng/inc/editeng/unofored.hxx b/editeng/inc/editeng/unofored.hxx
index 5c88119..a3ccc46 100644
--- a/editeng/inc/editeng/unofored.hxx
+++ b/editeng/inc/editeng/unofored.hxx
@@ -35,17 +35,17 @@ public:
                         SvxEditEngineForwarder( EditEngine& rEngine );
     virtual             ~SvxEditEngineForwarder();
 
-    virtual sal_uInt16      GetParagraphCount() const;
-    virtual sal_uInt16      GetTextLen( sal_uInt16 nParagraph ) const;
+    virtual sal_Int32   GetParagraphCount() const;
+    virtual sal_uInt16  GetTextLen( sal_Int32 nParagraph ) const;
     virtual String      GetText( const ESelection& rSel ) const;
     virtual SfxItemSet  GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = EditEngineAttribs_All ) const;
-    virtual SfxItemSet  GetParaAttribs( sal_uInt16 nPara ) const;
-    virtual void        SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet );
+    virtual SfxItemSet  GetParaAttribs( sal_Int32 nPara ) const;
+    virtual void        SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet );
     virtual void        RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
-    virtual void        GetPortions( sal_uInt16 nPara, std::vector<sal_uInt16>& rList ) const;
+    virtual void        GetPortions( sal_Int32 nPara, std::vector<sal_uInt16>& rList ) const;
 
     virtual sal_uInt16      GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const;
-    virtual sal_uInt16      GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const;
+    virtual sal_uInt16      GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const;
 
     virtual void        QuickInsertText( const String& rText, const ESelection& rSel );
     virtual void        QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
@@ -54,36 +54,36 @@ public:
 
     virtual SfxItemPool* GetPool() const;
 
-    virtual XubString    CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
-    virtual void         FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
+    virtual XubString    CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
+    virtual void         FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos );
     virtual sal_Bool         IsValid() const;
 
-    virtual LanguageType    GetLanguage( sal_uInt16, sal_uInt16 ) const;
-    virtual sal_uInt16          GetFieldCount( sal_uInt16 nPara ) const;
-    virtual EFieldInfo      GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const;
-    virtual EBulletInfo     GetBulletInfo( sal_uInt16 nPara ) const;
-    virtual Rectangle       GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
-    virtual Rectangle       GetParaBounds( sal_uInt16 nPara ) const;
+    virtual LanguageType    GetLanguage( sal_Int32, sal_uInt16 ) const;
+    virtual sal_uInt16      GetFieldCount( sal_Int32 nPara ) const;
+    virtual EFieldInfo      GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) const;
+    virtual EBulletInfo     GetBulletInfo( sal_Int32 nPara ) const;
+    virtual Rectangle       GetCharBounds( sal_Int32 nPara, sal_uInt16 nIndex ) const;
+    virtual Rectangle       GetParaBounds( sal_Int32 nPara ) const;
     virtual MapMode         GetMapMode() const;
     virtual OutputDevice*   GetRefDevice() const;
-    virtual sal_Bool        GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const;
-    virtual sal_Bool        GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
-    virtual sal_Bool        GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const;
-    virtual sal_uInt16          GetLineCount( sal_uInt16 nPara ) const;
-    virtual sal_uInt16          GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const;
-    virtual void            GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
-    virtual sal_uInt16          GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+    virtual sal_Bool        GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_uInt16& nIndex ) const;
+    virtual sal_Bool        GetWordIndices( sal_Int32 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
+    virtual sal_Bool        GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_Int32 nPara, sal_uInt16 nIndex ) const;
+    virtual sal_uInt16          GetLineCount( sal_Int32 nPara ) const;
+    virtual sal_uInt16          GetLineLen( sal_Int32 nPara, sal_uInt16 nLine ) const;
+    virtual void            GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_Int32 nParagraph, sal_uInt16 nLine ) const;
+    virtual sal_uInt16          GetLineNumberAtIndex( sal_Int32 nPara, sal_uInt16 nIndex ) const;
     virtual sal_Bool        Delete( const ESelection& );
     virtual sal_Bool        InsertText( const String&, const ESelection& );
     virtual sal_Bool        QuickFormatDoc( sal_Bool bFull=sal_False );
-    virtual sal_Int16       GetDepth( sal_uInt16 nPara ) const;
-    virtual sal_Bool        SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth );
+    virtual sal_Int16       GetDepth( sal_Int32 nPara ) const;
+    virtual sal_Bool        SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth );
 
     virtual const SfxItemSet*   GetEmptyItemSetPtr();
 
     // implementation functions for XParagraphAppend and XTextPortionAppend
     virtual void        AppendParagraph();
-    virtual xub_StrLen  AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet );
+    virtual xub_StrLen  AppendTextPortion( sal_Int32 nPara, const String &rText, const SfxItemSet &rSet );
     //XTextCopy
     virtual void        CopyText(const SvxTextForwarder& rSource);
 };
diff --git a/editeng/inc/editeng/unoforou.hxx b/editeng/inc/editeng/unoforou.hxx
index 68ee891..0e03a70 100644
--- a/editeng/inc/editeng/unoforou.hxx
+++ b/editeng/inc/editeng/unoforou.hxx
@@ -47,23 +47,23 @@ private:
     mutable SfxItemSet* mpParaAttribsCache;
 
     /** if we have a cached para attribute item set, this is the paragraph of it */
-    mutable sal_uInt16      mnParaAttribsCache;
+    mutable sal_Int32   mnParaAttribsCache;
 
 public:
                         SvxOutlinerForwarder( Outliner& rOutl, sal_Bool bOutlText = sal_False );
     virtual             ~SvxOutlinerForwarder();
 
-    virtual sal_uInt16      GetParagraphCount() const;
-    virtual sal_uInt16      GetTextLen( sal_uInt16 nParagraph ) const;
+    virtual sal_Int32   GetParagraphCount() const;
+    virtual sal_uInt16  GetTextLen( sal_Int32 nParagraph ) const;
     virtual String      GetText( const ESelection& rSel ) const;
     virtual SfxItemSet  GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const;
-    virtual SfxItemSet  GetParaAttribs( sal_uInt16 nPara ) const;
-    virtual void        SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet );
+    virtual SfxItemSet  GetParaAttribs( sal_Int32 nPara ) const;
+    virtual void        SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet );
     virtual void        RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
-    virtual void        GetPortions( sal_uInt16 nPara, std::vector<sal_uInt16>& rList ) const;
+    virtual void        GetPortions( sal_Int32 nPara, std::vector<sal_uInt16>& rList ) const;
 
     virtual sal_uInt16      GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const;
-    virtual sal_uInt16      GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const;
+    virtual sal_uInt16      GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const;
 
     virtual void        QuickInsertText( const String& rText, const ESelection& rSel );
     virtual void        QuickInsertField( const SvxFieldItem& rFld, const ESelection& rSel );
@@ -72,38 +72,38 @@ public:
 
     virtual SfxItemPool* GetPool() const;
 
-    virtual XubString    CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
-    virtual void         FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
+    virtual XubString    CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
+    virtual void         FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos );
 
     virtual sal_Bool        IsValid() const;
 
     Outliner&           GetOutliner() const { return rOutliner; }
 
-    virtual LanguageType    GetLanguage( sal_uInt16, sal_uInt16 ) const;
-    virtual sal_uInt16          GetFieldCount( sal_uInt16 nPara ) const;
-    virtual EFieldInfo      GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const;
-    virtual EBulletInfo     GetBulletInfo( sal_uInt16 nPara ) const;
-    virtual Rectangle       GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
-    virtual Rectangle       GetParaBounds( sal_uInt16 nPara ) const;
+    virtual LanguageType    GetLanguage( sal_Int32, sal_uInt16 ) const;
+    virtual sal_uInt16          GetFieldCount( sal_Int32 nPara ) const;
+    virtual EFieldInfo      GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) const;
+    virtual EBulletInfo     GetBulletInfo( sal_Int32 nPara ) const;
+    virtual Rectangle       GetCharBounds( sal_Int32 nPara, sal_uInt16 nIndex ) const;
+    virtual Rectangle       GetParaBounds( sal_Int32 nPara ) const;
     virtual MapMode         GetMapMode() const;
     virtual OutputDevice*   GetRefDevice() const;
-    virtual sal_Bool        GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const;
-    virtual sal_Bool        GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
-    virtual sal_Bool        GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const;
-    virtual sal_uInt16          GetLineCount( sal_uInt16 nPara ) const;
-    virtual sal_uInt16          GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const;
-    virtual void            GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nPara, sal_uInt16 nLine ) const;
-    virtual sal_uInt16          GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+    virtual sal_Bool        GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_uInt16& nIndex ) const;
+    virtual sal_Bool        GetWordIndices( sal_Int32 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
+    virtual sal_Bool        GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_Int32 nPara, sal_uInt16 nIndex ) const;
+    virtual sal_uInt16          GetLineCount( sal_Int32 nPara ) const;
+    virtual sal_uInt16          GetLineLen( sal_Int32 nPara, sal_uInt16 nLine ) const;
+    virtual void            GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_Int32 nPara, sal_uInt16 nLine ) const;
+    virtual sal_uInt16          GetLineNumberAtIndex( sal_Int32 nPara, sal_uInt16 nIndex ) const;
     virtual sal_Bool        Delete( const ESelection& );
     virtual sal_Bool        InsertText( const String&, const ESelection& );
     virtual sal_Bool        QuickFormatDoc( sal_Bool bFull=sal_False );
-    virtual sal_Int16       GetDepth( sal_uInt16 nPara ) const;
-    virtual sal_Bool        SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth );
-    virtual sal_Int16       GetNumberingStartValue( sal_uInt16 nPara );
-    virtual void            SetNumberingStartValue( sal_uInt16 nPara, sal_Int16 nNumberingStartValue );
+    virtual sal_Int16       GetDepth( sal_Int32 nPara ) const;
+    virtual sal_Bool        SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth );
+    virtual sal_Int16       GetNumberingStartValue( sal_Int32 nPara );
+    virtual void            SetNumberingStartValue( sal_Int32 nPara, sal_Int16 nNumberingStartValue );
 
-    virtual sal_Bool        IsParaIsNumberingRestart( sal_uInt16 nPara );
-    virtual void            SetParaIsNumberingRestart( sal_uInt16 nPara, sal_Bool bParaIsNumberingRestart );
+    virtual sal_Bool        IsParaIsNumberingRestart( sal_Int32 nPara );
+    virtual void            SetParaIsNumberingRestart( sal_Int32 nPara, sal_Bool bParaIsNumberingRestart );
 
     /* this method flushes internal caches for this forwarder */
     void                flushCache();
@@ -112,7 +112,7 @@ public:
 
     // implementation functions for XParagraphAppend and XTextPortionAppend
     virtual void        AppendParagraph();
-    virtual xub_StrLen  AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet );
+    virtual xub_StrLen  AppendTextPortion( sal_Int32 nPara, const String &rText, const SfxItemSet &rSet );
     //XTextCopy
     virtual void        CopyText(const SvxTextForwarder& rSource);
 };
diff --git a/editeng/inc/editeng/unotext.hxx b/editeng/inc/editeng/unotext.hxx
index 13ab909..45e5122 100644
--- a/editeng/inc/editeng/unotext.hxx
+++ b/editeng/inc/editeng/unotext.hxx
@@ -180,17 +180,17 @@ public:
     virtual void                    UpdateData();
 
     // SvxTextForwarder
-    virtual sal_uInt16      GetParagraphCount() const;
-    virtual sal_uInt16      GetTextLen( sal_uInt16 nParagraph ) const;
+    virtual sal_Int32       GetParagraphCount() const;
+    virtual sal_uInt16      GetTextLen( sal_Int32 nParagraph ) const;
     virtual String          GetText( const ESelection& rSel ) const;
     virtual SfxItemSet      GetAttribs( const ESelection& rSel, sal_Bool bOnlyHardAttrib = 0 ) const;
-    virtual SfxItemSet      GetParaAttribs( sal_uInt16 nPara ) const;
-    virtual void            SetParaAttribs( sal_uInt16 nPara, const SfxItemSet& rSet );
+    virtual SfxItemSet      GetParaAttribs( sal_Int32 nPara ) const;
+    virtual void            SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet );
     virtual void            RemoveAttribs( const ESelection& rSelection, sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich );
-    virtual void            GetPortions( sal_uInt16 nPara, std::vector<sal_uInt16>& rList ) const;
+    virtual void            GetPortions( sal_Int32 nPara, std::vector<sal_uInt16>& rList ) const;
 
     sal_uInt16              GetItemState( const ESelection& rSel, sal_uInt16 nWhich ) const;
-    sal_uInt16              GetItemState( sal_uInt16 nPara, sal_uInt16 nWhich ) const;
+    sal_uInt16              GetItemState( sal_Int32 nPara, sal_uInt16 nWhich ) const;
 
     virtual SfxItemPool*    GetPool() const;
 
@@ -199,38 +199,38 @@ public:
     virtual void            QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel );
     virtual void            QuickInsertLineBreak( const ESelection& rSel );
 
-    virtual XubString       CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
-    virtual void            FieldClicked( const SvxFieldItem& rField, sal_uInt16 nPara, xub_StrLen nPos );
+    virtual XubString       CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos, Color*& rpTxtColor, Color*& rpFldColor );
+    virtual void            FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, xub_StrLen nPos );
 
     virtual sal_Bool        IsValid() const;
 
     virtual void            SetNotifyHdl( const Link& );
-    virtual LanguageType    GetLanguage( sal_uInt16, sal_uInt16 ) const;
-    virtual sal_uInt16          GetFieldCount( sal_uInt16 nPara ) const;
-    virtual EFieldInfo      GetFieldInfo( sal_uInt16 nPara, sal_uInt16 nField ) const;
-    virtual EBulletInfo     GetBulletInfo( sal_uInt16 nPara ) const;
-    virtual Rectangle       GetCharBounds( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
-    virtual Rectangle       GetParaBounds( sal_uInt16 nPara ) const;
+    virtual LanguageType    GetLanguage( sal_Int32, sal_uInt16 ) const;
+    virtual sal_uInt16      GetFieldCount( sal_Int32 nPara ) const;
+    virtual EFieldInfo      GetFieldInfo( sal_Int32 nPara, sal_uInt16 nField ) const;
+    virtual EBulletInfo     GetBulletInfo( sal_Int32 nPara ) const;
+    virtual Rectangle       GetCharBounds( sal_Int32 nPara, sal_uInt16 nIndex ) const;
+    virtual Rectangle       GetParaBounds( sal_Int32 nPara ) const;
     virtual MapMode         GetMapMode() const;
     virtual OutputDevice*   GetRefDevice() const;
-    virtual sal_Bool        GetIndexAtPoint( const Point&, sal_uInt16& nPara, sal_uInt16& nIndex ) const;
-    virtual sal_Bool        GetWordIndices( sal_uInt16 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
-    virtual sal_Bool        GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_uInt16 nPara, sal_uInt16 nIndex ) const;
-    virtual sal_uInt16          GetLineCount( sal_uInt16 nPara ) const;
-    virtual sal_uInt16          GetLineLen( sal_uInt16 nPara, sal_uInt16 nLine ) const;
-    virtual void            GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_uInt16 nParagraph, sal_uInt16 nLine ) const;
-    virtual sal_uInt16          GetLineNumberAtIndex( sal_uInt16 nPara, sal_uInt16 nIndex ) const;
+    virtual sal_Bool        GetIndexAtPoint( const Point&, sal_Int32& nPara, sal_uInt16& nIndex ) const;
+    virtual sal_Bool        GetWordIndices( sal_Int32 nPara, sal_uInt16 nIndex, sal_uInt16& nStart, sal_uInt16& nEnd ) const;
+    virtual sal_Bool        GetAttributeRun( sal_uInt16& nStartIndex, sal_uInt16& nEndIndex, sal_Int32 nPara, sal_uInt16 nIndex ) const;
+    virtual sal_uInt16      GetLineCount( sal_Int32 nPara ) const;
+    virtual sal_uInt16      GetLineLen( sal_Int32 nPara, sal_uInt16 nLine ) const;
+    virtual void            GetLineBoundaries( /*out*/sal_uInt16 &rStart, /*out*/sal_uInt16 &rEnd, sal_Int32 nParagraph, sal_uInt16 nLine ) const;
+    virtual sal_uInt16      GetLineNumberAtIndex( sal_Int32 nPara, sal_uInt16 nIndex ) const;
     virtual sal_Bool        Delete( const ESelection& );
     virtual sal_Bool        InsertText( const String&, const ESelection& );
     virtual sal_Bool        QuickFormatDoc( sal_Bool bFull=sal_False );
-    virtual sal_Int16       GetDepth( sal_uInt16 nPara ) const;
-    virtual sal_Bool        SetDepth( sal_uInt16 nPara, sal_Int16 nNewDepth );
+    virtual sal_Int16       GetDepth( sal_Int32 nPara ) const;
+    virtual sal_Bool        SetDepth( sal_Int32 nPara, sal_Int16 nNewDepth );
 
     virtual const SfxItemSet*   GetEmptyItemSetPtr();
 
     // implementation functions for XParagraphAppend and XTextPortionAppend
     virtual void        AppendParagraph();
-    virtual xub_StrLen  AppendTextPortion( sal_uInt16 nPara, const String &rText, const SfxItemSet &rSet );
+    virtual xub_StrLen  AppendTextPortion( sal_Int32 nPara, const String &rText, const SfxItemSet &rSet );
     //XTextCopy
     virtual void        CopyText(const SvxTextForwarder& rSource);
 };
@@ -494,7 +494,7 @@ class SvxUnoTextContentEnumeration : public ::cppu::WeakAggImplHelper1< ::com::s
 private:
     ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > mxParentText;
     SvxEditSource*          mpEditSource;
-    sal_uInt16              mnNextParagraph;
+    sal_Int32               mnNextParagraph;
     const SvxUnoTextBase&   mrText;
 
 public:
@@ -518,7 +518,7 @@ class SvxUnoTextContent : public SvxUnoTextRangeBase,
     friend class SvxUnoTextContentEnumeration;
 private:
     ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > mxParentText;
-    sal_uInt16              mnParagraph;
+    sal_Int32               mnParagraph;
     const SvxUnoTextBase&   mrParentText;
 
     // for xComponent
@@ -531,7 +531,7 @@ protected:
     using SvxUnoTextRangeBase::getPropertyValue;
 
 public:
-    SvxUnoTextContent( const SvxUnoTextBase& rText, sal_uInt16 nPara ) throw();
+    SvxUnoTextContent( const SvxUnoTextBase& rText, sal_Int32 nPara ) throw();
     SvxUnoTextContent( const SvxUnoTextContent& rContent ) throw();
     virtual ~SvxUnoTextContent() throw();
 
@@ -590,12 +590,12 @@ private:
     SvxEditSource*      mpEditSource;
     ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > mxParentText;
     const SvxUnoTextBase&    mrParentText;
-    sal_uInt16               mnParagraph;
+    sal_Int32                mnParagraph;
     std::vector<sal_uInt16>* mpPortions;
     sal_uInt16               mnNextPortion;
 
 public:
-    SvxUnoTextRangeEnumeration( const SvxUnoTextBase& rText, sal_uInt16 nPara ) throw();
+    SvxUnoTextRangeEnumeration( const SvxUnoTextBase& rText, sal_Int32 nPara ) throw();
     virtual ~SvxUnoTextRangeEnumeration() throw();
 
     // ::com::sun::star::container::XEnumeration
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 602879e..e6e39ad 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -178,11 +178,11 @@ namespace accessibility
     {
         DBG_CHKTHIS( AccessibleEditableTextPara, NULL );
 
-        DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX,
+        DBG_ASSERT(GetParagraphIndex() >= 0 && GetParagraphIndex() <= SAL_MAX_INT32,
                    "AccessibleEditableTextPara::getLocale: paragraph index value overflow");
 
         // return locale of first character in the paragraph
-        return LanguageTag(GetTextForwarder().GetLanguage( static_cast< sal_uInt16 >( GetParagraphIndex() ), 0 )).getLocale();
+        return LanguageTag(GetTextForwarder().GetLanguage( GetParagraphIndex(), 0 )).getLocale();
     }
 
     void AccessibleEditableTextPara::implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex )
@@ -220,16 +220,16 @@ namespace accessibility
         SvxTextForwarder&   rCacheTF = GetTextForwarder();
         const sal_Int32     nParaIndex = GetParagraphIndex();
 
-        DBG_ASSERT(nParaIndex >= 0 && nParaIndex <= USHRT_MAX,
+        DBG_ASSERT(nParaIndex >= 0 && nParaIndex <= SAL_MAX_INT32,
                    "AccessibleEditableTextPara::implGetLineBoundary: paragraph index value overflow");
 
-        const sal_Int32 nTextLen = rCacheTF.GetTextLen( static_cast< sal_uInt16 >( nParaIndex ) );
+        const sal_Int32 nTextLen = rCacheTF.GetTextLen( nParaIndex );
 
         CheckPosition(nIndex);
 
         rBoundary.startPos = rBoundary.endPos = -1;
 
-        const sal_uInt16 nLineCount=rCacheTF.GetLineCount( static_cast< sal_uInt16 >( nParaIndex ) );
+        const sal_uInt16 nLineCount=rCacheTF.GetLineCount( nParaIndex );
 
         if( nIndex == nTextLen )
         {
@@ -237,7 +237,7 @@ namespace accessibility
             if( nLineCount <= 1 )
                 rBoundary.startPos = 0;
             else
-                rBoundary.startPos = nTextLen - rCacheTF.GetLineLen( static_cast< sal_uInt16 >( nParaIndex ),
+                rBoundary.startPos = nTextLen - rCacheTF.GetLineLen( nParaIndex,
                                                                      nLineCount-1 );
 
             rBoundary.endPos = nTextLen;
@@ -249,11 +249,11 @@ namespace accessibility
             sal_Int32 nCurIndex;
             for( nLine=0, nCurIndex=0; nLine<nLineCount; ++nLine )
             {
-                nCurIndex += rCacheTF.GetLineLen( static_cast< sal_uInt16 >( nParaIndex ), nLine);
+                nCurIndex += rCacheTF.GetLineLen( nParaIndex, nLine);
 
                 if( nCurIndex > nIndex )
                 {
-                    rBoundary.startPos = nCurIndex - rCacheTF.GetLineLen(static_cast< sal_uInt16 >( nParaIndex ), nLine);
+                    rBoundary.startPos = nCurIndex - rCacheTF.GetLineLen( nParaIndex, nLine);
                     rBoundary.endPos = nCurIndex;
                     break;
                 }
@@ -394,10 +394,10 @@ namespace accessibility
         // check overflow
         DBG_ASSERT(nStartEEIndex >= 0 && nStartEEIndex <= USHRT_MAX &&
                    nEndEEIndex >= 0 && nEndEEIndex <= USHRT_MAX &&
-                   GetParagraphIndex() >= 0 && GetParagraphIndex() <= USHRT_MAX,
+                   GetParagraphIndex() >= 0 && GetParagraphIndex() <= SAL_MAX_INT32,

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list