diff -ur ooo_SRC680_m143_src.orig/sw/inc/doc.hxx ooo_SRC680_m143_src/sw/inc/doc.hxx
--- ooo_SRC680_m143_src.orig/sw/inc/doc.hxx	2005-12-04 10:02:42.000000000 +0100
+++ ooo_SRC680_m143_src/sw/inc/doc.hxx	2005-12-04 10:04:09.000000000 +0100
@@ -1118,7 +1118,7 @@
 		// eine erzeugte Liste aller Felder mit uebergegeben werden.
 		// (ist die Adresse != 0, und der Pointer == 0 wird eine neue
 		// Liste returnt.)
-	void FldsToCalc( SwCalc& rCalc, sal_uInt32 nLastNd = ULONG_MAX,
+	void FldsToCalc( SwCalc& rCalc, ULONG nLastNd = ULONG_MAX,
 					sal_uInt16 nLastCntnt = USHRT_MAX );
 	void FldsToCalc( SwCalc& rCalc, const _SetGetExpFld& rToThisFld );
 	void FldsToExpand( SwHash**& ppTbl, sal_uInt16& rTblSize,
@@ -1556,7 +1556,7 @@
 											const SwTOXBase& rTOX,
 											const SfxItemSet* pSet = 0,
 											sal_Bool bExpand = sal_False );
-	const SwTOXBaseSection* InsertTableOf( sal_uInt32 nSttNd, sal_uInt32 nEndNd,
+	const SwTOXBaseSection* InsertTableOf( ULONG nSttNd, ULONG nEndNd,
 											const SwTOXBase& rTOX,
 											const SfxItemSet* pSet = 0											);
 	const SwTOXBase* GetCurTOX( const SwPosition& rPos ) const;
@@ -1867,7 +1867,7 @@
 	//Einfuegen einer Beschriftung - falls ein FlyFormat erzeugt wird, so
 	// returne dieses.
     SwFlyFrmFmt* InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
-					const sal_Bool bBefore, const sal_uInt16 nId, const sal_uInt32 nIdx,
+					const sal_Bool bBefore, const sal_uInt16 nId, const ULONG nIdx,
                     const String& rCharacterStyle,
 					const sal_Bool bCpyBrd = sal_True );
     SwFlyFrmFmt* InsertDrawLabel(
diff -ur ooo_SRC680_m143_src.orig/sw/inc/docufld.hxx ooo_SRC680_m143_src/sw/inc/docufld.hxx
--- ooo_SRC680_m143_src.orig/sw/inc/docufld.hxx	2005-12-04 10:02:42.000000000 +0100
+++ ooo_SRC680_m143_src/sw/inc/docufld.hxx	2005-12-04 10:04:09.000000000 +0100
@@ -205,7 +205,7 @@
 public:
 	SwAuthorFieldType();
 
-	String 					Expand(ULONG) const;
+	String 					Expand(sal_uInt32) const;
 	virtual SwFieldType*    Copy() const;
 };
 
@@ -240,7 +240,7 @@
 public:
 	SwFileNameFieldType(SwDoc*);
 
-	String					Expand(ULONG) const;
+	String					Expand(sal_uInt32) const;
 	virtual SwFieldType*    Copy() const;
 };
 
@@ -275,7 +275,7 @@
 public:
 	SwTemplNameFieldType(SwDoc*);
 
-	String					Expand(ULONG) const;
+	String					Expand(sal_uInt32) const;
 	virtual SwFieldType*    Copy() const;
 };
 
diff -ur ooo_SRC680_m143_src.orig/sw/inc/ndindex.hxx ooo_SRC680_m143_src/sw/inc/ndindex.hxx
--- ooo_SRC680_m143_src.orig/sw/inc/ndindex.hxx	2005-12-04 10:02:42.000000000 +0100
+++ ooo_SRC680_m143_src/sw/inc/ndindex.hxx	2005-12-04 10:04:09.000000000 +0100
@@ -68,8 +68,8 @@
 
 public:
 	SwNodeIndex( SwNodes& rNds, ULONG nIdx = 0 );
-	SwNodeIndex( const SwNodeIndex &, long nDiff = 0 );
-	SwNodeIndex( const SwNode&, long nDiff = 0 );
+	SwNodeIndex( const SwNodeIndex &, sal_Int32 nDiff = 0 );
+	SwNodeIndex( const SwNode&, sal_Int32 nDiff = 0 );
 	~SwNodeIndex() { Remove(); }
 
 	inline ULONG operator++();
@@ -107,7 +107,7 @@
 
 	// ermoeglicht Zuweisungen ohne Erzeugen eines temporaeren Objektes
 	SwNodeIndex& Assign( SwNodes& rNds, ULONG );
-	SwNodeIndex& Assign( const SwNode& rNd, long nOffset = 0 );
+	SwNodeIndex& Assign( const SwNode& rNd, sal_Int32 nOffset = 0 );
 
 		// Herausgabe des Pointers auf das NodesArray,
 	inline const SwNodes& GetNodes() const;
diff -ur ooo_SRC680_m143_src.orig/sw/inc/ndtxt.hxx ooo_SRC680_m143_src/sw/inc/ndtxt.hxx
--- ooo_SRC680_m143_src.orig/sw/inc/ndtxt.hxx	2005-12-04 10:02:42.000000000 +0100
+++ ooo_SRC680_m143_src/sw/inc/ndtxt.hxx	2005-12-04 10:04:09.000000000 +0100
@@ -243,7 +243,7 @@
 	void Replace( const SwIndex& rStart, xub_Unicode cCh );
 	void Replace( const SwIndex& rStart, xub_StrLen nLen, const XubString& rText );
 	void ReplaceTextOnly( xub_StrLen nPos, xub_StrLen nLen, const XubString& rText,
-					const ::com::sun::star::uno::Sequence<long>& rOffsets );
+					const ::com::sun::star::uno::Sequence<sal_Int32>& rOffsets );
 
 	// virtuelle Methoden aus dem CntntNode
 	virtual SwCntntFrm *MakeFrm();
diff -ur ooo_SRC680_m143_src.orig/sw/inc/undobj.hxx ooo_SRC680_m143_src/sw/inc/undobj.hxx
--- ooo_SRC680_m143_src.orig/sw/inc/undobj.hxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/inc/undobj.hxx	2005-12-04 10:04:09.000000000 +0100
@@ -1708,7 +1708,7 @@
 	virtual void Repeat( SwUndoIter& rUndoIter );
 
 	void AddChanges( const SwTxtNode& rTNd, xub_StrLen nStart, xub_StrLen nLen,
-		 			::com::sun::star::uno::Sequence <long>& rOffsets );
+		 			::com::sun::star::uno::Sequence <sal_Int32>& rOffsets );
 	BOOL HasData() const {return 0 != pData; }
 };
 
diff -ur ooo_SRC680_m143_src.orig/sw/inc/viewsh.hxx ooo_SRC680_m143_src/sw/inc/viewsh.hxx
--- ooo_SRC680_m143_src.orig/sw/inc/viewsh.hxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/inc/viewsh.hxx	2005-12-04 10:04:09.000000000 +0100
@@ -313,7 +313,7 @@
 
 	//Wird intern fuer die Shell gerufen die Druckt. Formatiert die Seiten.
 	void CalcPagesForPrint( sal_uInt16 nMax, SfxProgress* pProgress = 0,
-		const String* pStr = NULL, sal_uInt32 nMergeAct = 0, sal_uInt32 nMergeCnt = 0 );
+		const String* pStr = NULL, ULONG nMergeAct = 0, ULONG nMergeCnt = 0 );
 
 	//All about fields.
 	void UpdateFlds(sal_Bool bCloseDB = sal_False);
diff -ur ooo_SRC680_m143_src.orig/sw/source/core/doc/docedt.cxx ooo_SRC680_m143_src/sw/source/core/doc/docedt.cxx
--- ooo_SRC680_m143_src.orig/sw/source/core/doc/docedt.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/core/doc/docedt.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -1839,13 +1839,13 @@
                             pSttPos->nNode.GetNode().GetTxtNode(), pSttPos->nContent,
                             pEndPos->nNode.GetNode().GetTxtNode(), pEndPos->nContent );
 
-	sal_uInt32 nCurrNd = pSttPos->nNode.GetIndex();
-	sal_uInt32 nEndNd = pEndPos->nNode.GetIndex();
+	ULONG nCurrNd = pSttPos->nNode.GetIndex();
+	ULONG nEndNd = pEndPos->nNode.GetIndex();
 
 	if( nCurrNd <= nEndNd )
 	{
 		SwCntntFrm* pCntFrm;
-		sal_uInt32 nCount = nEndNd - nCurrNd;
+		ULONG nCount = nEndNd - nCurrNd;
 		sal_Bool bGoOn = sal_True;
 		while( bGoOn )
 		{
@@ -2366,7 +2366,7 @@
 
 	/* #i9185# This whould lead to a segmentation fault if not catched
        above. */
-	sal_uInt32 nNextNd = rEnd.nNode.GetIndex() + 1;
+	ULONG nNextNd = rEnd.nNode.GetIndex() + 1;
 	SwTableNode* pTblNd = aNodes[ nNextNd ]->GetTableNode();
 
 	if( pTblNd && pNd->IsCntntNode() )
diff -ur ooo_SRC680_m143_src.orig/sw/source/core/doc/docfld.cxx ooo_SRC680_m143_src/sw/source/core/doc/docfld.cxx
--- ooo_SRC680_m143_src.orig/sw/source/core/doc/docfld.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/core/doc/docfld.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -2217,7 +2217,7 @@
 		ResetModified();
 }
 
-BOOL SwDoc::SetFieldsDirty( BOOL b, const SwNode* pChk, ULONG nLen )
+BOOL SwDoc::SetFieldsDirty( BOOL b, const SwNode* pChk, sal_uInt32 nLen )
 {
 	// teste ggfs. mal, ob die angegbenen Nodes ueberhaupt Felder beinhalten.
 	// wenn nicht, braucht das Flag nicht veraendert werden.
diff -ur ooo_SRC680_m143_src.orig/sw/source/core/doc/doclay.cxx ooo_SRC680_m143_src/sw/source/core/doc/doclay.cxx
--- ooo_SRC680_m143_src.orig/sw/source/core/doc/doclay.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/core/doc/doclay.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -1330,7 +1330,7 @@
 
 
 SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator,
-			const sal_Bool bBefore, const sal_uInt16 nId, const sal_uInt32 nNdIdx,
+			const sal_Bool bBefore, const sal_uInt16 nId, const ULONG nNdIdx,
             const String& rCharacterStyle,
 			const sal_Bool bCpyBrd )
 {
@@ -1383,7 +1383,7 @@
 			{
 				SwStartNode *pSttNd = GetNodes()[nNdIdx]->GetStartNode();
 				ASSERT( pSttNd, "Kein StartNode in InsertLabel." );
-				sal_uInt32 nNode;
+				ULONG nNode;
 				if( bBefore )
 				{
 					nNode = pSttNd->GetIndex();
diff -ur ooo_SRC680_m143_src.orig/sw/source/core/docnode/ndindex.cxx ooo_SRC680_m143_src/sw/source/core/docnode/ndindex.cxx
--- ooo_SRC680_m143_src.orig/sw/source/core/docnode/ndindex.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/core/docnode/ndindex.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -80,7 +80,7 @@
 }
 
 
-SwNodeIndex::SwNodeIndex( const SwNodeIndex& rIdx, long nDiff )
+SwNodeIndex::SwNodeIndex( const SwNodeIndex& rIdx, sal_Int32 nDiff )
 	: pNext( 0 ), pPrev( 0 )
 {
 	if( nDiff )
@@ -95,7 +95,7 @@
 }
 
 
-SwNodeIndex::SwNodeIndex( const SwNode& rNd, long nDiff )
+SwNodeIndex::SwNodeIndex( const SwNode& rNd, sal_Int32 nDiff )
 	: pNext( 0 ), pPrev( 0 )
 {
 	if( nDiff )
@@ -154,7 +154,7 @@
 	return *this;
 }
 
-SwNodeIndex& SwNodeIndex::Assign( const SwNode& rNd, long nOffset )
+SwNodeIndex& SwNodeIndex::Assign( const SwNode& rNd, sal_Int32 nOffset )
 {
 	if( &pNd->GetNodes() != &rNd.GetNodes() )
 	{
diff -ur ooo_SRC680_m143_src.orig/sw/source/core/edit/editsh.cxx ooo_SRC680_m143_src/sw/source/core/edit/editsh.cxx
--- ooo_SRC680_m143_src.orig/sw/source/core/edit/editsh.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/core/edit/editsh.cxx	2005-12-04 10:32:12.000000000 +0100
@@ -960,8 +960,8 @@
         else
             MakeFindRange(DOCPOS_OTHERSTART, DOCPOS_OTHEREND, pCrsr); //extra content
         SwPosition* pSttPos = pCrsr->Start(), *pEndPos = pCrsr->End();
-        sal_uInt32 nCurrNd = pSttPos->nNode.GetIndex();
-        sal_uInt32 nEndNd = pEndPos->nNode.GetIndex();
+        ULONG nCurrNd = pSttPos->nNode.GetIndex();
+        ULONG nEndNd = pEndPos->nNode.GetIndex();
         if( nCurrNd <= nEndNd )
         {
             SwCntntFrm* pCntFrm;
diff -ur ooo_SRC680_m143_src.orig/sw/source/core/inc/frmtool.hxx ooo_SRC680_m143_src/sw/source/core/inc/frmtool.hxx
--- ooo_SRC680_m143_src.orig/sw/source/core/inc/frmtool.hxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/core/inc/frmtool.hxx	2005-12-04 10:33:43.000000000 +0100
@@ -95,7 +95,7 @@
 SwFlyFrm *GetFlyFromMarked( const SdrMarkList *pLst, ViewShell *pSh );
 
 //Nicht gleich die math.lib anziehen.
-ULONG MA_FASTCALL SqRt( BigInt nX );
+sal_uInt32 MA_FASTCALL SqRt( BigInt nX );
 
 //CntntNodes besorgen, CntntFrms erzeugen und in den LayFrm haengen.
 void MA_FASTCALL _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, ULONG nIndex,
diff -ur ooo_SRC680_m143_src.orig/sw/source/core/layout/flycnt.cxx ooo_SRC680_m143_src/sw/source/core/layout/flycnt.cxx
--- ooo_SRC680_m143_src.orig/sw/source/core/layout/flycnt.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/core/layout/flycnt.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -866,7 +866,7 @@
 		{
 			//Jetzt die Entfernung zwischen den beiden Punkten berechnen.
 			//'Delta' X^2 + 'Delta'Y^2 = 'Entfernung'^2
-			ULONG dX = Max( pCnt->Frm().Left(), rPt.X() ) -
+			sal_uInt32 dX = Max( pCnt->Frm().Left(), rPt.X() ) -
 					   Min( pCnt->Frm().Left(), rPt.X() ),
 				  dY = Max( pCnt->Frm().Top(), rPt.Y() ) -
 					   Min( pCnt->Frm().Top(), rPt.Y() );
diff -ur ooo_SRC680_m143_src.orig/sw/source/core/layout/frmtool.cxx ooo_SRC680_m143_src/sw/source/core/layout/frmtool.cxx
--- ooo_SRC680_m143_src.orig/sw/source/core/layout/frmtool.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/core/layout/frmtool.cxx	2005-12-04 10:33:43.000000000 +0100
@@ -2822,7 +2822,7 @@
 |*
 |*************************************************************************/
 
-ULONG MA_FASTCALL SqRt( BigInt nX )
+sal_uInt32 MA_FASTCALL SqRt( BigInt nX )
 {
 	BigInt nErg = 1;
 
@@ -2835,7 +2835,7 @@
 			nOldErg = nErg;
 		}
 	}
-	return nErg >= BigInt((ULONG)ULONG_MAX) ? ULONG_MAX : (ULONG)nErg;
+	return nErg >= BigInt(SAL_MAX_UINT32) ? SAL_MAX_UINT32 : (sal_uInt32)nErg;
 }
 
 /*************************************************************************
diff -ur ooo_SRC680_m143_src.orig/sw/source/core/layout/trvlfrm.cxx ooo_SRC680_m143_src/sw/source/core/layout/trvlfrm.cxx
--- ooo_SRC680_m143_src.orig/sw/source/core/layout/trvlfrm.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/core/layout/trvlfrm.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -1124,11 +1124,11 @@
 |*	Letzte Aenderung	MA 09. Jan. 97
 |*
 |*************************************************************************/
-ULONG CalcDiff( const Point &rPt1, const Point &rPt2 )
+sal_uInt32 CalcDiff( const Point &rPt1, const Point &rPt2 )
 {
 	//Jetzt die Entfernung zwischen den beiden Punkten berechnen.
 	//'Delta' X^2 + 'Delta'Y^2 = 'Entfernung'^2
-	ULONG dX = Max( rPt1.X(), rPt2.X() ) -
+	sal_uInt32 dX = Max( rPt1.X(), rPt2.X() ) -
 			   Min( rPt1.X(), rPt2.X() ),
 		  dY = Max( rPt1.Y(), rPt2.Y() ) -
 			   Min( rPt1.Y(), rPt2.Y() );
@@ -1189,7 +1189,7 @@
 	const SwLayoutFrm *pInside = NULL;
 	USHORT nMaxPage = GetPhyPageNum() + (bDefaultExpand ? 1 : 0);
 	Point aPoint = rPoint;
-	ULONG nDistance = ULONG_MAX;
+	sal_uInt32 nDistance = SAL_MAX_UINT32;
 
 	while ( TRUE ) 	//Sicherheitsschleifchen, damit immer einer gefunden wird.
 	{
@@ -1242,7 +1242,7 @@
 					if( !pInside || ( pInside->IsAnLower( pCntnt ) &&
 						( !pCntnt->IsInFtn() || pInside->IsFtnContFrm() ) ) )
 					{
-						const ULONG nDiff = ::CalcDiff( aCntntPoint, rPoint );
+						const sal_uInt32 nDiff = ::CalcDiff( aCntntPoint, rPoint );
 						BOOL bBetter = nDiff < nDistance;  // Dichter dran
 						if( !pInside )
 						{
@@ -1403,7 +1403,7 @@
 
 	const SwCntntFrm *pAct = pCntnt;
 	Point aAct 		 = rPt;
-	ULONG nDist		 = ULONG_MAX;
+	sal_uInt32 nDist = SAL_MAX_UINT32;
 
 	while ( pCntnt )
 	{
@@ -1430,7 +1430,7 @@
 		else if ( aCntFrm.Right() < rPt.X() )
 			aPoint.X() = aCntFrm.Right();
 
-		const ULONG nDiff = ::CalcDiff( aPoint, rPt );
+		const sal_uInt32 nDiff = ::CalcDiff( aPoint, rPt );
 		if ( nDiff < nDist )
 		{
 			aAct	= aPoint;
diff -ur ooo_SRC680_m143_src.orig/sw/source/core/txtnode/txtedt.cxx ooo_SRC680_m143_src/sw/source/core/txtnode/txtedt.cxx
--- ooo_SRC680_m143_src.orig/sw/source/core/txtnode/txtedt.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/core/txtnode/txtedt.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -643,12 +643,12 @@
                 pBreakIt->xBreak->getScriptType( rText, nBegin );
 
         XubString aTmpWord = rText.Copy( nBegin, static_cast<xub_StrLen>(aBound.endPos - nBegin) );
-        const long nScriptEnd = nBegin +
+        const sal_Int32 nScriptEnd = nBegin +
             pBreakIt->xBreak->endOfScript( aTmpWord, 0, nCurrScript );
         const long nEnd = Min( aBound.endPos, nScriptEnd );
 
         // restrict word start to last script change position
-        long nScriptBegin = 0;
+        sal_Int32 nScriptBegin = 0;
         if ( aBound.startPos < nBegin )
         {
             // search from nBegin backwards until the next script change
@@ -668,7 +668,7 @@
                 pBreakIt->xBreak->getScriptType( rText, aBound.startPos );
         XubString aTmpWord = rText.Copy( static_cast<xub_StrLen>(aBound.startPos),
                                          static_cast<xub_StrLen>(aBound.endPos - aBound.startPos) );
-        const long nScriptEnd = aBound.startPos +
+        const sal_Int32 nScriptEnd = aBound.startPos +
             pBreakIt->xBreak->endOfScript( aTmpWord, 0, nCurrScript );
         const long nEnd = Min( aBound.endPos, nScriptEnd );
         nBegin = (xub_StrLen)aBound.startPos;
@@ -1458,7 +1458,7 @@
 			}
 			xub_StrLen nLen = nEndPos - nStart;
 
-			Sequence <long> aOffsets;
+			Sequence <sal_Int32> aOffsets;
 			String sChgd( rTrans.transliterate( aText, nLang, nStart, nLen,
 													&aOffsets ));
 			if( !aText.Equals( sChgd, nStart, nLen ) )
@@ -1476,12 +1476,12 @@
 
 void SwTxtNode::ReplaceTextOnly( xub_StrLen nPos, xub_StrLen nLen,
 								const XubString& rText,
-								const Sequence<long>& rOffsets )
+								const Sequence<sal_Int32>& rOffsets )
 {
 	aText.Replace( nPos, nLen, rText );
 
 	xub_StrLen nTLen = rText.Len();
-	const long* pOffsets = rOffsets.getConstArray();
+	const sal_Int32* pOffsets = rOffsets.getConstArray();
 	// now look for no 1-1 mapping -> move the indizies!
 	xub_StrLen nI, nMyOff;
 	for( nI = 0, nMyOff = nPos; nI < nTLen; ++nI, ++nMyOff )
diff -ur ooo_SRC680_m143_src.orig/sw/source/core/undo/unovwr.cxx ooo_SRC680_m143_src/sw/source/core/undo/unovwr.cxx
--- ooo_SRC680_m143_src.orig/sw/source/core/undo/unovwr.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/core/undo/unovwr.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -385,7 +385,7 @@
 	String sText;
 	_UndoTransliterate_Data* pNext;
 	SwHistory* pHistory;
-	Sequence <long>* pOffsets;
+	Sequence <sal_Int32>* pOffsets;
 	ULONG nNdIdx;
 	xub_StrLen nStart, nLen;
 
@@ -452,7 +452,7 @@
 
 void SwUndoTransliterate::AddChanges( const SwTxtNode& rTNd,
 					xub_StrLen nStart, xub_StrLen nLen,
-		 			::com::sun::star::uno::Sequence <long>& rOffsets )
+		 			::com::sun::star::uno::Sequence <sal_Int32>& rOffsets )
 {
 	long nOffsLen = rOffsets.getLength();
 	_UndoTransliterate_Data* pNew = new _UndoTransliterate_Data(
@@ -464,17 +464,17 @@
 		pData = pNew;
 	pLastData = pNew;
 
-	const long* pOffsets = rOffsets.getConstArray();
+	const sal_Int32* pOffsets = rOffsets.getConstArray();
 	// where did we need less memory ?
 	// check for 1-1 mappings:
 	BOOL bOneToOne = TRUE;
-	const long* p = pOffsets;
+	const sal_Int32* p = pOffsets;
 	for( long n = 0; n < nOffsLen; ++n, ++p )
 		if( *p != ( nStart + n ))
 		{
 			// create the Offset array
-			pNew->pOffsets = new Sequence <long> ( nLen );
-			long* pIdx = pNew->pOffsets->getArray();
+			pNew->pOffsets = new Sequence <sal_Int32> ( nLen );
+			sal_Int32* pIdx = pNew->pOffsets->getArray();
 			p = pOffsets;
 			long nMyOff, nNewVal = nStart;
 			for( n = 0, nMyOff = nStart; n < nOffsLen; ++p, ++n, ++nMyOff )
@@ -528,12 +528,12 @@
 	SwTxtNode* pTNd = rDoc.GetNodes()[ nNdIdx ]->GetTxtNode();
 	if( pTNd )
 	{
-		Sequence <long> aOffsets( pOffsets ? pOffsets->getLength() : nLen );
+		Sequence <sal_Int32> aOffsets( pOffsets ? pOffsets->getLength() : nLen );
 		if( pOffsets )
 			aOffsets = *pOffsets;
 		else
 		{
-			long* p = aOffsets.getArray();
+			sal_Int32* p = aOffsets.getArray();
 			for( xub_StrLen n = 0; n < nLen; ++n, ++p )
 				*p = n + nStart;
 		}
diff -ur ooo_SRC680_m143_src.orig/sw/source/core/unocore/unoobj.cxx ooo_SRC680_m143_src/sw/source/core/unocore/unoobj.cxx
--- ooo_SRC680_m143_src.orig/sw/source/core/unocore/unoobj.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/core/unocore/unoobj.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -844,14 +844,14 @@
 	sal_Bool bError = sal_False;
 	FOREACHUNOPAM_START(&rPam)
 
-		sal_uInt32 nSttNd = PUNOPAM->GetMark()->nNode.GetIndex(),
+		ULONG nSttNd = PUNOPAM->GetMark()->nNode.GetIndex(),
 			  nEndNd = PUNOPAM->GetPoint()->nNode.GetIndex();
 		xub_StrLen nSttCnt = PUNOPAM->GetMark()->nContent.GetIndex(),
 				nEndCnt = PUNOPAM->GetPoint()->nContent.GetIndex();
 
 		if( nSttNd > nEndNd || ( nSttNd == nEndNd && nSttCnt > nEndCnt ))
 		{
-			sal_uInt32 nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
+			ULONG nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
 			nTmp = nSttCnt; nSttCnt = nEndCnt; nEndCnt = (sal_uInt16)nTmp;
 		}
 
@@ -862,7 +862,7 @@
 		}
 
 		const SwNodes& rNds = rPam.GetDoc()->GetNodes();
-		for( sal_uInt32 n = nSttNd; n <= nEndNd; ++n )
+		for( ULONG n = nSttNd; n <= nEndNd; ++n )
 		{
 			const SwTxtNode* pNd = rNds[ n ]->GetTxtNode();
 			if( pNd )
diff -ur ooo_SRC680_m143_src.orig/sw/source/core/unocore/unoobj2.cxx ooo_SRC680_m143_src/sw/source/core/unocore/unoobj2.cxx
--- ooo_SRC680_m143_src.orig/sw/source/core/unocore/unoobj2.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/core/unocore/unoobj2.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -1025,14 +1025,14 @@
 	SwPaM *_pStartCrsr = &rPam;
 	do
 	{
-		sal_uInt32 nSttNd = _pStartCrsr->GetMark()->nNode.GetIndex(),
+		ULONG nSttNd = _pStartCrsr->GetMark()->nNode.GetIndex(),
 					nEndNd = _pStartCrsr->GetPoint()->nNode.GetIndex();
 			xub_StrLen nSttCnt = _pStartCrsr->GetMark()->nContent.GetIndex(),
 					nEndCnt = _pStartCrsr->GetPoint()->nContent.GetIndex();
 
 			if( nSttNd > nEndNd || ( nSttNd == nEndNd && nSttCnt > nEndCnt ))
 			{
-				sal_uInt32 nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
+				ULONG nTmp = nSttNd; nSttNd = nEndNd; nEndNd = nTmp;
 				nTmp = nSttCnt; nSttCnt = nEndCnt; nEndCnt = (sal_uInt16)nTmp;
 			}
 
@@ -1045,7 +1045,7 @@
 
 			// beim 1.Node traegt der Node die Werte in den GetSet ein (Initial)
 			// alle weiteren Nodes werden zum GetSet zu gemergt
-			for( sal_uInt32 n = nSttNd; n <= nEndNd; ++n )
+			for( ULONG n = nSttNd; n <= nEndNd; ++n )
 			{
 				SwNode* pNd = rPam.GetDoc()->GetNodes()[ n ];
 				switch( pNd->GetNodeType() )
diff -ur ooo_SRC680_m143_src.orig/sw/source/core/unocore/unosett.cxx ooo_SRC680_m143_src/sw/source/core/unocore/unosett.cxx
--- ooo_SRC680_m143_src.orig/sw/source/core/unocore/unosett.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/core/unocore/unosett.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -1098,7 +1098,7 @@
 				{
 					INT32 nVal;
 					aValue >>= nVal;
-					aInfo.SetPosFromLeft(Min(MM100_TO_TWIP(nVal), sal_Int32(0xffff)));
+					aInfo.SetPosFromLeft(Min((sal_Int32)MM100_TO_TWIP(nVal), sal_Int32(0xffff)));
 				}
 				break;
 				case WID_INTERVAL   :
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/excel/exctools.cxx ooo_SRC680_m143_src/sw/source/filter/excel/exctools.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/excel/exctools.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/excel/exctools.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -1327,14 +1327,14 @@
 	}
 
 //------------------------------------------------------------------------
-UINT32 ValueFormBuffer::__GetValueFormat( UINT16 nExcIndex )
+sal_uInt32 ValueFormBuffer::__GetValueFormat( UINT16 nExcIndex )
 	{
 	Init();
 	return ( this->*_GetValueFormat )( nExcIndex );
 	}
 
 //------------------------------------------------------------------------
-UINT32 ValueFormBuffer::_GetValueFormatX5( UINT16 nExcIndex )
+sal_uInt32 ValueFormBuffer::_GetValueFormatX5( UINT16 nExcIndex )
 	{
 	DBG_ASSERT( nExcIndex < nCount,
 		"+ValueFormBuffer::GetValueFormat(): Da kann ich auch nichts fuer!" );
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/excel/excvfbff.hxx ooo_SRC680_m143_src/sw/source/filter/excel/excvfbff.hxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/excel/excvfbff.hxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/excel/excvfbff.hxx	2005-12-04 10:04:09.000000000 +0100
@@ -50,18 +50,18 @@
 #endif
 
 class ValueFormBuffer
-	{
+{
 	private:
 #if !defined(BLC) && !defined(MAC)
-// MSC will es auf jeden Fall hier
+		// MSC will es auf jeden Fall hier
 		typedef void		( ValueFormBuffer::*Fkt_rString )( String & );
-		typedef ULONG		( ValueFormBuffer::*Fkt_USHORT )( USHORT );
+		typedef sal_uInt32	( ValueFormBuffer::*Fkt_USHORT )( USHORT );
 #endif
 
-		ULONG				*pHandles;		// Array mit Handles...
+		sal_uInt32			*pHandles;		// Array mit Handles...
 		USHORT				nMax;  			// Groesse des Arrays
 		USHORT				nCount;			// Index des naechsten freien Eintrags
-		ULONG				nDefaultHandle;
+		sal_uInt32			nDefaultHandle;
 
 		// nur fuer Excel5
 		static const USHORT nAnzBuiltin;	// bekannte Formate
@@ -74,17 +74,17 @@
 		void				Init( void );
 							// fuer 1. Nutzung
 		void				__NewValueFormat( String &rFormString );
-		ULONG				__GetValueFormat( USHORT nExcIndex );
+		sal_uInt32			__GetValueFormat( USHORT nExcIndex );
 							// fuer n-te Nutzung
 		void				_NewValueFormatX( String &rFormString );
 		void				_NewValueFormat5( String &rFormString );
-		ULONG				_GetValueFormatX5( USHORT nExcIndex );
+		sal_uInt32			_GetValueFormatX5( USHORT nExcIndex );
 	public:
 		ValueFormBuffer( const USHORT nSize = 2048 );
 		~ValueFormBuffer();
 
 		inline void			NewValueFormat( String &rFormString );
-		inline ULONG		GetValueFormat( USHORT nExcIndex );
+		inline sal_uInt32	GetValueFormat( USHORT nExcIndex );
 	};
 
 inline void ValueFormBuffer::NewValueFormat( String &rFormString )
@@ -92,7 +92,7 @@
 	( this->*_NewValueFormat )( rFormString );
 	}
 
-inline ULONG ValueFormBuffer::GetValueFormat( USHORT nExcIndex )
+inline sal_uInt32 ValueFormBuffer::GetValueFormat( USHORT nExcIndex )
 	{
 	return ( this->*_GetValueFormat )( nExcIndex );
 	}
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/html/css1atr.cxx ooo_SRC680_m143_src/sw/source/filter/html/css1atr.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/html/css1atr.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/html/css1atr.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -2220,7 +2220,7 @@
 //-----------------------------------------------------------------------
 
 void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
-										  ULONG nFrmOpts,
+										  sal_uInt32 nFrmOpts,
 										  const SdrObject *pSdrObj,
 										  const SfxItemSet *pItemSet )
 {
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/html/htmlatr.cxx ooo_SRC680_m143_src/sw/source/filter/html/htmlatr.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/html/htmlatr.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/html/htmlatr.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -2857,7 +2857,7 @@
 }
 
 
-ULONG SwHTMLWriter::ToPixel( ULONG nVal ) const
+sal_uInt32 SwHTMLWriter::ToPixel( sal_uInt32 nVal ) const
 {
 	if( Application::GetDefaultDevice() && nVal )
 	{
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/html/htmlcss1.cxx ooo_SRC680_m143_src/sw/source/filter/html/htmlcss1.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/html/htmlcss1.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/html/htmlcss1.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -183,7 +183,7 @@
 	ASSERT( i<nPageDescs, "Seitenvorlage nicht gefunden" );
 }
 
-SwCSS1Parser::SwCSS1Parser( SwDoc *pD, ULONG aFHeights[7], const String& rBaseURL, BOOL bNewDoc ) :
+SwCSS1Parser::SwCSS1Parser( SwDoc *pD, sal_uInt32 aFHeights[7], const String& rBaseURL, BOOL bNewDoc ) :
     SvxCSS1Parser( pD->GetAttrPool(), rBaseURL, MM50/2,
 				   (USHORT*)&aItemIds, sizeof(aItemIds) / sizeof(USHORT) ),
 	nDropCapCnt( 0 ), bIsNewDoc( bNewDoc ), pDoc( pD ),
@@ -1213,7 +1213,7 @@
 	return TRUE;
 }
 
-ULONG SwCSS1Parser::GetFontHeight( USHORT nSize ) const
+sal_uInt32 SwCSS1Parser::GetFontHeight( USHORT nSize ) const
 {
 	return aFontHeights[ nSize>6 ? 6 : nSize ];
 }
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/html/htmlfly.cxx ooo_SRC680_m143_src/sw/source/filter/html/htmlfly.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/html/htmlfly.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/html/htmlfly.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -440,7 +440,7 @@
 	}
 }
 
-BOOL SwHTMLWriter::OutFlyFrm( ULONG nNdIdx, xub_StrLen nCntntIdx, BYTE nPos, 
+BOOL SwHTMLWriter::OutFlyFrm( sal_uInt32 nNdIdx, xub_StrLen nCntntIdx, BYTE nPos,
 							  HTMLOutContext *pContext )
 {
 	BOOL bFlysLeft = FALSE;	// Noch Flys an aktueller Node-Position da?
@@ -610,7 +610,7 @@
 void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
 									 const String& rAlternateTxt,
 									 ByteString &rEndTags,
-									 ULONG nFrmOpts )
+									 sal_uInt32 nFrmOpts )
 {
 	ByteString sOut;
 	const SfxPoolItem* pItem;
@@ -881,7 +881,7 @@
 
 Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
 					   const String &rGrfName, const String& rAlternateTxt,
-					   const Size &rRealSize, ULONG nFrmOpts,
+					   const Size &rRealSize, sal_uInt32 nFrmOpts,
 					   const sal_Char *pMarkType,
 					   const ImageMap *pAltImgMap )
 {
@@ -1625,7 +1625,7 @@
         INetURLObject(rWrt.GetBaseURL()), aGrfNm,
         URIHelper::GetMaybeFileHdl() );
 	Size aSz( 0, 0 );
-	ULONG nFrmFlags = bInCntnr ? HTML_FRMOPTS_GENIMG_CNTNR
+	sal_uInt32 nFrmFlags = bInCntnr ? HTML_FRMOPTS_GENIMG_CNTNR
 								: HTML_FRMOPTS_GENIMG;
 	OutHTML_Image( rWrt, rFrmFmt, aGrfNm, rFrmFmt.GetName(), aSz,
 					HTML_FRMOPTS_GENIMG, pMarkToFrame,
@@ -1690,7 +1690,7 @@
 			rWrt.CopyLocalFileToINet( aGrfNm );
 	}
 
-	ULONG nFrmFlags = bInCntnr ? HTML_FRMOPTS_IMG_CNTNR : HTML_FRMOPTS_IMG;
+	sal_uInt32 nFrmFlags = bInCntnr ? HTML_FRMOPTS_IMG_CNTNR : HTML_FRMOPTS_IMG;
 	if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bInCntnr )
 		nFrmFlags |= HTML_FRMOPTS_IMG_CSS1;
 	OutHTML_Image( rWrt, rFrmFmt, aGrfNm, pGrfNd->GetAlternateText(),
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/html/htmlforw.cxx ooo_SRC680_m143_src/sw/source/filter/html/htmlforw.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/html/htmlforw.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/html/htmlforw.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -418,7 +418,7 @@
             aHTMLControls[i]->nNdIdx <= nEndIdx; i++ )
         {
             const SwStartNode *pCntrlStNd =
-                pDoc->GetNodes()[aHTMLControls[i]->nNdIdx]->FindStartNode();
+                pDoc->GetNodes()[ ULONG( aHTMLControls[i]->nNdIdx ) ]->FindStartNode();
 
             if( xCurrentFormComps.is() )
             {
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/html/htmlnum.cxx ooo_SRC680_m143_src/sw/source/filter/html/htmlnum.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/html/htmlnum.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/html/htmlnum.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -693,7 +693,7 @@
 {
 	pNextNumRuleInfo = 0;
 
-	sal_uInt32 nPos = pCurPam->GetPoint()->nNode.GetIndex() + 1;
+	ULONG nPos = pCurPam->GetPoint()->nNode.GetIndex() + 1;
 
 	sal_Bool bDone = sal_False;
 	sal_Bool bTable = sal_False;
@@ -768,7 +768,7 @@
 				bStartValue = sal_True;
 				if( rInfo.GetDepth() > 1 )
 				{
-					sal_uInt32 nPos =
+					ULONG nPos =
 						rWrt.pCurPam->GetPoint()->nNode.GetIndex() + 1;
 					do
 					{
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/html/htmlsect.cxx ooo_SRC680_m143_src/sw/source/filter/html/htmlsect.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/html/htmlsect.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/html/htmlsect.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -480,7 +480,7 @@
 	const SwFmtCntnt& rFlyCntnt = pHdFtFmt->GetCntnt();
 	const SwNodeIndex& rCntntStIdx = *rFlyCntnt.GetCntntIdx();
 
-	sal_uInt32 nPrvNxtIdx;
+	ULONG nPrvNxtIdx;
 	if( bHeader )
 	{
 		nPrvNxtIdx = pDoc->GetNodes()[rCntntStIdx]->EndOfSectionIndex()-1;
@@ -855,7 +855,7 @@
 /*  */
 
 void SwHTMLParser::MovePageDescAttrs( SwNode *pSrcNd,
-									  sal_uInt32 nDestIdx,
+									  ULONG nDestIdx,
 									  sal_Bool bFmtBreak )
 {
 	SwCntntNode* pDestCntntNd =
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/html/htmltabw.cxx ooo_SRC680_m143_src/sw/source/filter/html/htmltabw.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/html/htmltabw.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/html/htmltabw.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -389,7 +389,7 @@
 	sal_Bool bHead = sal_False;
 	if( pSttNd )
 	{
-		sal_uInt32 nNdPos = pSttNd->GetIndex()+1;
+		ULONG nNdPos = pSttNd->GetIndex()+1;
 
 		// Art der Zelle (TD/TH) bestimmen
 		SwNode* pNd;
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/html/svxcss1.cxx ooo_SRC680_m143_src/sw/source/filter/html/svxcss1.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/html/svxcss1.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/html/svxcss1.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -1040,7 +1040,7 @@
 	aBorderLine.SetDistance( aWidths[i+3] );
 }
 
-ULONG SvxCSS1Parser::GetFontHeight( USHORT nSize ) const
+sal_uInt32 SvxCSS1Parser::GetFontHeight( USHORT nSize ) const
 {
 	USHORT nHeight;
 
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/html/swcss1.hxx ooo_SRC680_m143_src/sw/source/filter/html/swcss1.hxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/html/swcss1.hxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/html/swcss1.hxx	2005-12-04 10:04:09.000000000 +0100
@@ -59,7 +59,7 @@
 {
 	SwDoc *pDoc;
 
-	ULONG aFontHeights[7];
+	sal_uInt32 aFontHeights[7];
 
 	USHORT nDropCapCnt;
 
@@ -92,13 +92,13 @@
 							  SfxItemSet& rItemSet,
 							  SvxCSS1PropertyInfo& rPropInfo );
 public:
-    SwCSS1Parser( SwDoc *pDoc, ULONG aFHeight[7], const String& rBaseURL, BOOL bNewDoc );
+    SwCSS1Parser( SwDoc *pDoc, sal_uInt32 aFHeight[7], const String& rBaseURL, BOOL bNewDoc );
 	virtual ~SwCSS1Parser();
 
 	virtual BOOL ParseStyleSheet( const String& rIn );
 
 	// Die Font-Hoehe fuer eine bestimmte Font-Groesse (0-6) ermitteln
-	virtual ULONG GetFontHeight( USHORT nSize ) const;
+	virtual sal_uInt32 GetFontHeight( USHORT nSize ) const;
 
 	// Die aktuelle Font-Liste holen (auch 0 ist erlaubt)
 	virtual const FontList *GetFontList() const;
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/html/swhtml.hxx ooo_SRC680_m143_src/sw/source/filter/html/swhtml.hxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/html/swhtml.hxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/html/swhtml.hxx	2005-12-04 10:04:09.000000000 +0100
@@ -612,7 +612,7 @@
 	void GetULSpaceFromContext( sal_uInt16 &rUpper, sal_uInt16 &rLower ) const;
 
 
-	void MovePageDescAttrs( SwNode *pSrcNd, sal_uInt32 nDestIdx, sal_Bool bFmtBreak );
+	void MovePageDescAttrs( SwNode *pSrcNd, ULONG nDestIdx, sal_Bool bFmtBreak );
 
 	// Behandlung von Tags auf Absatz-Ebene
 
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/html/wrthtml.cxx ooo_SRC680_m143_src/sw/source/filter/html/wrthtml.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/html/wrthtml.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/html/wrthtml.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -262,7 +262,7 @@
 	delete pNumRuleInfo;
 }
 
-sal_uInt32 SwHTMLWriter::WriteStream()
+ULONG SwHTMLWriter::WriteStream()
 {
 	// neue Konfiguration setzen
 	SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
@@ -631,7 +631,7 @@
 	return pCol;
 }
 
-sal_Bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, sal_uInt32 nIndex )
+sal_Bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, ULONG nIndex )
 {
 	sal_Bool bRet = sal_False;
 	const SwSectionNode *pSectNd =
@@ -647,7 +647,7 @@
 	return bRet;
 }
 
-sal_Bool lcl_html_IsMultiColEnd( const SwHTMLWriter& rHTMLWrt, sal_uInt32 nIndex )
+sal_Bool lcl_html_IsMultiColEnd( const SwHTMLWriter& rHTMLWrt, ULONG nIndex )
 {
 	sal_Bool bRet = sal_False;
 	const SwEndNode *pEndNd = rHTMLWrt.pDoc->GetNodes()[nIndex]->GetEndNode();
@@ -801,8 +801,8 @@
 	const SwSection *pSurrSection = 0;
 	const SwFmtCol *pSurrCol = 0;
 
-	sal_uInt32 nSectSttIdx = rSectNd.GetIndex();
-	sal_uInt32 nSectEndIdx = rSectNd.EndOfSectionIndex();
+	ULONG nSectSttIdx = rSectNd.GetIndex();
+	ULONG nSectEndIdx = rSectNd.EndOfSectionIndex();
 	const SwFmtCol *pCol = lcl_html_GetFmtCol( rHTMLWrt, rSection, *pFmt );
 	if( pCol )
 	{
@@ -1011,8 +1011,8 @@
 
 sal_uInt16 SwHTMLWriter::OutHeaderAttrs()
 {
-	sal_uInt32 nIdx = pCurPam->GetPoint()->nNode.GetIndex();
-	sal_uInt32 nEndIdx = pCurPam->GetMark()->nNode.GetIndex();
+	ULONG nIdx = pCurPam->GetPoint()->nNode.GetIndex();
+	ULONG nEndIdx = pCurPam->GetMark()->nNode.GetIndex();
 
 	SwTxtNode *pTxtNd = 0;
 	while( nIdx<=nEndIdx &&
@@ -1086,7 +1086,7 @@
 	//{
 		// In Nicht-HTML-Dokumenten wird die erste gesetzte Seitenvorlage
 		// exportiert und wenn keine gesetzt ist die Standard-Vorlage
-		sal_uInt32 nNodeIdx = pCurPam->GetPoint()->nNode.GetIndex();
+		ULONG nNodeIdx = pCurPam->GetPoint()->nNode.GetIndex();
 
 		while( nNodeIdx < pDoc->GetNodes().Count() )
 		{
@@ -1469,8 +1469,8 @@
 
 // Struktur speichert die aktuellen Daten des Writers zwischen, um
 // einen anderen Dokument-Teil auszugeben, wie z.B. Header/Footer
-HTMLSaveData::HTMLSaveData( SwHTMLWriter& rWriter, sal_uInt32 nStt,
-							sal_uInt32 nEnd, sal_Bool bSaveNum,
+HTMLSaveData::HTMLSaveData( SwHTMLWriter& rWriter, ULONG nStt,
+							ULONG nEnd, sal_Bool bSaveNum,
 	   					 	const SwFrmFmt *pFrmFmt	)
 	: rWrt( rWriter ),
 	pOldPam( rWrt.pCurPam ), pOldEnd( rWrt.GetEndPaM() ),
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/html/wrthtml.hxx ooo_SRC680_m143_src/sw/source/filter/html/wrthtml.hxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/html/wrthtml.hxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/html/wrthtml.hxx	2005-12-04 10:04:09.000000000 +0100
@@ -234,7 +234,7 @@
 	void CollectLinkTargets();
 
 protected:
-	sal_uInt32 WriteStream();
+	ULONG WriteStream();
 
 public:
 #if defined(MAC) || defined(UNX)
@@ -562,7 +562,7 @@
 	sal_Bool bOldOutFlyFrame : 1;
 	const SwFlyFrmFmt* pOldFlyFmt;
 
-	HTMLSaveData( SwHTMLWriter&, sal_uInt32 nStt, sal_uInt32 nEnd,
+	HTMLSaveData( SwHTMLWriter&, ULONG nStt, ULONG nEnd,
 				  sal_Bool bSaveNum=sal_True,
 		   		  const SwFrmFmt *pFrmFmt=0	);
 	~HTMLSaveData();
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/ww8/wrtw8esh.cxx ooo_SRC680_m143_src/sw/source/filter/ww8/wrtw8esh.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/ww8/wrtw8esh.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/ww8/wrtw8esh.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -545,7 +545,7 @@
     return bRet;
 }
 
-bool RTLDrawingsHack(long &rLeft, long nWidth,
+bool RTLDrawingsHack(long &rLeft, long nWidth, 
     SwHoriOrient eHoriOri, SwRelationOrient eHoriRel, SwTwips nPageLeft,
     SwTwips nPageRight, SwTwips nPageSize)
 {
@@ -577,7 +577,7 @@
     if (FRMDIR_HORI_RIGHT_TOP != pDoc->GetTextDirection(rFrmFmt.GetPosition()))
         return false;
 
-    long nWidth = rRight - rLeft;
+    sal_Int32 nWidth = rRight - rLeft;
     SwTwips nPageLeft, nPageRight;
     SwTwips nPageSize = CurrentPageWidth(nPageLeft, nPageRight);
 
@@ -703,8 +703,8 @@
             // spid
             SwWW8Writer::WriteLong(*rWrt.pTableStrm, aIter->mnShapeId);
 
-            sal_Int32 nLeft = aRect.Left() + nThick;
-            sal_Int32 nRight = aRect.Right() - nThick;
+            long nLeft = aRect.Left() + nThick;
+            long nRight = aRect.Right() - nThick;
 
             //Nasty swap for bidi if neccessary
             rWrt.MiserableRTLFrmFmtHack(nLeft, nRight, rFrmFmt);
@@ -857,7 +857,7 @@
 {
     bool bRet = false;
     rWrt.bInWriteEscher = true;
-    long& rccp=TXT_TXTBOX == nTyp ? rWrt.pFib->ccpTxbx : rWrt.pFib->ccpHdrTxbx;
+    sal_Int32& rccp=TXT_TXTBOX == nTyp ? rWrt.pFib->ccpTxbx : rWrt.pFib->ccpHdrTxbx;
 
     bRet = WriteGenericTxt( rWrt, nTyp, rccp );
 
@@ -2059,13 +2059,13 @@
 
         EnterGroup( 0 );
 
-        ULONG nSecondShapeId = pSdrObjs == rWrt.pSdrObjs ? GetShapeID() : 0;
+        sal_uInt32 nSecondShapeId = pSdrObjs == rWrt.pSdrObjs ? GetShapeID() : 0;
 
         // write now all Writer-/DrawObjects
         DrawObjPointerVector aSorted;
         MakeZOrderArrAndFollowIds(pSdrObjs->GetObjArr(), aSorted);
 
-        ULONG nShapeId=0;
+        sal_uInt32 nShapeId=0;
         DrawObjPointerIter aEnd = aSorted.end();
         for (DrawObjPointerIter aIter = aSorted.begin(); aIter != aEnd; ++aIter)
         {
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/ww8/wrtw8sty.cxx ooo_SRC680_m143_src/sw/source/filter/ww8/wrtw8sty.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/ww8/wrtw8sty.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/ww8/wrtw8sty.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -1739,7 +1739,7 @@
 }
 
 bool WW8_WrPlcSubDoc::WriteGenericTxt(SwWW8Writer& rWrt, BYTE nTTyp, 
-    long& rCount)
+    sal_Int32& rCount)
 {
     bool bRet = false;
     USHORT nLen = aCntnt.Count();
@@ -1836,7 +1836,7 @@
 }
 
 void WW8_WrPlcSubDoc::WriteGenericPlc( SwWW8Writer& rWrt, BYTE nTTyp,
-    long& rTxtStart, long& rTxtCount, long& rRefStart, long& rRefCount ) const
+    WW8_FC& rTxtStart, sal_Int32& rTxtCount, WW8_FC& rRefStart, sal_Int32& rRefCount ) const
 {
     typedef ::std::vector<String>::iterator myiter;
 
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/ww8/wrtww8.cxx ooo_SRC680_m143_src/sw/source/filter/ww8/wrtww8.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/ww8/wrtww8.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/ww8/wrtww8.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -722,7 +722,7 @@
     if( WW8_WrPlc1::Count() <= 1 )
         return false;
 
-    long *pfc, *plc;
+    sal_Int32 *pfc, *plc;
     switch (nTxtTyp)
     {
         case TXT_MAINTEXT:
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/ww8/wrtww8.hxx ooo_SRC680_m143_src/sw/source/filter/ww8/wrtww8.hxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/ww8/wrtww8.hxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/ww8/wrtww8.hxx	2005-12-04 10:04:09.000000000 +0100
@@ -740,9 +740,9 @@
     WW8_WrPlcSubDoc();
     virtual ~WW8_WrPlcSubDoc();
 
-    bool WriteGenericTxt(SwWW8Writer& rWrt, BYTE nTTyp, long& rCount);
-    void WriteGenericPlc( SwWW8Writer& rWrt, BYTE nTTyp, long& rTxtStt,
-        long& rTxtCnt, long& rRefStt, long& rRefCnt ) const;
+    bool WriteGenericTxt(SwWW8Writer& rWrt, BYTE nTTyp, sal_Int32& rCount);
+    void WriteGenericPlc( SwWW8Writer& rWrt, BYTE nTTyp, WW8_FC& rTxtStt,
+        sal_Int32& rTxtCnt, WW8_FC& rRefStt, sal_Int32& rRefCnt ) const;
 
     virtual const SvULongs* GetShapeIdArr() const;
 };
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/ww8/ww8glsy.cxx ooo_SRC680_m143_src/sw/source/filter/ww8/ww8glsy.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/ww8/ww8glsy.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/ww8/ww8glsy.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -329,7 +329,7 @@
         SvStream &rStrm, const WW8Fib &rFib)
 {
     WW8PLCF aPlc( &rTableStrm, rFib.fcPlcfsed, rFib.lcbPlcfsed, 12 );
-    long start,ende;
+    WW8_CP start,ende;
     void *pData;
     aPlc.Get(start,ende,pData);
     UINT32 nPo = SVBT32ToLong((BYTE *)pData+2);
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/ww8/ww8graf.cxx ooo_SRC680_m143_src/sw/source/filter/ww8/ww8graf.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/ww8/ww8graf.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/ww8/ww8graf.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -952,7 +952,7 @@
     aSave.Restore(this);
 }
 
-bool SwWW8ImplReader::GetTxbxTextSttEndCp(long& rStartCp, long& rEndCp,
+bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
     USHORT nTxBxS, USHORT nSequence)
 {
     // rasch den TextBox-PLCF greifen
@@ -1087,7 +1087,7 @@
     rbEraseTextObj = false;
 
     String aString;
-    long nStartCp, nEndCp;
+    WW8_CP nStartCp, nEndCp;
     bool bContainsGraphics = false;
     bool bTextWasRead = GetTxbxTextSttEndCp( nStartCp, nEndCp, nTxBxS,
         nSequence ) && GetTxbxText( aString, nStartCp, nEndCp );
@@ -1489,7 +1489,7 @@
 void SwWW8ImplReader::ReadGrafLayer1( WW8PLCFspecial* pPF, long nGrafAnchorCp )
 {
     pPF->SeekPos( nGrafAnchorCp );
-    long nStartFc;
+    WW8_CP nStartFc;
     void* pF0;
     if( !pPF->Get( nStartFc, pF0 ) )
     {
@@ -2610,7 +2610,7 @@
     //Normal case of Word 8+ version stuff
     pPF->SeekPos( nGrafAnchorCp );
 
-    long nStartFc;
+    WW8_CP nStartFc;
     void* pF0;
     if( !pPF->Get( nStartFc, pF0 ) ){
         ASSERT( !this, "+Wo ist die Grafik (2) ?" );
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/ww8/ww8par.cxx ooo_SRC680_m143_src/sw/source/filter/ww8/ww8par.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/ww8/ww8par.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/ww8/ww8par.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -2823,7 +2823,7 @@
                 if (pTest && pTest->SeekPosExact(nPosCp+1+nCpOfs) &&
                     pTest->Where() == nPosCp+1+nCpOfs)
                 {
-                    long nPos;
+                    WW8_CP nPos;
                     void *pData;
                     pTest->Get(nPos, pData);
                     sal_uInt32 nData = SVBT32ToLong(*(SVBT32*)pData);
@@ -3072,14 +3072,14 @@
     pPlcxMan = new WW8PLCFMan( pSBase, nType, nStartCp );
     long nCpOfs = pPlcxMan->GetCpOfs(); // Offset fuer Header/Footer, Footnote
 
-    WW8_CP nNext = pPlcxMan->Where();
+    long nNext = pPlcxMan->Where();
     SwTxtNode* pPreviousNode = 0;
     BYTE nDropLines = 0;
     SwCharFmt* pNewSwCharFmt = 0;
     const SwCharFmt* pFmt = 0;
     pStrm->Seek( pSBase->WW8Cp2Fc( nStartCp + nCpOfs, &bIsUnicode ) );
 
-    WW8_CP l = nStartCp;
+    long l = nStartCp;
     while ( l<nStartCp+nTextLen )
     {
 
@@ -4804,7 +4804,7 @@
             // wasn't successful. Thus, continue in this case.
             // Note: Ask MM for initialization of <nStartCp> and <nEndCp>.
             // Note: Ask MM about assertions in method <rReader.GetTxbxTextSttEndCp(..)>.
-            long nStartCp, nEndCp;
+            WW8_CP nStartCp, nEndCp;
             if ( rReader.GetTxbxTextSttEndCp(nStartCp, nEndCp,
                             static_cast<sal_uInt16>((nOLEId >> 16) & 0xFFFF),
                             static_cast<sal_uInt16>(nOLEId & 0xFFFF)) )
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/ww8/ww8par.hxx ooo_SRC680_m143_src/sw/source/filter/ww8/ww8par.hxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/ww8/ww8par.hxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/ww8/ww8par.hxx	2005-12-04 10:04:09.000000000 +0100
@@ -1266,7 +1266,7 @@
     void InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl );
     void InsertTxbxAttrs(long nStartCp, long nEndCp, bool bONLYnPicLocFc);
 
-    bool GetTxbxTextSttEndCp(long& rStartCp, long& rEndCp, USHORT nTxBxS,
+    bool GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp, USHORT nTxBxS,
         USHORT nSequence);
     bool GetTxbxText(String& rString, long StartCp, long nEndCp);
     SwFrmFmt* InsertTxbxText(SdrTextObj* pTextObj, Size* pObjSiz,
@@ -1489,7 +1489,7 @@
     eF_ResT Read_F_DocInfo( WW8FieldDesc* pF, String& rStr );
     eF_ResT Read_F_Author( WW8FieldDesc*, String& );
     eF_ResT Read_F_TemplName( WW8FieldDesc*, String& );
-    short GetTimeDatePara(String& rStr, ULONG& rFormat, USHORT &rLang,
+    short GetTimeDatePara(String& rStr, sal_uInt32& rFormat, USHORT &rLang,
         int nWhichDefault, bool bHijri = false);
     bool ForceFieldLanguage(SwField &rFld, USHORT nLang);
     eF_ResT Read_F_DateTime( WW8FieldDesc*, String& rStr );
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/ww8/ww8par5.cxx ooo_SRC680_m143_src/sw/source/filter/ww8/ww8par5.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/ww8/ww8par5.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/ww8/ww8par5.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -681,7 +681,7 @@
     return sParams;
 }
 
-short SwWW8ImplReader::GetTimeDatePara(String& rStr, ULONG& rFormat,
+short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
     USHORT &rLang, int nWhichDefault, bool bHijri)
 {
     bool bRTL = false;
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/ww8/ww8par6.cxx ooo_SRC680_m143_src/sw/source/filter/ww8/ww8par6.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/ww8/ww8par6.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/ww8/ww8par6.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -985,7 +985,7 @@
             pWkb->Where() == nTxtPos)
     {
         void* pData;
-        long nTest;
+        WW8_CP nTest;
         pWkb->Get(nTest, pData);
         String sSectionName = mrReader.aLinkStringMap[SVBT16ToShort( ((WW8_WKB*)pData)->nLinkId) ];
         mrReader.ConvertFFileName(sSectionName, sSectionName);
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/ww8/ww8scan.cxx ooo_SRC680_m143_src/sw/source/filter/ww8/ww8scan.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/ww8/ww8scan.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/ww8/ww8scan.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -1113,7 +1113,7 @@
     return pPcdI ? pPcdI->Where() : LONG_MAX;
 }
 
-long WW8PLCFx_PCD::GetNoSprms( long& rStart, long& rEnd, long& rLen )
+long WW8PLCFx_PCD::GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, long& rLen )
 {
     void* pData;
     rLen = 0;
@@ -1163,7 +1163,7 @@
 }
 
 
-void WW8PLCFx_PCD::AktPieceFc2Cp( long& rStartPos, long& rEndPos,
+void WW8PLCFx_PCD::AktPieceFc2Cp( WW8_CP& rStartPos, WW8_CP& rEndPos,
     const WW8ScannerBase *pSBase )
 {
     //No point going anywhere with this
@@ -1433,7 +1433,7 @@
         for (pPieceIter->SetIdx(0);
             pPieceIter->GetIdx() < pPieceIter->GetIMax();(*pPieceIter)++)
         {
-            long nCpStart, nCpEnd;
+            WW8_CP nCpStart, nCpEnd;
             void* pData;
             if( !pPieceIter->Get( nCpStart, nCpEnd, pData ) )
             {   // ausserhalb PLCFfpcd ?
@@ -1508,7 +1508,7 @@
                 ASSERT( !this, "Falscher CP an WW8Cp2Fc() uebergeben" );
             return LONG_MAX;
         }
-        long nCpStart, nCpEnd;
+        WW8_CP nCpStart, nCpEnd;
         void* pData;
         if( !pPieceIter->Get( nCpStart, nCpEnd, pData ) )
         {
@@ -1786,7 +1786,7 @@
 static bool WW8SkipField(WW8PLCFspecial& rPLCF)
 {
     void* pData;
-    long nP;
+    WW8_CP nP;
 
     if (!rPLCF.Get(nP, pData))              // Ende des PLCFspecial ?
         return false;
@@ -2137,12 +2137,12 @@
     return false;
 }
 
-bool WW8PLCFspecial::Get(long& rPos, void*& rpValue) const
+bool WW8PLCFspecial::Get(WW8_CP& rPos, void*& rpValue) const
 {
     return GetData( nIdx, rPos, rpValue );
 }
 
-bool WW8PLCFspecial::GetData(long nInIdx, long& rPos, void*& rpValue) const
+bool WW8PLCFspecial::GetData(WW8_CP nInIdx, WW8_CP& rPos, void*& rpValue) const
 {
     if ( nInIdx >= nIMax )
     {
@@ -2286,7 +2286,7 @@
     return false;
 }
 
-bool WW8PLCF::Get(long& rStart, long& rEnd, void*& rpValue) const
+bool WW8PLCF::Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const
 {
     if ( nIdx >= nIMax )
     {
@@ -2299,7 +2299,7 @@
     return true;
 }
 
-long WW8PLCF::Where() const
+WW8_CP WW8PLCF::Where() const
 {
     if ( nIdx >= nIMax )
         return LONG_MAX;
@@ -2373,7 +2373,7 @@
     return false;
 }
 
-bool WW8PLCFpcd_Iter::Get(long& rStart, long& rEnd, void*& rpValue) const
+bool WW8PLCFpcd_Iter::Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const
 {
     if( nIdx >= rPLCF.nIMax )
     {
@@ -2386,7 +2386,7 @@
     return true;
 }
 
-long WW8PLCFpcd_Iter::Where() const
+WW8_FC WW8PLCFpcd_Iter::Where() const
 {
     if ( nIdx >= rPLCF.nIMax )
         return LONG_MAX;
@@ -2594,7 +2594,7 @@
     return false;
 }
 
-BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::Get(WW8_FC& rStart, WW8_FC& rEnd, long& rLen)
+BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::Get(WW8_FC& rStart, WW8_FC& rEnd, WW8_CP& rLen)
     const
 {
     rLen = 0;
@@ -2622,7 +2622,7 @@
     return false;
 }
 
-BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::GetLenAndIStdAndSprms(long& rLen) const
+BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::GetLenAndIStdAndSprms(WW8_CP& rLen) const
 {
     rLen = maEntries[mnIdx].mnLen;
     return maEntries[mnIdx].mpData;
@@ -2633,7 +2633,7 @@
     if (mnIdx >= mnIMax)
         return 0;
 
-    long nLen;
+    WW8_CP nLen;
     BYTE* pSprms = GetLenAndIStdAndSprms( nLen );
 
     WW8SprmIter aIter(pSprms, nLen, maSprmParser);
@@ -2646,7 +2646,7 @@
     if (mnIdx >= mnIMax)
        return false;
 
-    long nLen;
+    WW8_CP nLen;
     BYTE* pSprms = GetLenAndIStdAndSprms( nLen );
 
     WW8SprmIter aIter(pSprms, nLen, maSprmParser);
@@ -2671,7 +2671,7 @@
     return;
 }
 
-long WW8PLCFx::GetNoSprms( long& rStart, long& rEnd, long& rLen )
+WW8_CP WW8PLCFx::GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, WW8_CP& rLen )
 {
     ASSERT( !this, "Falsches GetNoSprms gerufen" );
     rStart = rEnd = LONG_MAX;
@@ -2703,7 +2703,7 @@
 //-----------------------------------------
 bool WW8PLCFx_Fc_FKP::NewFkp()
 {
-    long nPLCFStart, nPLCFEnd;
+    WW8_CP nPLCFStart, nPLCFEnd;
     void* pPage;
 
     static const int WW8FkpSizeTabVer6[ PLCF_END ] =
@@ -2832,7 +2832,7 @@
     bool bRet = pPLCF->SeekPos(nFcPos);
 
     // make FKP invalid?
-    long nPLCFStart, nPLCFEnd;
+    WW8_CP nPLCFStart, nPLCFEnd;
     void* pPage;
     if( pFkp && pPLCF->Get( nPLCFStart, nPLCFEnd, pPage ) )
     {
@@ -2861,7 +2861,7 @@
     return Where();                     // am einfachsten rekursiv
 }
 
-BYTE* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, long& rLen)
+BYTE* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, WW8_CP& rLen)
 {
     rLen = 0;                               // Default
     rStart = rEnd = LONG_MAX;
@@ -3128,7 +3128,7 @@
                 FC of the piece, the end of the paragraph that contains the
                 character is at the FKP FC minus 1.
                 */
-                long nCpStart, nCpEnd;
+                WW8_CP nCpStart, nCpEnd;
                 void* pData;
                 pPieceIter->Get(nCpStart, nCpEnd, pData);
 
@@ -3244,7 +3244,7 @@
         return *this;
     }
 
-    long nFkpLen;                               // Fkp-Eintrag
+    WW8_CP nFkpLen;                               // Fkp-Eintrag
     // Fkp-Eintrag holen
     WW8PLCFx_Fc_FKP::GetSprmsAndPos(nAttrStart, nAttrEnd, nFkpLen);
 
@@ -3484,7 +3484,7 @@
     ULONG nNr = pRef->GetIdx();
 
     void *pData;
-    long nFoo;
+    WW8_CP nFoo;
     if (!pRef->Get(p->nStartPos, nFoo, pData))
     {
         p->nEndPos = p->nStartPos = LONG_MAX;
@@ -3592,7 +3592,7 @@
 bool WW8PLCFx_FLD::StartPosIsFieldStart()
 {
     void* pData;
-    long nTest;
+    WW8_CP nTest;
     if (
          (!pPLCF || !pPLCF->Get(nTest, pData) ||
          ((((BYTE*)pData)[0] & 0x1f) != 0x13))
@@ -3612,7 +3612,7 @@
         (*pPLCF)++;
 
         void* pData;
-        long nTest;
+        WW8_CP nTest;
         if ( pPLCF->Get(nTest, pData) && ((((BYTE*)pData)[0] & 0x1f) == 0x15) )
             bRet = true;
 
@@ -3637,7 +3637,7 @@
 
     long n = pPLCF->GetIdx();
 
-    long nP;
+    WW8_CP nP;
     void *pData;
     if (!pPLCF->Get(nP, pData))             // Ende des PLCFspecial ?
     {
@@ -3875,7 +3875,7 @@
     return pBook[nIsEnd]->Where();
 }
 
-long WW8PLCFx_Book::GetNoSprms( long& rStart, long& rEnd, long& rLen )
+WW8_CP WW8PLCFx_Book::GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, WW8_CP& rLen )
 {
     void* pData;
     rEnd = LONG_MAX;
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/ww8/ww8scan.hxx ooo_SRC680_m143_src/sw/source/filter/ww8/ww8scan.hxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/ww8/ww8scan.hxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/ww8/ww8scan.hxx	2005-12-04 10:04:09.000000000 +0100
@@ -199,9 +199,9 @@
 {
     long nLen;              // Gesamtlaenge ( zum Text ueberlesen )
     WW8_CP nSCode;           // Anfang Befehlscode
-    long nLCode;            // Laenge
+    WW8_CP nLCode;            // Laenge
     WW8_CP nSRes;           // Anfang Ergebnis
-    long nLRes;             // Laenge ( == 0, falls kein Ergebnis )
+    WW8_CP nLRes;             // Laenge ( == 0, falls kein Ergebnis )
     USHORT nId;             // WW-Id fuer Felder
     BYTE nOpt;              // WW-Flags ( z.B.: vom User geaendert )
     BYTE bCodeNest:1;       // Befehl rekursiv verwendet
@@ -231,7 +231,7 @@
     INT32* pPLCF_PosArray;  // Pointer auf Pos-Array und auf ganze Struktur
     BYTE*  pPLCF_Contents;  // Pointer auf Inhalts-Array-Teil des Pos-Array
     long nIMax;             // Anzahl der Elemente
-    long nIdx;              // Merker, wo wir gerade sind
+    WW8_CP nIdx;              // Merker, wo wir gerade sind
     long nStru;
 public:
     WW8PLCFspecial( SvStream* pSt, long nFilePos, long nPLCF,
@@ -243,10 +243,10 @@
     bool SeekPos(long nPos);            // geht ueber FC- bzw. CP-Wert
                                         // bzw. naechste groesseren Wert
     bool SeekPosExact(long nPos);
-    long Where() const 
+    WW8_FC Where() const 
         { return ( nIdx >= nIMax ) ? LONG_MAX : pPLCF_PosArray[nIdx]; }
-    bool Get(long& rStart, void*& rpValue) const;
-    bool GetData(long nIdx, long& rPos, void*& rpValue) const;
+    bool Get(WW8_CP& rStart, void*& rpValue) const;
+    bool GetData(WW8_CP nIdx, WW8_CP& rPos, void*& rpValue) const;
 
     const void* GetData( long nInIdx ) const 
     {
@@ -322,8 +322,8 @@
     void SetIdx( long nI ) { nIdx = nI; }
     long GetIMax() const { return nIMax; }
     bool SeekPos(long nPos);
-    long Where() const;
-    bool Get(long& rStart, long& rEnd, void*& rpValue) const;
+    WW8_FC Where() const;
+    bool Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const;
     WW8PLCF& operator ++( int ) { if( nIdx < nIMax ) nIdx++; return *this; }
 
     const void* GetData( long nInIdx ) const 
@@ -362,8 +362,8 @@
     void SetIdx( long nI ) { nIdx = nI; }
     long GetIMax() const { return rPLCF.nIMax; }
     bool SeekPos(long nPos);
-    long Where() const;
-    bool Get(long& rStart, long& rEnd, void*& rpValue) const;
+    WW8_FC Where() const;
+    bool Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const;
     WW8PLCFpcd_Iter& operator ++( int ) 
     { 
         if( nIdx < rPLCF.nIMax ) 
@@ -401,9 +401,9 @@
     virtual ULONG GetIdx2() const;
     virtual void SetIdx2( ULONG nIdx );
     virtual bool SeekPos(WW8_CP nCpPos) = 0;
-    virtual long Where() = 0;
+    virtual WW8_FC Where() = 0;
     virtual void GetSprms( WW8PLCFxDesc* p );
-    virtual long GetNoSprms( long& rStart, long&, long& rLen );
+    virtual WW8_CP GetNoSprms( WW8_CP& rStart, WW8_CP&, WW8_CP& rLen );
     virtual WW8PLCFx& operator ++( int ) = 0;
     virtual USHORT GetIstd() const { return 0xffff; }
     virtual void Save( WW8PLCFxSave1& rSave ) const;
@@ -434,7 +434,7 @@
     virtual ULONG GetIdx() const;
     virtual void SetIdx( ULONG nI );
     virtual bool SeekPos(WW8_CP nCpPos);
-    virtual long Where();
+    virtual WW8_FC Where();
     virtual void GetSprms( WW8PLCFxDesc* p );
     virtual WW8PLCFx& operator ++( int );
 
@@ -459,12 +459,12 @@
     virtual ULONG GetIdx() const;
     virtual void SetIdx( ULONG nI );
     virtual bool SeekPos(WW8_CP nCpPos);
-    virtual long Where();
-    virtual long GetNoSprms( long& rStart, long&, long& rLen );
+    virtual WW8_FC Where();
+    virtual long GetNoSprms( WW8_CP& rStart, WW8_CP&, long& rLen );
     virtual WW8PLCFx& operator ++( int );
     WW8_CP AktPieceStartFc2Cp( WW8_FC nStartPos );
     WW8_FC AktPieceStartCp2Fc( WW8_CP nCp );
-    void AktPieceFc2Cp(long& rStartPos, long& rEndPos, 
+    void AktPieceFc2Cp(WW8_CP& rStartPos, WW8_CP& rEndPos, 
         const WW8ScannerBase *pSBase);
     WW8PLCFpcd_Iter* GetPLCFIter() { return pPcdI; }
     void SetClipStart(WW8_CP nIn) { nClipStart = nIn; }
@@ -535,14 +535,14 @@
                 mnIdx++;
             return *this; 
         }
-        BYTE* Get( WW8_FC& rStart, WW8_FC& rEnd, long& rLen ) const;
+        BYTE* Get( WW8_FC& rStart, WW8_FC& rEnd, WW8_CP& rLen ) const;
         sal_uInt16 GetIstd() const { return maEntries[mnIdx].mnIStd; }
 
         /*
             liefert einen echten Pointer auf das Sprm vom Typ nId,
             falls ein solches im Fkp drin ist.
         */
-        BYTE* GetLenAndIStdAndSprms(long& rLen) const;
+        BYTE* GetLenAndIStdAndSprms(WW8_CP& rLen) const;
 
         /*
             ruft GetLenAndIStdAndSprms() auf...
@@ -591,7 +591,7 @@
     virtual void SetIdx( ULONG nIdx );
     virtual bool SeekPos(WW8_FC nFcPos);
     virtual WW8_FC Where();
-    BYTE* GetSprmsAndPos( WW8_FC& rStart, WW8_FC& rEnd, long& rLen );
+    BYTE* GetSprmsAndPos( WW8_FC& rStart, WW8_FC& rEnd, WW8_CP& rLen );
     virtual WW8PLCFx& operator ++( int );
     virtual USHORT GetIstd() const;
     void GetPCDSprms( WW8PLCFxDesc& rDesc );
@@ -654,7 +654,7 @@
     virtual void SetIdx( ULONG nIdx );
     long GetIMax() const { return ( pPLCF ) ? pPLCF->GetIMax() : 0; }
     virtual bool SeekPos(WW8_CP nCpPos);
-    virtual long Where();
+    virtual WW8_FC Where();
     virtual void GetSprms( WW8PLCFxDesc* p );
     virtual WW8PLCFx& operator ++( int );
     const BYTE* HasSprm( USHORT nId ) const;
@@ -682,7 +682,7 @@
     virtual ULONG GetIdx() const;
     virtual void SetIdx( ULONG nIdx );
     virtual bool SeekPos(WW8_CP nCpPos);
-    virtual long Where();
+    virtual WW8_FC Where();
 
     // liefert Reference Descriptoren
     const void* GetData( long nIdx = -1 ) const
@@ -712,7 +712,7 @@
     virtual ULONG GetIdx() const;
     virtual void SetIdx( ULONG nIdx );
     virtual bool SeekPos(WW8_CP nCpPos);
-    virtual long Where();
+    virtual WW8_FC Where();
     virtual void GetSprms(WW8PLCFxDesc* p);
     virtual WW8PLCFx& operator ++( int );
     bool StartPosIsFieldStart();
@@ -744,8 +744,8 @@
     virtual ULONG GetIdx2() const;
     virtual void SetIdx2( ULONG nIdx );
     virtual bool SeekPos(WW8_CP nCpPos);
-    virtual long Where();
-    virtual long GetNoSprms( long& rStart, long& rEnd, long& rLen );
+    virtual WW8_FC Where();
+    virtual WW8_CP GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, WW8_CP& rLen );
     virtual WW8PLCFx& operator ++( int );
     const String* GetName() const;
     WW8_CP GetStartPos() const
@@ -797,8 +797,8 @@
     const BYTE* pMemPos;// wo liegen die Sprm(s)
     long nOrigSprmsLen;
 
-    long nStartPos;
-    long nEndPos;
+    WW8_CP nStartPos;
+    WW8_CP nEndPos;
 
     long nOrigStartPos;
     long nOrigEndPos;   // The ending character position of a paragraph is
@@ -812,8 +812,8 @@
                         // it can be used as the beginning cp of the next set
                         // of properties
 
-    long nCp2OrIdx;     // wo liegen die NoSprm(s)
-    long nSprmsLen;     // wie viele Bytes fuer weitere Sprms / Laenge Fussnote
+    WW8_CP nCp2OrIdx;     // wo liegen die NoSprm(s)
+    WW8_CP nSprmsLen;     // wie viele Bytes fuer weitere Sprms / Laenge Fussnote
     long nCpOfs;        // fuer Offset Header .. Footnote
     bool bFirstSprm;    // fuer Erkennung erster Sprm einer Gruppe
     bool bRealLineEnd;  // false bei Pap-Piece-Ende
@@ -873,7 +873,7 @@
         Where fragt, an welcher naechsten Position sich irgendein
         Attr aendert...
     */
-    long Where() const;
+    WW8_FC Where() const;
 
     bool Get(WW8PLCFManResult* pResult) const;
     WW8PLCFMan& operator ++( int );
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/xml/swxml.cxx ooo_SRC680_m143_src/sw/source/filter/xml/swxml.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/xml/swxml.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/xml/swxml.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -527,7 +527,7 @@
 }
 // <--
 
-sal_uInt32 XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const String & rName )
+ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const String & rName )
 {
 	// Get service factory
 	Reference< lang::XMultiServiceFactory > xServiceFactory =
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/xml/wrtxml.cxx ooo_SRC680_m143_src/sw/source/filter/xml/wrtxml.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/xml/wrtxml.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/xml/wrtxml.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -145,7 +145,7 @@
 }
 
 
-sal_uInt32 SwXMLWriter::_Write( SfxMedium* pTargetMedium )
+ULONG SwXMLWriter::_Write( SfxMedium* pTargetMedium )
 {
 	DBG_ASSERT( pTargetMedium, "No medium is provided!" );
 	// Get service factory
@@ -533,17 +533,17 @@
 	return 0;
 }
 
-sal_uInt32 SwXMLWriter::WriteStorage()
+ULONG SwXMLWriter::WriteStorage()
 {
 	return _Write();
 }
 
-sal_uInt32 SwXMLWriter::WriteMedium( SfxMedium& aTargetMedium )
+ULONG SwXMLWriter::WriteMedium( SfxMedium& aTargetMedium )
 {
 	return _Write( &aTargetMedium );
 }
 
-sal_uInt32 SwXMLWriter::Write( SwPaM& rPaM, SfxMedium& rMed,
+ULONG SwXMLWriter::Write( SwPaM& rPaM, SfxMedium& rMed,
 							   const String* pFileName )
 {
 	return IsStgWriter()
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/xml/wrtxml.hxx ooo_SRC680_m143_src/sw/source/filter/xml/wrtxml.hxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/xml/wrtxml.hxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/xml/wrtxml.hxx	2005-12-04 10:04:09.000000000 +0100
@@ -55,11 +55,11 @@
 
 class SwXMLWriter : public StgWriter
 {
-	sal_uInt32 _Write( SfxMedium* pTargetMedium = NULL );
+	ULONG _Write( SfxMedium* pTargetMedium = NULL );
 
 protected:
-	virtual sal_uInt32 WriteStorage();
-	virtual sal_uInt32 WriteMedium( SfxMedium& aTargetMedium );
+	virtual ULONG WriteStorage();
+	virtual ULONG WriteMedium( SfxMedium& aTargetMedium );
 
 public:
 
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/xml/xmlimp.cxx ooo_SRC680_m143_src/sw/source/filter/xml/xmlimp.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/xml/xmlimp.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/xml/xmlimp.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -827,7 +827,7 @@
 		if( !pPos->nContent.GetIndex() )
 		{
 			SwTxtNode* pCurrNd;
-			sal_uInt32 nNodeIdx = pPos->nNode.GetIndex();
+			ULONG nNodeIdx = pPos->nNode.GetIndex();
 			pDoc = pPaM->GetDoc();
 
 			DBG_ASSERT( pPos->nNode.GetNode().IsCntntNode(),
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/xml/xmlimpit.cxx ooo_SRC680_m143_src/sw/source/filter/xml/xmlimpit.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/xml/xmlimpit.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/xml/xmlimpit.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -788,7 +788,7 @@
                         }
                         else if( -1 != aToken.indexOf( sal_Unicode('%') ) )
                         {
-                            long nPrc = 50;
+                            sal_Int32 nPrc = 50;
                             if( rUnitConverter.convertPercent( nPrc, aToken ) )
                             {
                                 if( !bHori )
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/xml/xmlithlp.cxx ooo_SRC680_m143_src/sw/source/filter/xml/xmlithlp.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/xml/xmlithlp.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/xml/xmlithlp.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -198,7 +198,7 @@
     rWidth = 0;
     rNamedWidth = USHRT_MAX;
 
-    long nTemp;
+    sal_Int32 nTemp;
     while( aTokens.getNextToken( aToken ) && aToken.getLength() != 0 )
     {
         if( !rHasWidth &&
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/xml/xmltble.cxx ooo_SRC680_m143_src/sw/source/filter/xml/xmltble.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/xml/xmltble.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/xml/xmltble.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -720,7 +720,7 @@
 				pColumn->SetWidthOpt( (sal_uInt16)nColAbsWidth, sal_False );
 			}
 
-			sal_uInt32 nExpPos = 0;
+			ULONG nExpPos = 0;
 			if( rExpCols.Seek_Entry( pColumn, &nExpPos ) )
 			{
 				pColumn->SetStyleName(
diff -ur ooo_SRC680_m143_src.orig/sw/source/filter/xml/xmltexti.cxx ooo_SRC680_m143_src/sw/source/filter/xml/xmltexti.cxx
--- ooo_SRC680_m143_src.orig/sw/source/filter/xml/xmltexti.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/filter/xml/xmltexti.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -190,7 +190,7 @@
 };
 static void lcl_putHeightAndWidth ( SfxItemSet &rItemSet,
 		sal_Int32 nHeight, sal_Int32 nWidth,
-		sal_Int32 *pTwipHeight=0, sal_Int32 *pTwipWidth=0 )
+		long *pTwipHeight=0, long *pTwipWidth=0 )
 {
 	if( nWidth > 0 && nHeight > 0 )
 	{
diff -ur ooo_SRC680_m143_src.orig/sw/source/ui/app/docsh2.cxx ooo_SRC680_m143_src/sw/source/ui/app/docsh2.cxx
--- ooo_SRC680_m143_src.orig/sw/source/ui/app/docsh2.cxx	2005-12-04 10:02:43.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/ui/app/docsh2.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -1163,9 +1163,9 @@
 								if ( aLockBytes.Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE )
 								{
 									sal_uInt32 nLen = aStat.nSize;
-									ULONG nRead = 0;
+									sal_Size nRead = 0;
 									com::sun::star::uno::Sequence< sal_Int8 > aSeq( nLen );
-									aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead );
+									aLockBytes.ReadAt( 0UL, aSeq.getArray(), nLen, &nRead );
 
 						        	::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs(1);
 									aArgs[0].Name = ::rtl::OUString::createFromAscii("RtfOutline");
@@ -1234,7 +1234,7 @@
 								if ( aLockBytes.Stat( &aStat, SVSTATFLAG_DEFAULT ) == ERRCODE_NONE )
 								{
 									sal_uInt32 nLen = aStat.nSize;
-									ULONG nRead = 0;
+									sal_Size nRead = 0;
 									com::sun::star::uno::Sequence< sal_Int8 > aSeq( nLen );
 									aLockBytes.ReadAt( 0, aSeq.getArray(), nLen, &nRead );
 
diff -ur ooo_SRC680_m143_src.orig/sw/source/ui/shells/tabsh.cxx ooo_SRC680_m143_src/sw/source/ui/shells/tabsh.cxx
--- ooo_SRC680_m143_src.orig/sw/source/ui/shells/tabsh.cxx	2005-12-04 10:02:44.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/ui/shells/tabsh.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -880,7 +880,7 @@
 
 					if( pItem && 0 != ((SvxNumberInfoItem*)pItem)->GetDelCount() )
 					{
-						const ULONG* pDelArr = ((SvxNumberInfoItem*)
+						const sal_uInt32* pDelArr = ((SvxNumberInfoItem*)
 														pItem)->GetDelArray();
 
 						for ( USHORT i = 0; i < ((SvxNumberInfoItem*)pItem)->GetDelCount(); i++ )
diff -ur ooo_SRC680_m143_src.orig/sw/source/ui/uiview/viewstat.cxx ooo_SRC680_m143_src/sw/source/ui/uiview/viewstat.cxx
--- ooo_SRC680_m143_src.orig/sw/source/ui/uiview/viewstat.cxx	2005-12-04 10:02:44.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/ui/uiview/viewstat.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -590,7 +590,7 @@
 	Beschreibung:
  --------------------------------------------------------------------*/
 
-sal_Bool SwView::HasUIFeature( sal_uInt32 nFeature )
+sal_Bool SwView::HasUIFeature( ULONG nFeature )
 {
     sal_Bool bRet = sal_False;
     switch(nFeature)
diff -ur ooo_SRC680_m143_src.orig/sw/source/ui/utlui/content.cxx ooo_SRC680_m143_src/sw/source/ui/utlui/content.cxx
--- ooo_SRC680_m143_src.orig/sw/source/ui/utlui/content.cxx	2005-12-04 10:02:44.000000000 +0100
+++ ooo_SRC680_m143_src/sw/source/ui/utlui/content.cxx	2005-12-04 10:04:09.000000000 +0100
@@ -2308,7 +2308,7 @@
 
 
 sal_Bool  SwContentTree::NotifyMoving( SvLBoxEntry*  pTarget,
-		SvLBoxEntry*  pEntry, SvLBoxEntry*& , sal_uInt32& )
+		SvLBoxEntry*  pEntry, SvLBoxEntry*& , ULONG& )
 {
 	if(!bDocChgdInDragging)
 	{
@@ -2348,7 +2348,7 @@
 
 
 sal_Bool  SwContentTree::NotifyCopying( SvLBoxEntry*  pTarget,
-		SvLBoxEntry*  pEntry, SvLBoxEntry*& , sal_uInt32& )
+		SvLBoxEntry*  pEntry, SvLBoxEntry*& , ULONG& )
 {
 	if(!bDocChgdInDragging)
 	{
