diff -ur ooo_SRC680_m140_src.orig/framework/inc/services/documentproperties.hxx ooo_SRC680_m140_src/framework/inc/services/documentproperties.hxx
--- ooo_SRC680_m140_src.orig/framework/inc/services/documentproperties.hxx	2005-11-17 13:21:16.000000000 +0100
+++ ooo_SRC680_m140_src/framework/inc/services/documentproperties.hxx	2005-11-17 13:24:44.000000000 +0100
@@ -700,7 +700,8 @@
 		void impl_writeToStream( SvStream& aStream,	const	sal_uInt16&						nValue									);
 		void impl_writeToStream( SvStream& aStream,	const	sal_Int32&						nValue  								);
 		void impl_writeToStream( SvStream& aStream,	const	sal_uInt32&						nValue  								);
-
+		void impl_writeToStream( SvStream& aStream,	const	sal_Int64&						nValue  								);
+		void impl_writeToStream( SvStream& aStream,	const	sal_uInt64&						nValue  								);
 		/*-****************************************************************************************************//**
 			@short		convert a format-ID to right MIMEType
 			@descr		Use "aStaticConvertTable[]" to do that!
diff -ur ooo_SRC680_m140_src.orig/framework/source/layoutmanager/layoutmanager.cxx ooo_SRC680_m140_src/framework/source/layoutmanager/layoutmanager.cxx
--- ooo_SRC680_m140_src.orig/framework/source/layoutmanager/layoutmanager.cxx	2005-11-17 13:21:16.000000000 +0100
+++ ooo_SRC680_m140_src/framework/source/layoutmanager/layoutmanager.cxx	2005-11-17 13:24:44.000000000 +0100
@@ -1733,7 +1733,7 @@
     sal_Int32 nFreeRowColPixelPos( 0 );
     sal_Int32 nMaxSpace( 0 );
     sal_Int32 nNeededSpace( 0 );
-    sal_Int32 nTopDockingAreaSize( 0 );
+    long nTopDockingAreaSize( 0 );
     sal_Bool  bFoundRowColumn( sal_False );
 
     if (( DockingArea == DockingArea_DOCKINGAREA_TOP ) ||
@@ -2250,7 +2250,7 @@
         return rMovedElementRect;
     else
     {
-        sal_Int32 nSpace( 0 );
+        long nSpace( 0 );
         ::Rectangle aFrontDockingRect( rMovedElementRect );
         for ( sal_uInt32 i = 0; i < aRowColumnWindowData.aRowColumnWindows.size(); i++ )
         {
@@ -2398,11 +2398,11 @@
     sal_Bool bHorizontalDockArea( ( eDockingArea == DockingArea_DOCKINGAREA_TOP ) ||
                                   ( eDockingArea == DockingArea_DOCKINGAREA_BOTTOM ));
 
-    sal_Int32 nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() );
-    sal_Int32 nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() );
+    long nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() );
+    long nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() );
 
     ::Size  aStatusBarSize( implts_getStatusBarSize() );
-    sal_Int32 nMaxLeftRightDockAreaSize = rContainerWinSize.Height() -
+    long nMaxLeftRightDockAreaSize = rContainerWinSize.Height() -
                                           nTopDockingAreaSize -
                                           nBottomDockingAreaSize -
                                           aStatusBarSize.Height();
@@ -2410,13 +2410,12 @@
     ::Rectangle aTrackingRect( rTrackingRect );
     if ( bHorizontalDockArea )
     {
-        sal_Int32 nPosX( std::max( sal_Int32( rTrackingRect.Left()), sal_Int32( 0 )));
+        long nPosX( std::max( sal_Int32( rTrackingRect.Left()), sal_Int32( 0 )));
         if (( nPosX + rTrackingRect.getWidth()) > rContainerWinSize.Width() )
             nPosX = std::min( nPosX,
-                                std::max( sal_Int32( rContainerWinSize.Width() - rTrackingRect.getWidth() ),
-                                          sal_Int32( 0 )));
+                                std::max( rContainerWinSize.Width() - rTrackingRect.getWidth() , 0L ));
 
-        sal_Int32 nSize = std::min( rContainerWinSize.Width(), rTrackingRect.getWidth() );
+        long nSize = std::min( rContainerWinSize.Width(), rTrackingRect.getWidth() );
 
         aTrackingRect.SetPos( ::Point( nPosX, rRowColumnRect.Top() ));
         aTrackingRect.setWidth( nSize );
@@ -2428,16 +2427,15 @@
     }
     else
     {
-        sal_Int32 nMaxDockingAreaHeight = std::max( sal_Int32( 0 ),
-                                                    sal_Int32( nMaxLeftRightDockAreaSize ));
+        long nMaxDockingAreaHeight = std::max( 0L, nMaxLeftRightDockAreaSize );
 
-        sal_Int32 nPosY( std::max( sal_Int32( aTrackingRect.Top()), sal_Int32( nTopDockingAreaSize )));
+        long nPosY( std::max( aTrackingRect.Top(), nTopDockingAreaSize ));
         if (( nPosY + aTrackingRect.getHeight()) > ( nTopDockingAreaSize + nMaxDockingAreaHeight ))
             nPosY = std::min( nPosY,
-                                std::max( sal_Int32( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() )),
-                                        sal_Int32( nTopDockingAreaSize )));
+                                std::max( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() ),
+                                          nTopDockingAreaSize ));
 
-        sal_Int32 nSize = std::min( nMaxDockingAreaHeight, aTrackingRect.getHeight() );
+        long nSize = std::min( nMaxDockingAreaHeight, aTrackingRect.getHeight() );
 
         aTrackingRect.SetPos( ::Point( rRowColumnRect.Left(), nPosY ));
         aTrackingRect.setWidth( rRowColumnRect.getWidth() );
@@ -2512,12 +2510,12 @@
     Reference< css::awt::XWindow >          xDockingAreaWindow;
     ::Rectangle                             aTrackingRect( rTrackingRect );
     ::com::sun::star::ui::DockingArea eDockedArea( (::com::sun::star::ui::DockingArea)rUIElement.m_aDockedData.m_nDockedArea );
-    sal_Int32                               nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() );
-    sal_Int32                               nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() );
+    long                               nTopDockingAreaSize( implts_getTopBottomDockingAreaSizes().Width() );
+    long                               nBottomDockingAreaSize( implts_getTopBottomDockingAreaSizes().Height() );
     sal_Bool                                bHorizontalDockArea( ( eDockedArea == DockingArea_DOCKINGAREA_TOP ) ||
                                                                  ( eDockedArea == DockingArea_DOCKINGAREA_BOTTOM ));
     ::Size                                  aStatusBarSize( implts_getStatusBarSize() );
-    sal_Int32                               nMaxLeftRightDockAreaSize = aContainerWinSize.Height() -
+    long                               nMaxLeftRightDockAreaSize = aContainerWinSize.Height() -
                                                                         nTopDockingAreaSize -
                                                                         nBottomDockingAreaSize -
                                                                         aStatusBarSize.Height();
@@ -2612,8 +2610,7 @@
                     {
                         if ( bHorizontalDockArea )
                         {
-                            sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32( aContainerWinSize.Width() -  aWindowRect.Left() ),
-                                                                                    sal_Int32( aTrackingRect.getWidth() )));
+                            long nSize = ::std::max( 0L, std::min( aContainerWinSize.Width() -  aWindowRect.Left(), aTrackingRect.getWidth() ));
                             if ( nSize == 0 )
                                 nSize = aWindowRect.getWidth();
 
@@ -2626,9 +2623,8 @@
                         }
                         else
                         {
-                            sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32(
-                                                    nTopDockingAreaSize + nMaxLeftRightDockAreaSize - aWindowRect.Top() ),
-                                                    sal_Int32( aTrackingRect.getHeight() )));
+                            long nSize = ::std::max( 0L, std::min( nTopDockingAreaSize + nMaxLeftRightDockAreaSize - aWindowRect.Top(),
+                                                    aTrackingRect.getHeight() ));
                             if ( nSize == 0 )
                                 nSize = aWindowRect.getHeight();
 
@@ -2649,8 +2645,7 @@
                     {
                         if ( bHorizontalDockArea )
                         {
-                            sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32(( aContainerWinSize.Width() ) - aWindowRect.Right() ),
-                                                                                    sal_Int32( aTrackingRect.getWidth() )));
+                            long nSize = ::std::max( 0L, std::min( aContainerWinSize.Width() - aWindowRect.Right(), aTrackingRect.getWidth() ));
                             if ( nSize == 0 )
                             {
                                 aUIElementRect.SetPos( ::Point( aContainerWinSize.Width() - aTrackingRect.getWidth(), aWindowRect.Top() ));
@@ -2669,8 +2664,8 @@
                         }
                         else
                         {
-                            sal_Int32 nSize = ::std::max( sal_Int32( 0 ), std::min( sal_Int32( nTopDockingAreaSize + nMaxLeftRightDockAreaSize - aWindowRect.Bottom() ),
-                                                                                    sal_Int32( aTrackingRect.getHeight() )));
+                            long nSize = ::std::max( 0L, std::min( nTopDockingAreaSize + nMaxLeftRightDockAreaSize - aWindowRect.Bottom(),
+                                                                  aTrackingRect.getHeight() ));
                             aUIElementRect.SetPos( ::Point( aWindowRect.Left(), aWindowRect.Bottom() ));
                             aUIElementRect.SetSize( ::Size( aWindowRect.getWidth(), nSize ));
 
@@ -2766,14 +2761,12 @@
 
         if ( bHorizontalDockArea )
         {
-            sal_Int32 nPosX( std::max( sal_Int32( rTrackingRect.Left()), sal_Int32( 0 )));
+            long nPosX( std::max( rTrackingRect.Left(), 0L ));
             if (( nPosX + rTrackingRect.getWidth()) > aContainerWinSize.Width() )
-                nPosX = std::min( nPosX,
-                                std::max( sal_Int32( aContainerWinSize.Width() - rTrackingRect.getWidth() ),
-                                          sal_Int32( 0 )));
+                nPosX = std::min( nPosX, std::max( aContainerWinSize.Width() - rTrackingRect.getWidth(), 0L ));
 
-            sal_Int32 nSize = std::min( aContainerWinSize.Width(), rTrackingRect.getWidth() );
-            sal_Int32 nDockHeight = std::max( aDockingAreaRect.getHeight(), sal_Int32( 0 ));
+            long nSize = std::min( aContainerWinSize.Width(), rTrackingRect.getWidth() );
+            long nDockHeight = std::max( aDockingAreaRect.getHeight(), 0L );
             if ( nDockHeight == 0 )
             {
                 sal_Int32 nPosY( std::max( aDockingAreaRect.Top(), aDockingAreaRect.Bottom() ));
@@ -2811,17 +2804,16 @@
         }
         else
         {
-            sal_Int32 nMaxDockingAreaHeight = std::max( sal_Int32( 0 ),
-                                                        sal_Int32( nMaxLeftRightDockAreaSize ));
+            long nMaxDockingAreaHeight = std::max( 0L, nMaxLeftRightDockAreaSize );
 
-            sal_Int32 nPosY( std::max( sal_Int32( aTrackingRect.Top()), sal_Int32( nTopDockingAreaSize )));
+            long nPosY( std::max( aTrackingRect.Top(), nTopDockingAreaSize ) );
             if (( nPosY + aTrackingRect.getHeight()) > ( nTopDockingAreaSize + nMaxDockingAreaHeight ))
                 nPosY = std::min( nPosY,
-                                std::max( sal_Int32( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() )),
-                                        sal_Int32( nTopDockingAreaSize )));
+                                std::max( nTopDockingAreaSize + ( nMaxDockingAreaHeight - aTrackingRect.getHeight() ),
+                                          nTopDockingAreaSize ));
 
-            sal_Int32 nSize = std::min( nMaxDockingAreaHeight, aTrackingRect.getHeight() );
-            sal_Int32 nDockWidth = std::max( aDockingAreaRect.getWidth(), sal_Int32( 0 ));
+            long nSize = std::min( nMaxDockingAreaHeight, aTrackingRect.getHeight() );
+            long nDockWidth = std::max( aDockingAreaRect.getWidth(), 0L );
             if ( nDockWidth == 0 )
             {
                 sal_Int32 nPosX( std::max( aDockingAreaRect.Left(), aDockingAreaRect.Right() ));
@@ -5158,7 +5150,7 @@
             // Position the status bar
             if ( aStatusBarSize.Height() > 0 )
             {
-                implts_setStatusBarPosSize( ::Point( 0, std::max(( aContainerSize.Height() ), sal_Int32( 0 ))),
+                implts_setStatusBarPosSize( ::Point( 0, std::max(( (sal_Int32) aContainerSize.Height() ), sal_Int32( 0 ))),
                                             ::Size( aContainerSize.Width(),aStatusBarSize.Height() ));
             }
 
@@ -5210,8 +5202,8 @@
 {
     sal_Int32   nDiff( 0 );
     sal_Int32   nSpace( rRowColumnWindowData.nSpace );
-    sal_Int32   nTopDockingAreaSize;
-    sal_Int32   nBottomDockingAreaSize;
+    long        nTopDockingAreaSize;
+    long        nBottomDockingAreaSize;
     sal_Int32   nContainerClientSize;
 
     if ( rRowColumnWindowData.aRowColumnWindows.size() == 0 )
@@ -5556,7 +5548,7 @@
                                                                   aRectangle.Height - aInfo.TopInset  - aInfo.BottomInset );
     ::Size               aStatusBarSize         = implts_getStatusBarSize();
 
-    sal_Int32 nLeftRightDockingAreaHeight( aContainerClientSize.Height );
+    long nLeftRightDockingAreaHeight( aContainerClientSize.Height );
     if ( rBorderSpace.Y >= 0 )
     {
         // Top docking area window
@@ -5572,8 +5564,8 @@
     if ( rBorderSpace.Height >= 0 )
     {
         // Bottom docking area window
-        sal_Int32 nBottomPos = std::max( sal_Int32( aContainerClientSize.Height - rBorderSpace.Height - aStatusBarSize.Height() ), sal_Int32( 0 ));
-        sal_Int32 nHeight = ( nBottomPos == 0 ) ? 0 : rBorderSpace.Height;
+        long nBottomPos = std::max( aContainerClientSize.Height - rBorderSpace.Height - aStatusBarSize.Height(), 0L );
+        long nHeight = ( nBottomPos == 0 ) ? 0L : rBorderSpace.Height;
 
         ReadGuard aReadLock( m_aLock );
         Reference< css::awt::XWindow > xDockAreaWindow( m_xDockAreaWindows[DockingArea_DOCKINGAREA_BOTTOM] );
@@ -5593,7 +5585,7 @@
         aReadLock.unlock();
 
         // We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority!
-        sal_Int32 nHeight = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight ));
+        long nHeight = std::max( 0L, nLeftRightDockingAreaHeight );
 
         xDockAreaWindow->setPosSize( 0, rBorderSpace.Y, rBorderSpace.X, nHeight, css::awt::PosSize::POSSIZE );
         xDockAreaWindow->setVisible( sal_True );
@@ -5606,9 +5598,9 @@
         aReadLock.unlock();
 
         // We also have to change our right docking area window if the top or bottom area has changed. They have a higher priority!
-        sal_Int32 nLeftPos  = std::max( sal_Int32( 0 ), sal_Int32( aContainerClientSize.Width - rBorderSpace.Width ));
-        sal_Int32 nHeight   = std::max( sal_Int32( 0 ), sal_Int32( nLeftRightDockingAreaHeight ));
-        sal_Int32 nWidth    = ( nLeftPos == 0 ) ? 0 : rBorderSpace.Width;
+        long nLeftPos  = std::max( 0, aContainerClientSize.Width - rBorderSpace.Width );
+        long nHeight   = std::max( 0L, nLeftRightDockingAreaHeight );
+        long nWidth    = ( nLeftPos == 0 ) ? 0L : rBorderSpace.Width;
 
         xDockAreaWindow->setPosSize( nLeftPos, rBorderSpace.Y, nWidth, nHeight, css::awt::PosSize::POSSIZE );
         xDockAreaWindow->setVisible( sal_True );
@@ -5617,7 +5609,7 @@
     // Position the status bar
     if ( aStatusBarSize.Height() > 0 )
     {
-        implts_setStatusBarPosSize( ::Point( 0, std::max(( aContainerClientSize.Height - aStatusBarSize.Height() ), sal_Int32( 0 ))),
+        implts_setStatusBarPosSize( ::Point( 0, std::max((sal_Int32) (aContainerClientSize.Height - aStatusBarSize.Height()), sal_Int32( 0 ))),
                                     ::Size( aContainerClientSize.Width, aStatusBarSize.Height() ));
     }
 }
diff -ur ooo_SRC680_m140_src.orig/framework/source/services/documentproperties.cxx ooo_SRC680_m140_src/framework/source/services/documentproperties.cxx
--- ooo_SRC680_m140_src.orig/framework/source/services/documentproperties.cxx	2005-11-17 13:21:16.000000000 +0100
+++ ooo_SRC680_m140_src/framework/source/services/documentproperties.cxx	2005-11-17 13:24:44.000000000 +0100
@@ -2164,6 +2164,30 @@
 //******************************************************************************************************************************
 //	private method
 //******************************************************************************************************************************
+void DocumentProperties::impl_writeToStream(			SvStream&	aStream	,
+												const	sal_Int64&	nValue	)
+{
+	aStream << nValue;
+	#ifdef ENABLE_STREAMCHECK
+	impldbg_checkSvStream( aStream, "impl_writeToStream( int64 )" );
+	#endif
+}
+
+//******************************************************************************************************************************
+//	private method
+//******************************************************************************************************************************
+void DocumentProperties::impl_writeToStream(			SvStream&	aStream	,
+												const	sal_uInt64&	nValue	)
+{
+	aStream << nValue;
+	#ifdef ENABLE_STREAMCHECK
+	impldbg_checkSvStream( aStream, "impl_writeToStream( unsigned int64 )" );
+	#endif
+}
+
+//******************************************************************************************************************************
+//	private method
+//******************************************************************************************************************************
 OUString DocumentProperties::impl_FormatID2MIMEType( sal_uInt32 nFormatID ) const
 {
 	const int nCount = sizeof( aStaticConvertTable ) / sizeof( tIMPL_ConverterItem );
diff -ur ooo_SRC680_m140_src.orig/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx ooo_SRC680_m140_src/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
--- ooo_SRC680_m140_src.orig/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx	2005-11-17 13:21:16.000000000 +0100
+++ ooo_SRC680_m140_src/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx	2005-11-17 13:24:44.000000000 +0100
@@ -888,7 +888,7 @@
             Reference< XPropertySet > xPropSet( m_xUserConfigStorage, UNO_QUERY );
             if ( xPropSet.is() )
             {
-                long nOpenMode;
+                sal_Int32 nOpenMode;
                 Any a = xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenMode" )));
                 if ( a >>= nOpenMode )
                     m_bReadOnly = !( nOpenMode & ElementModes::WRITE );
diff -ur ooo_SRC680_m140_src.orig/framework/source/uiconfiguration/uiconfigurationmanager.cxx ooo_SRC680_m140_src/framework/source/uiconfiguration/uiconfigurationmanager.cxx
--- ooo_SRC680_m140_src.orig/framework/source/uiconfiguration/uiconfigurationmanager.cxx	2005-11-17 13:21:16.000000000 +0100
+++ ooo_SRC680_m140_src/framework/source/uiconfiguration/uiconfigurationmanager.cxx	2005-11-17 13:24:44.000000000 +0100
@@ -1230,7 +1230,7 @@
         {
             try
             {
-                long nOpenMode;
+                sal_Int32 nOpenMode;
                 Any a = xPropSet->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenMode" )));
                 if ( a >>= nOpenMode )
                     m_bReadOnly = !( nOpenMode & ElementModes::WRITE );
