You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2026/01/06 12:11:35 UTC

(openoffice) branch AOO42X updated: Cleanup

This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
     new ec1f9484a8 Cleanup
ec1f9484a8 is described below

commit ec1f9484a874f7fe0971c3eb82caba864ed2663f
Author: mseidel <ms...@apache.org>
AuthorDate: Tue Jan 6 13:10:07 2026 +0100

    Cleanup
    
    (cherry picked from commit a7527837f28070cdb5d08938d5660685ce9e0145)
---
 main/sw/source/core/layout/flylay.cxx   | 1571 +++++++++++++++----------------
 main/vcl/os2/source/app/makefile.mk     |   15 +-
 main/vcl/os2/source/window/makefile.mk  |   10 +-
 main/vcl/os2/source/window/salframe.cxx |  536 +++++------
 4 files changed, 1052 insertions(+), 1080 deletions(-)

diff --git a/main/sw/source/core/layout/flylay.cxx b/main/sw/source/core/layout/flylay.cxx
index 2d0264c24c..97f90170ec 100644
--- a/main/sw/source/core/layout/flylay.cxx
+++ b/main/sw/source/core/layout/flylay.cxx
@@ -19,8 +19,6 @@
  *
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 #include "doc.hxx"
@@ -39,7 +37,6 @@
 #include "pam.hxx"
 #include "sectfrm.hxx"
 
-
 #include <svx/svdpage.hxx>
 #include <editeng/ulspitem.hxx>
 #include <fmtanchr.hxx>
@@ -57,145 +54,137 @@
 #include <viewsh.hxx>
 #include <viewimp.hxx>
 
-
 using namespace ::com::sun::star;
 
-
 /*************************************************************************
-|*
 |*	SwFlyFreeFrm::SwFlyFreeFrm(), ~SwFlyFreeFrm()
 |*
 |*	Ersterstellung		MA 03. Dec. 92
-|*	Letzte Aenderung	MA 09. Apr. 99
-|*
+|*	Letzte Änderung		MA 09. Apr. 99
 |*************************************************************************/
 
 SwFlyFreeFrm::SwFlyFreeFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) :
 	SwFlyFrm( pFmt, pSib, pAnch ),
-    pPage( 0 ),
-    // --> OD 2004-11-15 #i34753#
-    mbNoMakePos( false ),
-    // <--
-    // --> OD 2004-11-12 #i37068#
-    mbNoMoveOnCheckClip( false )
-    // <--
+	pPage( 0 ),
+	// --> OD 2004-11-15 #i34753#
+	mbNoMakePos( false ),
+	// <--
+	// --> OD 2004-11-12 #i37068#
+	mbNoMoveOnCheckClip( false )
+	// <--
 {
 }
 
 SwFlyFreeFrm::~SwFlyFreeFrm()
 {
-	//und Tschuess.
-    // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
-    if( GetPageFrm() )
-    {
-        if( GetFmt()->GetDoc()->IsInDtor() )
-        {
-            // --> OD 2004-06-04 #i29879# - remove also to-frame anchored Writer
-            // fly frame from page.
-            const bool bRemoveFromPage =
-                    GetPageFrm()->GetSortedObjs() &&
-                    ( IsFlyAtCntFrm() ||
-                      ( GetAnchorFrm() && GetAnchorFrm()->IsFlyFrm() ) );
-            if ( bRemoveFromPage )
-            {
-                GetPageFrm()->GetSortedObjs()->Remove( *this );
-            }
-        }
-        else
-        {
-            SwRect aTmp( GetObjRectWithSpaces() );
-            SwFlyFreeFrm::NotifyBackground( GetPageFrm(), aTmp, PREP_FLY_LEAVE );
-        }
-    }
+	// und Tschüss.
+	// --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
+	if( GetPageFrm() )
+	{
+		if( GetFmt()->GetDoc()->IsInDtor() )
+		{
+			// --> OD 2004-06-04 #i29879# - remove also to-frame anchored Writer
+			// fly frame from page.
+			const bool bRemoveFromPage =
+					GetPageFrm()->GetSortedObjs() &&
+					( IsFlyAtCntFrm() ||
+					  ( GetAnchorFrm() && GetAnchorFrm()->IsFlyFrm() ) );
+			if ( bRemoveFromPage )
+			{
+				GetPageFrm()->GetSortedObjs()->Remove( *this );
+			}
+		}
+		else
+		{
+			SwRect aTmp( GetObjRectWithSpaces() );
+			SwFlyFreeFrm::NotifyBackground( GetPageFrm(), aTmp, PREP_FLY_LEAVE );
+		}
+	}
 }
 
 // --> OD 2004-06-29 #i28701#
 TYPEINIT1(SwFlyFreeFrm,SwFlyFrm);
 // <--
 /*************************************************************************
-|*
 |*	SwFlyFreeFrm::NotifyBackground()
 |*
 |*	Beschreibung		Benachrichtigt den Hintergrund (alle CntntFrms die
-|*		gerade ueberlappt werden. Ausserdem wird das Window in einigen
-|* 		Faellen direkt invalidiert (vor allem dort, wo keine CntntFrms
-|*		ueberlappt werden.
+|*		gerade überlappt werden. Ausserdem wird das Window in einigen
+|* 		Fällen direkt invalidiert (vor allem dort, wo keine CntntFrms
+|*		überlappt werden.
 |* 		Es werden auch die CntntFrms innerhalb von anderen Flys
-|*		beruecksichtigt.
+|*		berücksichtigt.
 |*	Ersterstellung		MA 03. Dec. 92
-|*	Letzte Aenderung	MA 26. Aug. 93
-|*
+|*	Letzte Änderung		MA 26. Aug. 93
 |*************************************************************************/
 
 void SwFlyFreeFrm::NotifyBackground( SwPageFrm *pPageFrm,
 									 const SwRect& rRect, PrepareHint eHint )
 {
-    ::Notify_Background( GetVirtDrawObj(), pPageFrm, rRect, eHint, sal_True );
+	::Notify_Background( GetVirtDrawObj(), pPageFrm, rRect, eHint, sal_True );
 }
 
 /*************************************************************************
-|*
 |*	SwFlyFreeFrm::MakeAll()
 |*
 |*	Ersterstellung		MA 18. Feb. 94
-|*	Letzte Aenderung	MA 03. Mar. 97
-|*
+|*	Letzte Änderung		MA 03. Mar. 97
 |*************************************************************************/
 
 void SwFlyFreeFrm::MakeAll()
 {
-    // OD 2004-01-19 #110582#
-    if ( !GetFmt()->GetDoc()->IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) )
-    {
-        return;
-    }
+	// OD 2004-01-19 #110582#
+	if ( !GetFmt()->GetDoc()->IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) )
+	{
+		return;
+	}
 
-    if ( !GetAnchorFrm() || IsLocked() || IsColLocked() )
+	if ( !GetAnchorFrm() || IsLocked() || IsColLocked() )
+		return;
+	// --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
+	if( !GetPageFrm() && GetAnchorFrm() && GetAnchorFrm()->IsInFly() )
+	{
+		SwFlyFrm* pFly = AnchorFrm()->FindFlyFrm();
+		SwPageFrm *pPageFrm = pFly ? pFly->FindPageFrm() : NULL;
+		if( pPageFrm )
+			pPageFrm->AppendFlyToPage( this );
+	}
+	if( !GetPageFrm() )
 		return;
-    // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
-    if( !GetPageFrm() && GetAnchorFrm() && GetAnchorFrm()->IsInFly() )
-    {
-        SwFlyFrm* pFly = AnchorFrm()->FindFlyFrm();
-        SwPageFrm *pPageFrm = pFly ? pFly->FindPageFrm() : NULL;
-        if( pPageFrm )
-            pPageFrm->AppendFlyToPage( this );
-    }
-    if( !GetPageFrm() )
-        return;
-
-	Lock();	//Der Vorhang faellt
-
-	//uebernimmt im DTor die Benachrichtigung
+
+	Lock();	// Der Vorhang fällt
+
+	// übernimmt im DTor die Benachrichtigung
 	const SwFlyNotify aNotify( this );
 
 	if ( IsClipped() )
-    {
-        bValidSize = bHeightClipped = bWidthClipped = sal_False;
-        // --> OD 2004-11-03 #114798# - no invalidation of position,
-        // if anchored object is anchored inside a Writer fly frame,
-        // its position is already locked, and it follows the text flow.
-        // --> OD 2004-11-15 #i34753# - add condition:
-        // no invalidation of position, if no direct move is requested in <CheckClip(..)>
-        if ( !IsNoMoveOnCheckClip() &&
-             !( PositionLocked() &&
-                GetAnchorFrm()->IsInFly() &&
-                GetFrmFmt().GetFollowTextFlow().GetValue() ) )
-        // <--
-        {
-            bValidPos = sal_False;
-        }
-        // <--
-    }
-
-    // FME 2007-08-30 #i81146# new loop control
-    sal_uInt16 nLoopControlRuns = 0;
-    const sal_uInt16 nLoopControlMax = 10;
+	{
+		bValidSize = bHeightClipped = bWidthClipped = sal_False;
+		// --> OD 2004-11-03 #114798# - no invalidation of position,
+		// if anchored object is anchored inside a Writer fly frame,
+		// its position is already locked, and it follows the text flow.
+		// --> OD 2004-11-15 #i34753# - add condition:
+		// no invalidation of position, if no direct move is requested in <CheckClip(..)>
+		if ( !IsNoMoveOnCheckClip() &&
+			 !( PositionLocked() &&
+				GetAnchorFrm()->IsInFly() &&
+				GetFrmFmt().GetFollowTextFlow().GetValue() ) )
+		// <--
+		{
+			bValidPos = sal_False;
+		}
+		// <--
+	}
+
+	// FME 2007-08-30 #i81146# new loop control
+	sal_uInt16 nLoopControlRuns = 0;
+	const sal_uInt16 nLoopControlMax = 10;
 
 	while ( !bValidPos || !bValidSize || !bValidPrtArea || bFormatHeightOnly )
 	{
-        SWRECTFN( this )
-        const SwFmtFrmSize *pSz;
-		{	//Zusaetzlicher Scope, damit aAccess vor dem Check zerstoert wird!
+		SWRECTFN( this )
+		const SwFmtFrmSize *pSz;
+		{	// Zusätzlicher Scope, damit aAccess vor dem Check zerstört wird!
 
 			SwBorderAttrAccess aAccess( SwFrm::GetCache(), this );
 			const SwBorderAttrs &rAttrs = *aAccess.Get();
@@ -206,19 +195,19 @@ void SwFlyFreeFrm::MakeAll()
 			{
 				bValidPrtArea = sal_False;
 /*
-                // This is also done in the Format function, so I think
-                // this code is not necessary anymore:
-                const Size aRelSize( CalcRel( *pSz ) );
+				// This is also done in the Format function, so I think
+				// this code is not necessary anymore:
+				const Size aRelSize( CalcRel( *pSz ) );
 				const SwTwips nMin = MINFLY + rAttrs.CalcLeftLine()+rAttrs.CalcRightLine();
-                long nDiff = bVert ? aRelSize.Height() : aRelSize.Width();
-                if( nDiff < nMin )
-                    nDiff = nMin;
-                nDiff -= (aFrm.*fnRect->fnGetWidth)();
-                if( nDiff )
-                {
-                    (aFrm.*fnRect->fnAddRight)( nDiff );
-                    bValidPos = sal_False;
-                }
+				long nDiff = bVert ? aRelSize.Height() : aRelSize.Width();
+				if( nDiff < nMin )
+					nDiff = nMin;
+				nDiff -= (aFrm.*fnRect->fnGetWidth)();
+				if( nDiff )
+				{
+					(aFrm.*fnRect->fnAddRight)( nDiff );
+					bValidPos = sal_False;
+				}
 */
 			}
 
@@ -234,19 +223,19 @@ void SwFlyFreeFrm::MakeAll()
 
 			if ( !bValidPos )
 			{
-                const Point aOldPos( (Frm().*fnRect->fnGetPos)() );
-                // OD 2004-03-23 #i26791# - use new method <MakeObjPos()>
-                // --> OD 2004-11-15 #i34753# - no positioning, if requested.
-                if ( IsNoMakePos() )
-                    bValidPos = sal_True;
-                else
-                    // OD 2004-03-23 #i26791# - use new method <MakeObjPos()>
-                    MakeObjPos();
-                // <--
-                if( aOldPos == (Frm().*fnRect->fnGetPos)() )
+				const Point aOldPos( (Frm().*fnRect->fnGetPos)() );
+				// OD 2004-03-23 #i26791# - use new method <MakeObjPos()>
+				// --> OD 2004-11-15 #i34753# - no positioning, if requested.
+				if ( IsNoMakePos() )
+					bValidPos = sal_True;
+				else
+					// OD 2004-03-23 #i26791# - use new method <MakeObjPos()>
+					MakeObjPos();
+				// <--
+				if( aOldPos == (Frm().*fnRect->fnGetPos)() )
 				{
-                    if( !bValidPos && GetAnchorFrm()->IsInSct() &&
-                        !GetAnchorFrm()->FindSctFrm()->IsValid() )
+					if( !bValidPos && GetAnchorFrm()->IsInSct() &&
+						!GetAnchorFrm()->FindSctFrm()->IsValid() )
 						bValidPos = sal_True;
 				}
 				else
@@ -254,26 +243,26 @@ void SwFlyFreeFrm::MakeAll()
 			}
 		}
 
-        if ( bValidPos && bValidSize )
-        {
-            ++nLoopControlRuns;
+		if ( bValidPos && bValidSize )
+		{
+			++nLoopControlRuns;
 
 #if OSL_DEBUG_LEVEL > 1
-            ASSERT( nLoopControlRuns < nLoopControlMax, "LoopControl in SwFlyFreeFrm::MakeAll" )
+			ASSERT( nLoopControlRuns < nLoopControlMax, "LoopControl in SwFlyFreeFrm::MakeAll" )
 #endif
 
-            if ( nLoopControlRuns < nLoopControlMax )
-			    CheckClip( *pSz );
-        }
-        else
-            nLoopControlRuns = 0;
+			if ( nLoopControlRuns < nLoopControlMax )
+				CheckClip( *pSz );
+		}
+		else
+			nLoopControlRuns = 0;
 	}
 	Unlock();
 
 #ifdef DBG_UTIL
-    SWRECTFN( this )
-    ASSERT( bHeightClipped || ( (Frm().*fnRect->fnGetHeight)() > 0 &&
-            (Prt().*fnRect->fnGetHeight)() > 0),
+	SWRECTFN( this )
+	ASSERT( bHeightClipped || ( (Frm().*fnRect->fnGetHeight)() > 0 &&
+			(Prt().*fnRect->fnGetHeight)() > 0),
 			"SwFlyFreeFrm::Format(), flipping Fly." );
 
 #endif
@@ -281,59 +270,57 @@ void SwFlyFreeFrm::MakeAll()
 
 /** determines, if direct environment of fly frame has 'auto' size
 
-    OD 07.08.2003 #i17297#, #111066#, #111070#
-    start with anchor frame and search via <GetUpper()> for a header, footer,
-    row or fly frame stopping at page frame.
-    return <true>, if such a frame is found and it has 'auto' size.
-    otherwise <false> is returned.
+	OD 07.08.2003 #i17297#, #111066#, #111070#
+	start with anchor frame and search via <GetUpper()> for a header, footer,
+	row or fly frame stopping at page frame.
+	return <true>, if such a frame is found and it has 'auto' size.
+	otherwise <false> is returned.
 
-    @author OD
+	@author OD
 
-    @return boolean indicating, that direct environment has 'auto' size
+	@return boolean indicating, that direct environment has 'auto' size
 */
 bool SwFlyFreeFrm::HasEnvironmentAutoSize() const
 {
-    bool bRetVal = false;
-
-    const SwFrm* pToBeCheckedFrm = GetAnchorFrm();
-    while ( pToBeCheckedFrm &&
-            !pToBeCheckedFrm->IsPageFrm() )
-    {
-        if ( pToBeCheckedFrm->IsHeaderFrm() ||
-             pToBeCheckedFrm->IsFooterFrm() ||
-             pToBeCheckedFrm->IsRowFrm() ||
-             pToBeCheckedFrm->IsFlyFrm() )
-        {
-            bRetVal = ATT_FIX_SIZE !=
-                      pToBeCheckedFrm->GetAttrSet()->GetFrmSize().GetHeightSizeType();
-            break;
-        }
-        else
-        {
-            pToBeCheckedFrm = pToBeCheckedFrm->GetUpper();
-        }
-    }
-
-    return bRetVal;
+	bool bRetVal = false;
+
+	const SwFrm* pToBeCheckedFrm = GetAnchorFrm();
+	while ( pToBeCheckedFrm &&
+			!pToBeCheckedFrm->IsPageFrm() )
+	{
+		if ( pToBeCheckedFrm->IsHeaderFrm() ||
+			 pToBeCheckedFrm->IsFooterFrm() ||
+			 pToBeCheckedFrm->IsRowFrm() ||
+			 pToBeCheckedFrm->IsFlyFrm() )
+		{
+			bRetVal = ATT_FIX_SIZE !=
+					  pToBeCheckedFrm->GetAttrSet()->GetFrmSize().GetHeightSizeType();
+			break;
+		}
+		else
+		{
+			pToBeCheckedFrm = pToBeCheckedFrm->GetUpper();
+		}
+	}
+
+	return bRetVal;
 }
 
 /*************************************************************************
-|*
 |*	SwFlyFreeFrm::CheckClip()
 |*
 |*	Ersterstellung		MA 21. Feb. 94
-|*	Letzte Aenderung	MA 03. Mar. 97
-|*
+|*	Letzte Änderung		MA 03. Mar. 97
 |*************************************************************************/
 
 void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
 {
-	//Jetzt ist es ggf. an der Zeit geignete Massnahmen zu ergreifen wenn
-	//der Fly nicht in seine Umgebung passt.
-    //Zuerst gibt der Fly seine Position auf. Danach wird er zunaechst
-    //formatiert. Erst wenn er auch durch die Aufgabe der Position nicht
-	//passt wird die Breite oder Hoehe aufgegeben - der Rahmen wird soweit
-	//wie notwendig zusammengequetscht.
+	// Jetzt ist es ggf. an der Zeit geeignete Massnahmen zu ergreifen wenn
+	// der Fly nicht in seine Umgebung passt.
+	// Zuerst gibt der Fly seine Position auf. Danach wird er zunächst
+	// formatiert. Erst wenn er auch durch die Aufgabe der Position nicht
+	// passt wird die Breite oder Höhe aufgegeben - der Rahmen wird soweit
+	// wie notwendig zusammengequetscht.
 
 	const SwVirtFlyDrawObj *pObj = GetVirtDrawObj();
 	SwRect aClip, aTmpStretch;
@@ -341,31 +328,31 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
 	::CalcClipRect( pObj, aTmpStretch, sal_False );
 	aClip._Intersection( aTmpStretch );
 
-    const long nBot = Frm().Top() + Frm().Height();
-    const long nRig = Frm().Left() + Frm().Width();
-    const long nClipBot = aClip.Top() + aClip.Height();
-    const long nClipRig = aClip.Left() + aClip.Width();
+	const long nBot = Frm().Top() + Frm().Height();
+	const long nRig = Frm().Left() + Frm().Width();
+	const long nClipBot = aClip.Top() + aClip.Height();
+	const long nClipRig = aClip.Left() + aClip.Width();
 
 	const sal_Bool bBot = nBot > nClipBot;
 	const sal_Bool bRig = nRig > nClipRig;
 	if ( bBot || bRig )
 	{
 		sal_Bool bAgain = sal_False;
-        // --> OD 2004-11-12 #i37068# - no move, if it's requested
-        if ( bBot && !IsNoMoveOnCheckClip() &&
-             !GetDrawObjs() && !GetAnchorFrm()->IsInTab() )
-        // <--
+		// --> OD 2004-11-12 #i37068# - no move, if it's requested
+		if ( bBot && !IsNoMoveOnCheckClip() &&
+			 !GetDrawObjs() && !GetAnchorFrm()->IsInTab() )
+		// <--
 		{
 			SwFrm* pHeader = FindFooterOrHeader();
 			// In a header, correction of the position is no good idea.
 			// If the fly moves, some paragraphs has to be formatted, this
-            // could cause a change of the height of the headerframe,
+			// could cause a change of the height of the headerframe,
 			// now the flyframe can change its position and so on ...
-            if ( !pHeader || !pHeader->IsHeaderFrm() )
+			if ( !pHeader || !pHeader->IsHeaderFrm() )
 			{
 				const long nOld = Frm().Top();
-                Frm().Pos().Y() = Max( aClip.Top(), nClipBot - Frm().Height() );
-                if ( Frm().Top() != nOld )
+				Frm().Pos().Y() = Max( aClip.Top(), nClipBot - Frm().Height() );
+				if ( Frm().Top() != nOld )
 					bAgain = sal_True;
 				bHeightClipped = sal_True;
 			}
@@ -373,13 +360,13 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
 		if ( bRig )
 		{
 			const long nOld = Frm().Left();
-            Frm().Pos().X() = Max( aClip.Left(), nClipRig - Frm().Width() );
+			Frm().Pos().X() = Max( aClip.Left(), nClipRig - Frm().Width() );
 			if ( Frm().Left() != nOld )
 			{
 				const SwFmtHoriOrient &rH = GetFmt()->GetHoriOrient();
-				// Links ausgerichtete duerfen nicht nach links verschoben werden,
+				// Links ausgerichtete dürfen nicht nach links verschoben werden,
 				// wenn sie einem anderen ausweichen.
-                if( rH.GetHoriOrient() == text::HoriOrientation::LEFT )
+				if( rH.GetHoriOrient() == text::HoriOrientation::LEFT )
 					Frm().Pos().X() = nOld;
 				else
 					bAgain = sal_True;
@@ -390,22 +377,22 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
 			bValidSize = sal_False;
 		else
 		{
-			//Wenn wir hier ankommen ragt der Frm in unerlaubte Bereiche
-			//hinein, und eine Positionskorrektur ist nicht erlaubt bzw.
-			//moeglich oder noetig.
+			// Wenn wir hier ankommen ragt der Frm in unerlaubte Bereiche
+			// hinein, und eine Positionskorrektur ist nicht erlaubt bzw.
+			// möglich oder nötig.
 
-			//Fuer Flys mit OLE-Objekten als Lower sorgen wir dafuer, dass
-			//immer proportional Resized wird.
+			// Für Flys mit OLE-Objekten als Lower sorgen wir dafür, dass
+			// immer proportional Resized wird.
 			Size aOldSize( Frm().SSize() );
 
-			//Zuerst wird das FrmRect eingestellt, und dann auf den Frm
-			//uebertragen.
+			// Zuerst wird das FrmRect eingestellt, und dann auf den Frm
+			// übertragen.
 			SwRect aFrmRect( Frm() );
 
 			if ( bBot )
 			{
 				long nDiff = nClipBot;
-                nDiff -= aFrmRect.Top(); //nDiff ist die verfuegbare Strecke.
+				nDiff -= aFrmRect.Top(); //nDiff ist die verfügbare Strecke.
 				nDiff = aFrmRect.Height() - nDiff;
 				aFrmRect.Height( aFrmRect.Height() - nDiff );
 				bHeightClipped = sal_True;
@@ -413,28 +400,28 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
 			if ( bRig )
 			{
 				long nDiff = nClipRig;
-                nDiff -= aFrmRect.Left();//nDiff ist die verfuegbare Strecke.
+				nDiff -= aFrmRect.Left();//nDiff ist die verfügbare Strecke.
 				nDiff = aFrmRect.Width() - nDiff;
 				aFrmRect.Width( aFrmRect.Width() - nDiff );
 				bWidthClipped = sal_True;
 			}
 
-            // OD 06.08.2003 #i17297#, #111066#, #111070# - no proportional
-            // scaling of graphics in environments, which determines its size
-            // by its content ('auto' size). Otherwise layout loops can occur and
-            // layout sizes of the environment can be incorrect.
-            // Such environment are:
-            // (1) header and footer frames with 'auto' size
-            // (2) table row frames with 'auto' size
-            // (3) fly frames with 'auto' size
-			// Note: section frames seems to be not critical - didn't found
-            //       any critical layout situation so far.
-            if ( Lower() && Lower()->IsNoTxtFrm() &&
-                 ( static_cast<SwCntntFrm*>(Lower())->GetNode()->GetOLENode() ||
-                   !HasEnvironmentAutoSize() ) )
+			// OD 06.08.2003 #i17297#, #111066#, #111070# - no proportional
+			// scaling of graphics in environments, which determines its size
+			// by its content ('auto' size). Otherwise layout loops can occur and
+			// layout sizes of the environment can be incorrect.
+			// Such environment are:
+			// (1) header and footer frames with 'auto' size
+			// (2) table row frames with 'auto' size
+			// (3) fly frames with 'auto' size
+			// Note: section frames seems to be not critical - didn't find
+			//       any critical layout situation so far.
+			if ( Lower() && Lower()->IsNoTxtFrm() &&
+				 ( static_cast<SwCntntFrm*>(Lower())->GetNode()->GetOLENode() ||
+				   !HasEnvironmentAutoSize() ) )
 			{
-				//Wenn Breite und Hoehe angepasst wurden, so ist die
-				//groessere Veraenderung massgeblich.
+				// Wenn Breite und Höhe angepasst wurden, so ist die
+				// grössere Veränderung massgeblich.
 				if ( aFrmRect.Width() != aOldSize.Width() &&
 					 aFrmRect.Height()!= aOldSize.Height() )
 				{
@@ -445,57 +432,57 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
 						aFrmRect.Width( aOldSize.Width() );
 				}
 
-				//Breite angepasst? - Hoehe dann proportional verkleinern
+				// Breite angepasst? - Höhe dann proportional verkleinern
 				if( aFrmRect.Width() != aOldSize.Width() )
-                {
+				{
 					aFrmRect.Height( aFrmRect.Width() * aOldSize.Height() /
 									 aOldSize.Width() );
-                    bHeightClipped = sal_True;
-                }
-				//Hoehe angepasst? - Breite dann proportional verkleinern
-                else if( aFrmRect.Height() != aOldSize.Height() )
-                {
+					bHeightClipped = sal_True;
+				}
+				// Höhe angepasst? - Breite dann proportional verkleinern
+				else if( aFrmRect.Height() != aOldSize.Height() )
+				{
 					aFrmRect.Width( aFrmRect.Height() * aOldSize.Width() /
 									aOldSize.Height() );
-                    bWidthClipped = sal_True;
-                }
-
-                // OD 07.08.2003 #i17297#, #111066#, #111070# - reactivate change
-                // of size attribute for fly frames containing an ole object.
-                // FME: 2004-05-19 Added the aFrmRect.HasArea() hack, because
-                // the environment of the ole object does not have to be valid
-                // at this moment, or even worse, it does not have to have a
-                // reasonable size. In this case we do not want to change to
-                // attributes permanently. Maybe one day somebody dares to remove
-                // this code.
-                if ( aFrmRect.HasArea() &&
-                     static_cast<SwCntntFrm*>(Lower())->GetNode()->GetOLENode() &&
-                     ( bWidthClipped || bHeightClipped ) )
-                {
-                    SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt();
-                    pFmt->LockModify();
-                    SwFmtFrmSize aFrmSize( rSz );
-                    aFrmSize.SetWidth( aFrmRect.Width() );
-                    aFrmSize.SetHeight( aFrmRect.Height() );
-                    pFmt->SetFmtAttr( aFrmSize );
-                    pFmt->UnlockModify();
-                }
+					bWidthClipped = sal_True;
+				}
+
+				// OD 07.08.2003 #i17297#, #111066#, #111070# - reactivate change
+				// of size attribute for fly frames containing an ole object.
+				// FME: 2004-05-19 Added the aFrmRect.HasArea() hack, because
+				// the environment of the ole object does not have to be valid
+				// at this moment, or even worse, it does not have to have a
+				// reasonable size. In this case we do not want to change to
+				// attributes permanently. Maybe one day somebody dares to remove
+				// this code.
+				if ( aFrmRect.HasArea() &&
+					 static_cast<SwCntntFrm*>(Lower())->GetNode()->GetOLENode() &&
+					 ( bWidthClipped || bHeightClipped ) )
+				{
+					SwFlyFrmFmt *pFmt = (SwFlyFrmFmt*)GetFmt();
+					pFmt->LockModify();
+					SwFmtFrmSize aFrmSize( rSz );
+					aFrmSize.SetWidth( aFrmRect.Width() );
+					aFrmSize.SetHeight( aFrmRect.Height() );
+					pFmt->SetFmtAttr( aFrmSize );
+					pFmt->UnlockModify();
+				}
 			}
 
-			//Jetzt die Einstellungen am Frm vornehmen, bei Spalten werden
-			//die neuen Werte in die Attribute eingetragen, weil es sonst
-			//ziemlich fiese Oszillationen gibt.
+			// Jetzt die Einstellungen am Frm vornehmen, bei Spalten werden
+			// die neuen Werte in die Attribute eingetragen, weil es sonst
+			// ziemlich fiese Oszillationen gibt.
 			const long nPrtHeightDiff = Frm().Height() - Prt().Height();
 			const long nPrtWidthDiff  = Frm().Width()  - Prt().Width();
 			Frm().Height( aFrmRect.Height() );
 			Frm().Width ( Max( long(MINLAY), aFrmRect.Width() ) );
 			if ( Lower() && Lower()->IsColumnFrm() )
 			{
-				ColLock();	//Grow/Shrink locken.
-                const Size aTmpOldSize( Prt().SSize() );
+				ColLock();	// Grow/Shrink locken.
+				const Size aTmpOldSize( Prt().SSize() );
 				Prt().Height( Frm().Height() - nPrtHeightDiff );
 				Prt().Width ( Frm().Width()  - nPrtWidthDiff );
-                ChgLowersProp( aTmpOldSize );
+				ChgLowersProp( aTmpOldSize );
 				SwFrm *pLow = Lower();
 				do
 				{	pLow->Calc();
@@ -516,32 +503,30 @@ void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz )
 		}
 	}
 
-    // --> OD 2004-10-14 #i26945#
-    ASSERT( Frm().Height() >= 0,
-            "<SwFlyFreeFrm::CheckClip(..)> - fly frame has negative height now." );
-    // <--
+	// --> OD 2004-10-14 #i26945#
+	ASSERT( Frm().Height() >= 0,
+			"<SwFlyFreeFrm::CheckClip(..)> - fly frame has negative height now." );
+	// <--
 }
 
 /** method to determine, if a <MakeAll()> on the Writer fly frame is possible
 
-    OD 2005-03-03 #i43771#
+	OD 2005-03-03 #i43771#
 
-    @author OD
+	@author OD
 */
 bool SwFlyFreeFrm::IsFormatPossible() const
 {
-    return SwFlyFrm::IsFormatPossible() &&
-           ( GetPageFrm() ||
-             ( GetAnchorFrm() && GetAnchorFrm()->IsInFly() ) );
+	return SwFlyFrm::IsFormatPossible() &&
+		   ( GetPageFrm() ||
+			 ( GetAnchorFrm() && GetAnchorFrm()->IsInFly() ) );
 }
 
 /*************************************************************************
-|*
 |*	SwFlyLayFrm::SwFlyLayFrm()
 |*
 |*	Ersterstellung		MA 25. Aug. 92
-|*	Letzte Aenderung	MA 09. Apr. 99
-|*
+|*	Letzte Änderung		MA 09. Apr. 99
 |*************************************************************************/
 
 SwFlyLayFrm::SwFlyLayFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) :
@@ -554,12 +539,10 @@ SwFlyLayFrm::SwFlyLayFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) :
 TYPEINIT1(SwFlyLayFrm,SwFlyFreeFrm);
 // <--
 /*************************************************************************
-|*
 |*	SwFlyLayFrm::Modify()
 |*
 |*	Ersterstellung		MA 08. Feb. 93
-|*	Letzte Aenderung	MA 28. Aug. 93
-|*
+|*	Letzte Änderung		MA 28. Aug. 93
 |*************************************************************************/
 
 void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
@@ -574,9 +557,9 @@ void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
 
 	else if( RES_ANCHOR == nWhich )
 	{
-		//Ankerwechsel, ich haenge mich selbst um.
-		//Es darf sich nicht um einen Wechsel des Ankertyps handeln,
-		//dies ist nur ueber die SwFEShell moeglich.
+		// Ankerwechsel, ich hänge mich selbst um.
+		// Es darf sich nicht um einen Wechsel des Ankertyps handeln,
+		// dies ist nur über die SwFEShell möglich.
 		pAnch = (SwFmtAnchor*)pNew;
 	}
 
@@ -584,31 +567,31 @@ void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
 	{
 		ASSERT( pAnch->GetAnchorId() ==
 				GetFmt()->GetAnchor().GetAnchorId(),
-				"8-) Unzulaessiger Wechsel des Ankertyps." );
+				"8-) Unzulässiger Wechsel des Ankertyps." );
 
-		//Abmelden, Seite besorgen, an den entsprechenden LayoutFrm
-		//haengen.
-        SwRect aOld( GetObjRectWithSpaces() );
-        // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
-        SwPageFrm *pOldPage = GetPageFrm();
-        AnchorFrm()->RemoveFly( this );
+		// Abmelden, Seite besorgen, an den entsprechenden LayoutFrm
+		// hängen.
+		SwRect aOld( GetObjRectWithSpaces() );
+		// --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
+		SwPageFrm *pOldPage = GetPageFrm();
+		AnchorFrm()->RemoveFly( this );
 
-        if ( FLY_AT_PAGE == pAnch->GetAnchorId() )
-        {
+		if ( FLY_AT_PAGE == pAnch->GetAnchorId() )
+		{
 			sal_uInt16 nPgNum = pAnch->GetPageNum();
 			SwRootFrm *pRoot = getRootFrm();
-            SwPageFrm *pTmpPage = (SwPageFrm*)pRoot->Lower();
-            for ( sal_uInt16 i = 1; (i <= nPgNum) && pTmpPage; ++i,
-                                pTmpPage = (SwPageFrm*)pTmpPage->GetNext() )
+			SwPageFrm *pTmpPage = (SwPageFrm*)pRoot->Lower();
+			for ( sal_uInt16 i = 1; (i <= nPgNum) && pTmpPage; ++i,
+								pTmpPage = (SwPageFrm*)pTmpPage->GetNext() )
 			{
 				if ( i == nPgNum )
-                {
-                    // --> OD 2005-06-09 #i50432# - adjust synopsis of <PlaceFly(..)>
-                    pTmpPage->PlaceFly( this, 0 );
-                    // <--
-                }
+				{
+					// --> OD 2005-06-09 #i50432# - adjust synopsis of <PlaceFly(..)>
+					pTmpPage->PlaceFly( this, 0 );
+					// <--
+				}
 			}
-            if( !pTmpPage )
+			if( !pTmpPage )
 			{
 				pRoot->SetAssertFlyPages();
 				pRoot->AssertFlyPages();
@@ -626,8 +609,8 @@ void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
 					pTmp->AppendFly( this );
 			}
 		}
-        // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
-        if ( pOldPage && pOldPage != GetPageFrm() )
+		// --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
+		if ( pOldPage && pOldPage != GetPageFrm() )
 			NotifyBackground( pOldPage, aOld, PREP_FLY_LEAVE );
 		SetCompletePaint();
 		InvalidateAll();
@@ -638,12 +621,10 @@ void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
 }
 
 /*************************************************************************
-|*
 |*	SwPageFrm::AppendFly()
 |*
 |*	Ersterstellung		MA 10. Oct. 92
-|*	Letzte Aenderung	MA 08. Jun. 96
-|*
+|*	Letzte Änderung		MA 08. Jun. 96
 |*************************************************************************/
 
 void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
@@ -654,9 +635,9 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
 				pNew->GetVirtDrawObj()->GetReferencedObj().GetOrdNumDirect() );
 
 	InvalidateSpelling();
-    InvalidateSmartTags();  // SMARTTAGS
+	InvalidateSmartTags();  // SMARTTAGS
 	InvalidateAutoCompleteWords();
-    InvalidateWordCount();
+	InvalidateWordCount();
 
 	if ( GetUpper() )
 	{
@@ -664,47 +645,47 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
 		((SwRootFrm*)GetUpper())->InvalidateBrowseWidth();
 	}
 
-    SdrObject* pObj = pNew->GetVirtDrawObj();
-    ASSERT( pNew->GetAnchorFrm(), "Fly without Anchor" );
-    SwFlyFrm* pFly = (SwFlyFrm*)pNew->GetAnchorFrm()->FindFlyFrm();
-    if ( pFly && pObj->GetOrdNum() < pFly->GetVirtDrawObj()->GetOrdNum() )
-    {
-        //#i119945# set pFly's OrdNum to _rNewObj's. So when pFly is removed by Undo, the original OrdNum will not be changed.
-        sal_uInt32 nNewNum = pObj->GetOrdNumDirect();
-        if ( pObj->GetPage() )
-            pObj->GetPage()->SetObjectOrdNum( pFly->GetVirtDrawObj()->GetOrdNumDirect(), nNewNum );
-        else
-            pFly->GetVirtDrawObj()->SetOrdNum( nNewNum );
-    }
+	SdrObject* pObj = pNew->GetVirtDrawObj();
+	ASSERT( pNew->GetAnchorFrm(), "Fly without Anchor" );
+	SwFlyFrm* pFly = (SwFlyFrm*)pNew->GetAnchorFrm()->FindFlyFrm();
+	if ( pFly && pObj->GetOrdNum() < pFly->GetVirtDrawObj()->GetOrdNum() )
+	{
+		//#i119945# set pFly's OrdNum to _rNewObj's. So when pFly is removed by Undo, the original OrdNum will not be changed.
+		sal_uInt32 nNewNum = pObj->GetOrdNumDirect();
+		if ( pObj->GetPage() )
+			pObj->GetPage()->SetObjectOrdNum( pFly->GetVirtDrawObj()->GetOrdNumDirect(), nNewNum );
+		else
+			pFly->GetVirtDrawObj()->SetOrdNum( nNewNum );
+	}
 
 	//Flys die im Cntnt sitzen beachten wir nicht weiter.
 	if ( pNew->IsFlyInCntFrm() )
 		InvalidateFlyInCnt();
-    else
-    {
-        InvalidateFlyCntnt();
+	else
+	{
+		InvalidateFlyCntnt();
 
-        if ( !pSortedObjs )
-            pSortedObjs = new SwSortedObjs();
+		if ( !pSortedObjs )
+			pSortedObjs = new SwSortedObjs();
 
 #if OSL_DEBUG_LEVEL > 1
-        const bool bSucessInserted =
+		const bool bSucessInserted =
 #endif
-        pSortedObjs->Insert( *pNew );
+		pSortedObjs->Insert( *pNew );
 #if OSL_DEBUG_LEVEL > 1
-        ASSERT( bSucessInserted, "Fly nicht in Sorted eingetragen." )
-        (void) bSucessInserted;
+		ASSERT( bSucessInserted, "Fly nicht in Sorted eingetragen." )
+		(void) bSucessInserted;
 #endif
 
-        // --> OD 2008-04-22 #i87493#
-        ASSERT( pNew->GetPageFrm() == 0 || pNew->GetPageFrm() == this,
-                "<SwPageFrm::AppendFlyToPage(..)> - anchored fly frame seems to be registered at another page frame. Serious defect -> please inform OD." );
-        // <--
-        // --> OD 2004-06-30 #i28701# - use new method <SetPageFrm(..)>
-        pNew->SetPageFrm( this );
-        pNew->InvalidatePage( this );
-        // OD 2004-05-17 #i28701#
-        pNew->UnlockPosition();
+		// --> OD 2008-04-22 #i87493#
+		ASSERT( pNew->GetPageFrm() == 0 || pNew->GetPageFrm() == this,
+				"<SwPageFrm::AppendFlyToPage(..)> - anchored fly frame seems to be registered at another page frame. Serious defect -> please inform OD." );
+		// <--
+		// --> OD 2004-06-30 #i28701# - use new method <SetPageFrm(..)>
+		pNew->SetPageFrm( this );
+		pNew->InvalidatePage( this );
+		// OD 2004-05-17 #i28701#
+		pNew->UnlockPosition();
 
 		// Notify accessible layout. That's required at this place for
 		// frames only where the anchor is moved. Creation of new frames
@@ -716,47 +697,45 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew )
 			static_cast< SwRootFrm * >( GetUpper() )->GetCurrShell()->Imp()
 									  ->AddAccessibleFrm( pNew );
 		}
-    }
-
-    // --> OD 2004-06-09 #i28701# - correction: consider also drawing objects
-    if ( pNew->GetDrawObjs() )
-    {
-        SwSortedObjs &rObjs = *pNew->GetDrawObjs();
-        for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
-        {
-            SwAnchoredObject* pTmpObj = rObjs[i];
-            if ( pTmpObj->ISA(SwFlyFrm) )
-            {
-                SwFlyFrm* pTmpFly = static_cast<SwFlyFrm*>(pTmpObj);
-                // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
-                if ( pTmpFly->IsFlyFreeFrm() && !pTmpFly->GetPageFrm() )
-                    AppendFlyToPage( pTmpFly );
-            }
-            else if ( pTmpObj->ISA(SwAnchoredDrawObject) )
-            {
-                // --> OD 2008-04-22 #i87493#
-//                AppendDrawObjToPage( *pTmpObj );
-                if ( pTmpObj->GetPageFrm() != this )
-                {
-                    if ( pTmpObj->GetPageFrm() != 0 )
-                    {
-                        pTmpObj->GetPageFrm()->RemoveDrawObjFromPage( *pTmpObj );
-                    }
-                    AppendDrawObjToPage( *pTmpObj );
-                }
-                // <--
-            }
-        }
-    }
+	}
+
+	// --> OD 2004-06-09 #i28701# - correction: consider also drawing objects
+	if ( pNew->GetDrawObjs() )
+	{
+		SwSortedObjs &rObjs = *pNew->GetDrawObjs();
+		for ( sal_uInt16 i = 0; i < rObjs.Count(); ++i )
+		{
+			SwAnchoredObject* pTmpObj = rObjs[i];
+			if ( pTmpObj->ISA(SwFlyFrm) )
+			{
+				SwFlyFrm* pTmpFly = static_cast<SwFlyFrm*>(pTmpObj);
+				// --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
+				if ( pTmpFly->IsFlyFreeFrm() && !pTmpFly->GetPageFrm() )
+					AppendFlyToPage( pTmpFly );
+			}
+			else if ( pTmpObj->ISA(SwAnchoredDrawObject) )
+			{
+				// --> OD 2008-04-22 #i87493#
+//				AppendDrawObjToPage( *pTmpObj );
+				if ( pTmpObj->GetPageFrm() != this )
+				{
+					if ( pTmpObj->GetPageFrm() != 0 )
+					{
+						pTmpObj->GetPageFrm()->RemoveDrawObjFromPage( *pTmpObj );
+					}
+					AppendDrawObjToPage( *pTmpObj );
+				}
+				// <--
+			}
+		}
+	}
 }
 
 /*************************************************************************
-|*
 |*	SwPageFrm::RemoveFly()
 |*
 |*	Ersterstellung		MA 10. Oct. 92
-|*	Letzte Aenderung	MA 26. Aug. 96
-|*
+|*	Letzte Änderung		MA 26. Aug. 96
 |*************************************************************************/
 
 void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove )
@@ -772,7 +751,7 @@ void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove )
 		((SwRootFrm*)GetUpper())->InvalidateBrowseWidth();
 	}
 
-	//Flys die im Cntnt sitzen beachten wir nicht weiter.
+	// Flys die im Cntnt sitzen beachten wir nicht weiter.
 	if ( pToRemove->IsFlyInCntFrm() )
 		return;
 
@@ -787,29 +766,27 @@ void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove )
 								  ->DisposeAccessibleFrm( pToRemove, sal_True );
 	}
 
-	//Collections noch nicht loeschen. Das passiert am Ende
-	//der Action im RemoveSuperfluous der Seite - angestossen von gleich-
-	//namiger Methode der Root.
-	//Die FlyColl kann bereits weg sein, weil der DTor der Seite
-	//gerade 'laeuft'
+	// Collections noch nicht löschen. Das passiert am Ende
+	// der Action im RemoveSuperfluous der Seite - angestossen von gleich-
+	// namiger Methode der Root.
+	// Die FlyColl kann bereits weg sein, weil der DTor der Seite
+	// gerade 'läuft'
 	if ( pSortedObjs )
 	{
-        pSortedObjs->Remove( *pToRemove );
+		pSortedObjs->Remove( *pToRemove );
 		if ( !pSortedObjs->Count() )
 		{	DELETEZ( pSortedObjs );
 		}
 	}
-    // --> OD 2004-06-30 #i28701# - use new method <SetPageFrm(..)>
-    pToRemove->SetPageFrm( 0L );
+	// --> OD 2004-06-30 #i28701# - use new method <SetPageFrm(..)>
+	pToRemove->SetPageFrm( 0L );
 }
 
 /*************************************************************************
-|*
 |*	SwPageFrm::MoveFly
 |*
 |*	Ersterstellung		MA 25. Jan. 97
-|*	Letzte Aenderung	MA 25. Jan. 97
-|*
+|*	Letzte Änderung		MA 25. Jan. 97
 |*************************************************************************/
 
 void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
@@ -823,11 +800,11 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
 	}
 
 	pDest->InvalidateSpelling();
-    pDest->InvalidateSmartTags();   // SMARTTAGS
+	pDest->InvalidateSmartTags();   // SMARTTAGS
 	pDest->InvalidateAutoCompleteWords();
-    pDest->InvalidateWordCount();
+	pDest->InvalidateWordCount();
 
-    if ( pToMove->IsFlyInCntFrm() )
+	if ( pToMove->IsFlyInCntFrm() )
 	{
 		pDest->InvalidateFlyInCnt();
 		return;
@@ -844,11 +821,11 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
 								  ->DisposeAccessibleFrm( pToMove, sal_True );
 	}
 
-	//Die FlyColl kann bereits weg sein, weil der DTor der Seite
-	//gerade 'laeuft'
+	// Die FlyColl kann bereits weg sein, weil der DTor der Seite
+	// gerade 'läuft'
 	if ( pSortedObjs )
 	{
-        pSortedObjs->Remove( *pToMove );
+		pSortedObjs->Remove( *pToMove );
 		if ( !pSortedObjs->Count() )
 		{	DELETEZ( pSortedObjs );
 		}
@@ -856,24 +833,24 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
 
 	//Anmelden
 	if ( !pDest->GetSortedObjs() )
-        pDest->pSortedObjs = new SwSortedObjs();
+		pDest->pSortedObjs = new SwSortedObjs();
 
 #if OSL_DEBUG_LEVEL > 1
-    const bool bSucessInserted =
+	const bool bSucessInserted =
 #endif
-    pDest->GetSortedObjs()->Insert( *pToMove );
+	pDest->GetSortedObjs()->Insert( *pToMove );
 #if OSL_DEBUG_LEVEL > 1
 	ASSERT( bSucessInserted, "Fly nicht in Sorted eingetragen." )
-    (void) bSucessInserted;
+	(void) bSucessInserted;
 #endif
 
-    // --> OD 2004-06-30 #i28701# - use new method <SetPageFrm(..)>
-    pToMove->SetPageFrm( pDest );
+	// --> OD 2004-06-30 #i28701# - use new method <SetPageFrm(..)>
+	pToMove->SetPageFrm( pDest );
 	pToMove->InvalidatePage( pDest );
 	pToMove->SetNotifyBack();
 	pDest->InvalidateFlyCntnt();
-    // OD 2004-05-17 #i28701#
-    pToMove->UnlockPosition();
+	// OD 2004-05-17 #i28701#
+	pToMove->UnlockPosition();
 
 	// Notify accessible layout. That's required at this place for
 	// frames only where the anchor is moved. Creation of new frames
@@ -886,168 +863,162 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest )
 								  ->AddAccessibleFrm( pToMove );
 	}
 
-    // --> OD 2004-06-09 #i28701# - correction: move lowers of Writer fly frame
-    if ( pToMove->GetDrawObjs() )
-    {
-        SwSortedObjs &rObjs = *pToMove->GetDrawObjs();
-        for ( sal_uInt32 i = 0; i < rObjs.Count(); ++i )
-        {
-            SwAnchoredObject* pObj = rObjs[i];
-            if ( pObj->ISA(SwFlyFrm) )
-            {
-                SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pObj);
-                if ( pFly->IsFlyFreeFrm() )
-                {
-                    // --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
-                    SwPageFrm* pPageFrm = pFly->GetPageFrm();
-                    if ( pPageFrm )
-                        pPageFrm->MoveFly( pFly, pDest );
-                    else
-                        pDest->AppendFlyToPage( pFly );
-                }
-            }
-            else if ( pObj->ISA(SwAnchoredDrawObject) )
-            {
-                RemoveDrawObjFromPage( *pObj );
-                pDest->AppendDrawObjToPage( *pObj );
-            }
-        }
-    }
+	// --> OD 2004-06-09 #i28701# - correction: move lowers of Writer fly frame
+	if ( pToMove->GetDrawObjs() )
+	{
+		SwSortedObjs &rObjs = *pToMove->GetDrawObjs();
+		for ( sal_uInt32 i = 0; i < rObjs.Count(); ++i )
+		{
+			SwAnchoredObject* pObj = rObjs[i];
+			if ( pObj->ISA(SwFlyFrm) )
+			{
+				SwFlyFrm* pFly = static_cast<SwFlyFrm*>(pObj);
+				if ( pFly->IsFlyFreeFrm() )
+				{
+					// --> OD 2004-06-30 #i28701# - use new method <GetPageFrm()>
+					SwPageFrm* pPageFrm = pFly->GetPageFrm();
+					if ( pPageFrm )
+						pPageFrm->MoveFly( pFly, pDest );
+					else
+						pDest->AppendFlyToPage( pFly );
+				}
+			}
+			else if ( pObj->ISA(SwAnchoredDrawObject) )
+			{
+				RemoveDrawObjFromPage( *pObj );
+				pDest->AppendDrawObjToPage( *pObj );
+			}
+		}
+	}
 }
 
 /*************************************************************************
-|*
 |*  SwPageFrm::AppendDrawObjToPage(), RemoveDrawObjFromPage()
 |*
 |*  --> OD 2004-07-02 #i28701# - new methods
-|*
 |*************************************************************************/
 void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj )
 {
-    if ( !_rNewObj.ISA(SwAnchoredDrawObject) )
-    {
-        ASSERT( false,
-                "SwPageFrm::AppendDrawObjToPage(..) - anchored object of unexcepted type -> object not appended" );
-        return;
-    }
-
-    if ( GetUpper() )
-    {
-        ((SwRootFrm*)GetUpper())->InvalidateBrowseWidth();
-    }
-
-    ASSERT( _rNewObj.GetAnchorFrm(), "anchored draw object without anchor" );
-    SwFlyFrm* pFlyFrm = (SwFlyFrm*)_rNewObj.GetAnchorFrm()->FindFlyFrm();
-    if ( pFlyFrm &&
-         _rNewObj.GetDrawObj()->GetOrdNum() < pFlyFrm->GetVirtDrawObj()->GetOrdNum() )
-    {
-        //#i119945# set pFly's OrdNum to _rNewObj's. So when pFly is removed by Undo, the original OrdNum will not be changed.
-        sal_uInt32 nNewNum = _rNewObj.GetDrawObj()->GetOrdNumDirect();
-        if ( _rNewObj.GetDrawObj()->GetPage() )
-            _rNewObj.DrawObj()->GetPage()->SetObjectOrdNum( pFlyFrm->GetVirtDrawObj()->GetOrdNumDirect(), nNewNum );
-        else
-            pFlyFrm->GetVirtDrawObj()->SetOrdNum( nNewNum );
-    }
-
-    if ( FLY_AS_CHAR == _rNewObj.GetFrmFmt().GetAnchor().GetAnchorId() )
-    {
-        return;
-    }
-
-    if ( !pSortedObjs )
-    {
-        pSortedObjs = new SwSortedObjs();
-    }
-    if ( !pSortedObjs->Insert( _rNewObj ) )
-    {
+	if ( !_rNewObj.ISA(SwAnchoredDrawObject) )
+	{
+		ASSERT( false,
+				"SwPageFrm::AppendDrawObjToPage(..) - anchored object of unexpected type -> object not appended" );
+		return;
+	}
+
+	if ( GetUpper() )
+	{
+		((SwRootFrm*)GetUpper())->InvalidateBrowseWidth();
+	}
+
+	ASSERT( _rNewObj.GetAnchorFrm(), "anchored draw object without anchor" );
+	SwFlyFrm* pFlyFrm = (SwFlyFrm*)_rNewObj.GetAnchorFrm()->FindFlyFrm();
+	if ( pFlyFrm &&
+		 _rNewObj.GetDrawObj()->GetOrdNum() < pFlyFrm->GetVirtDrawObj()->GetOrdNum() )
+	{
+		//#i119945# set pFly's OrdNum to _rNewObj's. So when pFly is removed by Undo, the original OrdNum will not be changed.
+		sal_uInt32 nNewNum = _rNewObj.GetDrawObj()->GetOrdNumDirect();
+		if ( _rNewObj.GetDrawObj()->GetPage() )
+			_rNewObj.DrawObj()->GetPage()->SetObjectOrdNum( pFlyFrm->GetVirtDrawObj()->GetOrdNumDirect(), nNewNum );
+		else
+			pFlyFrm->GetVirtDrawObj()->SetOrdNum( nNewNum );
+	}
+
+	if ( FLY_AS_CHAR == _rNewObj.GetFrmFmt().GetAnchor().GetAnchorId() )
+	{
+		return;
+	}
+
+	if ( !pSortedObjs )
+	{
+		pSortedObjs = new SwSortedObjs();
+	}
+	if ( !pSortedObjs->Insert( _rNewObj ) )
+	{
 #ifdef DBG_UTIL
-        ASSERT( pSortedObjs->Contains( _rNewObj ),
-                "Drawing object not appended into list <pSortedObjs>." );
+		ASSERT( pSortedObjs->Contains( _rNewObj ),
+				"Drawing object not appended into list <pSortedObjs>." );
 #endif
-    }
-    // --> OD 2008-04-22 #i87493#
-    ASSERT( _rNewObj.GetPageFrm() == 0 || _rNewObj.GetPageFrm() == this,
-            "<SwPageFrm::AppendDrawObjToPage(..)> - anchored draw object seems to be registered at another page frame. Serious defect -> please inform OD." );
-    // <--
-    _rNewObj.SetPageFrm( this );
-
-    // invalidate page in order to force a reformat of object layout of the page.
-    InvalidateFlyLayout();
+	}
+	// --> OD 2008-04-22 #i87493#
+	ASSERT( _rNewObj.GetPageFrm() == 0 || _rNewObj.GetPageFrm() == this,
+			"<SwPageFrm::AppendDrawObjToPage(..)> - anchored draw object seems to be registered at another page frame. Serious defect -> please inform OD." );
+	// <--
+	_rNewObj.SetPageFrm( this );
+
+	// invalidate page in order to force a reformat of object layout of the page.
+	InvalidateFlyLayout();
 }
 
 void SwPageFrm::RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj )
 {
-    if ( !_rToRemoveObj.ISA(SwAnchoredDrawObject) )
-    {
-        ASSERT( false,
-                "SwPageFrm::RemoveDrawObjFromPage(..) - anchored object of unexcepted type -> object not removed" );
-        return;
-    }
-
-    if ( pSortedObjs )
-    {
-        pSortedObjs->Remove( _rToRemoveObj );
-        if ( !pSortedObjs->Count() )
-        {
-            DELETEZ( pSortedObjs );
-        }
-        if ( GetUpper() )
-        {
-            if (FLY_AS_CHAR !=
-                    _rToRemoveObj.GetFrmFmt().GetAnchor().GetAnchorId())
-            {
-                ((SwRootFrm*)GetUpper())->SetSuperfluous();
-                InvalidatePage();
-            }
-            ((SwRootFrm*)GetUpper())->InvalidateBrowseWidth();
-        }
-    }
-    _rToRemoveObj.SetPageFrm( 0 );
+	if ( !_rToRemoveObj.ISA(SwAnchoredDrawObject) )
+	{
+		ASSERT( false,
+				"SwPageFrm::RemoveDrawObjFromPage(..) - anchored object of unexpected type -> object not removed" );
+		return;
+	}
+
+	if ( pSortedObjs )
+	{
+		pSortedObjs->Remove( _rToRemoveObj );
+		if ( !pSortedObjs->Count() )
+		{
+			DELETEZ( pSortedObjs );
+		}
+		if ( GetUpper() )
+		{
+			if (FLY_AS_CHAR !=
+					_rToRemoveObj.GetFrmFmt().GetAnchor().GetAnchorId())
+			{
+				((SwRootFrm*)GetUpper())->SetSuperfluous();
+				InvalidatePage();
+			}
+			((SwRootFrm*)GetUpper())->InvalidateBrowseWidth();
+		}
+	}
+	_rToRemoveObj.SetPageFrm( 0 );
 }
 
 /*************************************************************************
-|*
 |*	SwPageFrm::PlaceFly
 |*
 |*	Ersterstellung		MA 08. Feb. 93
-|*	Letzte Aenderung	MA 27. Feb. 93
-|*
+|*	Letzte Änderung		MA 27. Feb. 93
 |*************************************************************************/
 
 // --> OD 2005-06-09 #i50432# - adjust method description and synopsis.
 void SwPageFrm::PlaceFly( SwFlyFrm* pFly, SwFlyFrmFmt* pFmt )
 {
-    // --> OD 2005-06-09 #i50432# - consider the case that page is an empty page:
-    // In this case append the fly frame at the next page
-    ASSERT( !IsEmptyPage() || GetNext(),
-            "<SwPageFrm::PlaceFly(..)> - empty page with no next page! -> fly frame appended at empty page" );
-    if ( IsEmptyPage() && GetNext() )
-    {
-        static_cast<SwPageFrm*>(GetNext())->PlaceFly( pFly, pFmt );
-    }
-    else
-    {
-        //Wenn ein Fly uebergeben wurde, so benutzen wir diesen, ansonsten wird
-        //mit dem Format einer erzeugt.
-        if ( pFly )
-            AppendFly( pFly );
-        else
-        {   ASSERT( pFmt, ":-( kein Format fuer Fly uebergeben." );
-            pFly = new SwFlyLayFrm( (SwFlyFrmFmt*)pFmt, this, this );
-            AppendFly( pFly );
-            ::RegistFlys( this, pFly );
-        }
-    }
-    // <--
+	// --> OD 2005-06-09 #i50432# - consider the case that page is an empty page:
+	// In this case append the fly frame at the next page
+	ASSERT( !IsEmptyPage() || GetNext(),
+			"<SwPageFrm::PlaceFly(..)> - empty page with no next page! -> fly frame appended at empty page" );
+	if ( IsEmptyPage() && GetNext() )
+	{
+		static_cast<SwPageFrm*>(GetNext())->PlaceFly( pFly, pFmt );
+	}
+	else
+	{
+		// Wenn ein Fly übergeben wurde, so benutzen wir diesen, ansonsten wird
+		// mit dem Format einer erzeugt.
+		if ( pFly )
+			AppendFly( pFly );
+		else
+		{   ASSERT( pFmt, ":-( kein Format für Fly übergeben." );
+			pFly = new SwFlyLayFrm( (SwFlyFrmFmt*)pFmt, this, this );
+			AppendFly( pFly );
+			::RegistFlys( this, pFly );
+		}
+	}
+	// <--
 }
 
 /*************************************************************************
-|*
 |*	::CalcClipRect
 |*
 |*	Ersterstellung		AMA 24. Sep. 96
-|*	Letzte Aenderung	MA  18. Dec. 96
-|*
+|*	Letzte Änderung		MA  18. Dec. 96
 |*************************************************************************/
 // OD 22.09.2003 #i18732# - adjustments for following text flow or not
 // AND alignment at 'page areas' for to paragraph/to character anchored objects
@@ -1065,262 +1036,262 @@ sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
 	sal_Bool bRet = sal_True;
 	if ( pSdrObj->ISA(SwVirtFlyDrawObj) )
 	{
-        const SwFlyFrm* pFly = ((const SwVirtFlyDrawObj*)pSdrObj)->GetFlyFrm();
-        const bool bFollowTextFlow = pFly->GetFmt()->GetFollowTextFlow().GetValue();
-        // --> OD 2004-07-06 #i28701#
-        const bool bConsiderWrapOnObjPos =
-                                pFly->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION);
-        // <--
-        const SwFmtVertOrient &rV = pFly->GetFmt()->GetVertOrient();
-        if( pFly->IsFlyLayFrm() )
+		const SwFlyFrm* pFly = ((const SwVirtFlyDrawObj*)pSdrObj)->GetFlyFrm();
+		const bool bFollowTextFlow = pFly->GetFmt()->GetFollowTextFlow().GetValue();
+		// --> OD 2004-07-06 #i28701#
+		const bool bConsiderWrapOnObjPos =
+								pFly->GetFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION);
+		// <--
+		const SwFmtVertOrient &rV = pFly->GetFmt()->GetVertOrient();
+		if( pFly->IsFlyLayFrm() )
 		{
-            const SwFrm* pClip;
-            // OD 06.11.2003 #i22305#
-            // --> OD 2004-07-06 #i28701#
-            if ( !bFollowTextFlow || bConsiderWrapOnObjPos )
-            {
-                pClip = pFly->GetAnchorFrm()->FindPageFrm();
-            }
-            else
-            {
-                pClip = pFly->GetAnchorFrm();
-            }
+			const SwFrm* pClip;
+			// OD 06.11.2003 #i22305#
+			// --> OD 2004-07-06 #i28701#
+			if ( !bFollowTextFlow || bConsiderWrapOnObjPos )
+			{
+				pClip = pFly->GetAnchorFrm()->FindPageFrm();
+			}
+			else
+			{
+				pClip = pFly->GetAnchorFrm();
+			}
 
 			rRect = pClip->Frm();
-            SWRECTFN( pClip )
+			SWRECTFN( pClip )
 
-			//Vertikales clipping: Top und Bottom, ggf. an PrtArea
-            if( rV.GetVertOrient() != text::VertOrientation::NONE &&
-                rV.GetRelationOrient() == text::RelOrientation::PRINT_AREA )
+			// Vertikales clipping: Top und Bottom, ggf. an PrtArea
+			if( rV.GetVertOrient() != text::VertOrientation::NONE &&
+				rV.GetRelationOrient() == text::RelOrientation::PRINT_AREA )
 			{
-                (rRect.*fnRect->fnSetTop)( (pClip->*fnRect->fnGetPrtTop)() );
-                (rRect.*fnRect->fnSetBottom)( (pClip->*fnRect->fnGetPrtBottom)() );
+				(rRect.*fnRect->fnSetTop)( (pClip->*fnRect->fnGetPrtTop)() );
+				(rRect.*fnRect->fnSetBottom)( (pClip->*fnRect->fnGetPrtBottom)() );
 			}
-			//Horizontales clipping: Left und Right, ggf. an PrtArea
+			// Horizontales clipping: Left und Right, ggf. an PrtArea
 			const SwFmtHoriOrient &rH = pFly->GetFmt()->GetHoriOrient();
-            if( rH.GetHoriOrient() != text::HoriOrientation::NONE &&
-                rH.GetRelationOrient() == text::RelOrientation::PRINT_AREA )
+			if( rH.GetHoriOrient() != text::HoriOrientation::NONE &&
+				rH.GetRelationOrient() == text::RelOrientation::PRINT_AREA )
 			{
-                (rRect.*fnRect->fnSetLeft)( (pClip->*fnRect->fnGetPrtLeft)() );
-                (rRect.*fnRect->fnSetRight)((pClip->*fnRect->fnGetPrtRight)());
+				(rRect.*fnRect->fnSetLeft)( (pClip->*fnRect->fnGetPrtLeft)() );
+				(rRect.*fnRect->fnSetRight)((pClip->*fnRect->fnGetPrtRight)());
 			}
 		}
 		else if( pFly->IsFlyAtCntFrm() )
 		{
-            // OD 22.09.2003 #i18732# - consider following text flow or not
-            // AND alignment at 'page areas'
-            const SwFrm* pVertPosOrientFrm = pFly->GetVertPosOrientFrm();
-            if ( !pVertPosOrientFrm )
-            {
-                ASSERT( false,
-                        "::CalcClipRect(..) - frame, vertical position is oriented at, is missing .");
-                pVertPosOrientFrm = pFly->GetAnchorFrm();
-            }
-
-            if ( !bFollowTextFlow || bConsiderWrapOnObjPos )
-            {
-                const SwLayoutFrm* pClipFrm = pVertPosOrientFrm->FindPageFrm();
-                rRect = bMove ? pClipFrm->GetUpper()->Frm()
-                              : pClipFrm->Frm();
-                // --> OD 2004-10-14 #i26945# - consider that a table, during
-                // its format, can exceed its upper printing area bottom.
-                // Thus, enlarge the clip rectangle, if such a case occurred
-                if ( pFly->GetAnchorFrm()->IsInTab() )
-                {
-                    const SwTabFrm* pTabFrm = const_cast<SwFlyFrm*>(pFly)
-                                ->GetAnchorFrmContainingAnchPos()->FindTabFrm();
-                    SwRect aTmp( pTabFrm->Prt() );
-                    aTmp += pTabFrm->Frm().Pos();
-                    rRect.Union( aTmp );
-                    // --> OD 2005-03-30 #i43913# - consider also the cell frame
-                    const SwFrm* pCellFrm = const_cast<SwFlyFrm*>(pFly)
-                                ->GetAnchorFrmContainingAnchPos()->GetUpper();
-                    while ( pCellFrm && !pCellFrm->IsCellFrm() )
-                    {
-                        pCellFrm = pCellFrm->GetUpper();
-                    }
-                    if ( pCellFrm )
-                    {
-                        aTmp = pCellFrm->Prt();
-                        aTmp += pCellFrm->Frm().Pos();
-                        rRect.Union( aTmp );
-                    }
-                    // <--
-                }
-            }
-            else if ( rV.GetRelationOrient() == text::RelOrientation::PAGE_FRAME ||
-                      rV.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA )
-            {
-                // OD 29.10.2003 #113049# - new class <SwEnvironmentOfAnchoredObject>
-                objectpositioning::SwEnvironmentOfAnchoredObject
-                                                aEnvOfObj( bFollowTextFlow );
-                const SwLayoutFrm& rVertClipFrm =
-                    aEnvOfObj.GetVertEnvironmentLayoutFrm( *pVertPosOrientFrm );
-                if ( rV.GetRelationOrient() == text::RelOrientation::PAGE_FRAME )
-                {
-                    rRect = rVertClipFrm.Frm();
-                }
-                else if ( rV.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA )
-                {
-                    if ( rVertClipFrm.IsPageFrm() )
-                    {
-                        rRect = static_cast<const SwPageFrm&>(rVertClipFrm).PrtWithoutHeaderAndFooter();
-                    }
-                    else
-                    {
-                        rRect = rVertClipFrm.Frm();
-                    }
-                }
-                const SwLayoutFrm* pHoriClipFrm =
-                        pFly->GetAnchorFrm()->FindPageFrm()->GetUpper();
-                SWRECTFN( pFly->GetAnchorFrm() )
-                (rRect.*fnRect->fnSetLeft)( (pHoriClipFrm->Frm().*fnRect->fnGetLeft)() );
-                (rRect.*fnRect->fnSetRight)((pHoriClipFrm->Frm().*fnRect->fnGetRight)());
-            }
-            else
-            {
-                // --> OD 2004-10-11 #i26945#
-                const SwFrm *pClip =
-                        const_cast<SwFlyFrm*>(pFly)->GetAnchorFrmContainingAnchPos();
-                // <--
-                SWRECTFN( pClip )
-                const SwLayoutFrm *pUp = pClip->GetUpper();
-                const SwFrm *pCell = pUp->IsCellFrm() ? pUp : 0;
-                sal_uInt16 nType = bMove ? FRM_ROOT   | FRM_FLY | FRM_HEADER |
-                                       FRM_FOOTER | FRM_FTN
-                                     : FRM_BODY   | FRM_FLY | FRM_HEADER |
-                                       FRM_FOOTER | FRM_CELL| FRM_FTN;
-
-                while ( !(pUp->GetType() & nType) || pUp->IsColBodyFrm() )
-                {
-                    pUp = pUp->GetUpper();
-                    if ( !pCell && pUp->IsCellFrm() )
-                        pCell = pUp;
-                }
-                if ( bMove )
-                {
-                    if ( pUp->IsRootFrm() )
-                    {
-                        rRect  = pUp->Prt();
-                        rRect += pUp->Frm().Pos();
-                        pUp = 0;
-                    }
-                }
-                if ( pUp )
-                {
-                    if ( pUp->GetType() & FRM_BODY )
-                    {
-                        const SwPageFrm *pPg;
-                        if ( pUp->GetUpper() != (pPg = pFly->FindPageFrm()) )
-                            pUp = pPg->FindBodyCont();
-                        rRect = pUp->GetUpper()->Frm();
-                        (rRect.*fnRect->fnSetTop)( (pUp->*fnRect->fnGetPrtTop)() );
-                        (rRect.*fnRect->fnSetBottom)((pUp->*fnRect->fnGetPrtBottom)());
-                    }
-                    else
-                    {
-                        if( ( pUp->GetType() & (FRM_FLY | FRM_FTN ) ) &&
-                            !pUp->Frm().IsInside( pFly->Frm().Pos() ) )
-                        {
-                            if( pUp->IsFlyFrm() )
-                            {
-                                SwFlyFrm *pTmpFly = (SwFlyFrm*)pUp;
-                                while( pTmpFly->GetNextLink() )
-                                {
-                                    pTmpFly = pTmpFly->GetNextLink();
-                                    if( pTmpFly->Frm().IsInside( pFly->Frm().Pos() ) )
-                                        break;
-                                }
-                                pUp = pTmpFly;
-                            }
-                            else if( pUp->IsInFtn() )
-                            {
-                                const SwFtnFrm *pTmp = pUp->FindFtnFrm();
-                                while( pTmp->GetFollow() )
-                                {
-                                    pTmp = pTmp->GetFollow();
-                                    if( pTmp->Frm().IsInside( pFly->Frm().Pos() ) )
-                                        break;
-                                }
-                                pUp = pTmp;
-                            }
-                        }
-                        rRect = pUp->Prt();
-                        rRect.Pos() += pUp->Frm().Pos();
-                        if ( pUp->GetType() & (FRM_HEADER | FRM_FOOTER) )
-                        {
-                            rRect.Left ( pUp->GetUpper()->Frm().Left() );
-                            rRect.Width( pUp->GetUpper()->Frm().Width());
-                        }
-                        else if ( pUp->IsCellFrm() )                //MA_FLY_HEIGHT
-                        {
-                            const SwFrm *pTab = pUp->FindTabFrm();
-                            (rRect.*fnRect->fnSetBottom)(
-                                        (pTab->GetUpper()->*fnRect->fnGetPrtBottom)() );
-                            // OD 08.08.2003 #110978# - expand to left and right
-                            // cell border
-                            rRect.Left ( pUp->Frm().Left() );
-                            rRect.Width( pUp->Frm().Width() );
-                        }
-                    }
-                }
-                if ( pCell )
-                {
-                    //CellFrms koennen auch in 'unerlaubten' Bereichen stehen, dann
-                    //darf der Fly das auch.
-                    SwRect aTmp( pCell->Prt() );
-                    aTmp += pCell->Frm().Pos();
-                    rRect.Union( aTmp );
-                }
-            }
+			// OD 22.09.2003 #i18732# - consider following text flow or not
+			// AND alignment at 'page areas'
+			const SwFrm* pVertPosOrientFrm = pFly->GetVertPosOrientFrm();
+			if ( !pVertPosOrientFrm )
+			{
+				ASSERT( false,
+						"::CalcClipRect(..) - frame, vertical position is oriented at, is missing .");
+				pVertPosOrientFrm = pFly->GetAnchorFrm();
+			}
+
+			if ( !bFollowTextFlow || bConsiderWrapOnObjPos )
+			{
+				const SwLayoutFrm* pClipFrm = pVertPosOrientFrm->FindPageFrm();
+				rRect = bMove ? pClipFrm->GetUpper()->Frm()
+							  : pClipFrm->Frm();
+				// --> OD 2004-10-14 #i26945# - consider that a table, during
+				// its format, can exceed its upper printing area bottom.
+				// Thus, enlarge the clip rectangle, if such a case occurred
+				if ( pFly->GetAnchorFrm()->IsInTab() )
+				{
+					const SwTabFrm* pTabFrm = const_cast<SwFlyFrm*>(pFly)
+								->GetAnchorFrmContainingAnchPos()->FindTabFrm();
+					SwRect aTmp( pTabFrm->Prt() );
+					aTmp += pTabFrm->Frm().Pos();
+					rRect.Union( aTmp );
+					// --> OD 2005-03-30 #i43913# - consider also the cell frame
+					const SwFrm* pCellFrm = const_cast<SwFlyFrm*>(pFly)
+								->GetAnchorFrmContainingAnchPos()->GetUpper();
+					while ( pCellFrm && !pCellFrm->IsCellFrm() )
+					{
+						pCellFrm = pCellFrm->GetUpper();
+					}
+					if ( pCellFrm )
+					{
+						aTmp = pCellFrm->Prt();
+						aTmp += pCellFrm->Frm().Pos();
+						rRect.Union( aTmp );
+					}
+					// <--
+				}
+			}
+			else if ( rV.GetRelationOrient() == text::RelOrientation::PAGE_FRAME ||
+					  rV.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA )
+			{
+				// OD 29.10.2003 #113049# - new class <SwEnvironmentOfAnchoredObject>
+				objectpositioning::SwEnvironmentOfAnchoredObject
+												aEnvOfObj( bFollowTextFlow );
+				const SwLayoutFrm& rVertClipFrm =
+					aEnvOfObj.GetVertEnvironmentLayoutFrm( *pVertPosOrientFrm );
+				if ( rV.GetRelationOrient() == text::RelOrientation::PAGE_FRAME )
+				{
+					rRect = rVertClipFrm.Frm();
+				}
+				else if ( rV.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA )
+				{
+					if ( rVertClipFrm.IsPageFrm() )
+					{
+						rRect = static_cast<const SwPageFrm&>(rVertClipFrm).PrtWithoutHeaderAndFooter();
+					}
+					else
+					{
+						rRect = rVertClipFrm.Frm();
+					}
+				}
+				const SwLayoutFrm* pHoriClipFrm =
+						pFly->GetAnchorFrm()->FindPageFrm()->GetUpper();
+				SWRECTFN( pFly->GetAnchorFrm() )
+				(rRect.*fnRect->fnSetLeft)( (pHoriClipFrm->Frm().*fnRect->fnGetLeft)() );
+				(rRect.*fnRect->fnSetRight)((pHoriClipFrm->Frm().*fnRect->fnGetRight)());
+			}
+			else
+			{
+				// --> OD 2004-10-11 #i26945#
+				const SwFrm *pClip =
+						const_cast<SwFlyFrm*>(pFly)->GetAnchorFrmContainingAnchPos();
+				// <--
+				SWRECTFN( pClip )
+				const SwLayoutFrm *pUp = pClip->GetUpper();
+				const SwFrm *pCell = pUp->IsCellFrm() ? pUp : 0;
+				sal_uInt16 nType = bMove ? FRM_ROOT   | FRM_FLY | FRM_HEADER |
+									   FRM_FOOTER | FRM_FTN
+									 : FRM_BODY   | FRM_FLY | FRM_HEADER |
+									   FRM_FOOTER | FRM_CELL| FRM_FTN;
+
+				while ( !(pUp->GetType() & nType) || pUp->IsColBodyFrm() )
+				{
+					pUp = pUp->GetUpper();
+					if ( !pCell && pUp->IsCellFrm() )
+						pCell = pUp;
+				}
+				if ( bMove )
+				{
+					if ( pUp->IsRootFrm() )
+					{
+						rRect  = pUp->Prt();
+						rRect += pUp->Frm().Pos();
+						pUp = 0;
+					}
+				}
+				if ( pUp )
+				{
+					if ( pUp->GetType() & FRM_BODY )
+					{
+						const SwPageFrm *pPg;
+						if ( pUp->GetUpper() != (pPg = pFly->FindPageFrm()) )
+							pUp = pPg->FindBodyCont();
+						rRect = pUp->GetUpper()->Frm();
+						(rRect.*fnRect->fnSetTop)( (pUp->*fnRect->fnGetPrtTop)() );
+						(rRect.*fnRect->fnSetBottom)((pUp->*fnRect->fnGetPrtBottom)());
+					}
+					else
+					{
+						if( ( pUp->GetType() & (FRM_FLY | FRM_FTN ) ) &&
+							!pUp->Frm().IsInside( pFly->Frm().Pos() ) )
+						{
+							if( pUp->IsFlyFrm() )
+							{
+								SwFlyFrm *pTmpFly = (SwFlyFrm*)pUp;
+								while( pTmpFly->GetNextLink() )
+								{
+									pTmpFly = pTmpFly->GetNextLink();
+									if( pTmpFly->Frm().IsInside( pFly->Frm().Pos() ) )
+										break;
+								}
+								pUp = pTmpFly;
+							}
+							else if( pUp->IsInFtn() )
+							{
+								const SwFtnFrm *pTmp = pUp->FindFtnFrm();
+								while( pTmp->GetFollow() )
+								{
+									pTmp = pTmp->GetFollow();
+									if( pTmp->Frm().IsInside( pFly->Frm().Pos() ) )
+										break;
+								}
+								pUp = pTmp;
+							}
+						}
+						rRect = pUp->Prt();
+						rRect.Pos() += pUp->Frm().Pos();
+						if ( pUp->GetType() & (FRM_HEADER | FRM_FOOTER) )
+						{
+							rRect.Left ( pUp->GetUpper()->Frm().Left() );
+							rRect.Width( pUp->GetUpper()->Frm().Width());
+						}
+						else if ( pUp->IsCellFrm() ) // MA_FLY_HEIGHT
+						{
+							const SwFrm *pTab = pUp->FindTabFrm();
+							(rRect.*fnRect->fnSetBottom)(
+										(pTab->GetUpper()->*fnRect->fnGetPrtBottom)() );
+							// OD 08.08.2003 #110978# - expand to left and right
+							// cell border
+							rRect.Left ( pUp->Frm().Left() );
+							rRect.Width( pUp->Frm().Width() );
+						}
+					}
+				}
+				if ( pCell )
+				{
+					// CellFrms können auch in 'unerlaubten' Bereichen stehen, dann
+					// darf der Fly das auch.
+					SwRect aTmp( pCell->Prt() );
+					aTmp += pCell->Frm().Pos();
+					rRect.Union( aTmp );
+				}
+			}
 		}
 		else
 		{
-            const SwFrm *pUp = pFly->GetAnchorFrm()->GetUpper();
-            SWRECTFN( pFly->GetAnchorFrm() )
-            while( pUp->IsColumnFrm() || pUp->IsSctFrm() || pUp->IsColBodyFrm())
-                pUp = pUp->GetUpper();
-            rRect = pUp->Frm();
-            if( !pUp->IsBodyFrm() )
-            {
-                rRect += pUp->Prt().Pos();
-                rRect.SSize( pUp->Prt().SSize() );
-                if ( pUp->IsCellFrm() )
-                {
-                    const SwFrm *pTab = pUp->FindTabFrm();
-                    (rRect.*fnRect->fnSetBottom)(
-                                    (pTab->GetUpper()->*fnRect->fnGetPrtBottom)() );
-                }
-            }
-            else if ( pUp->GetUpper()->IsPageFrm() )
-            {
-                // #111909# Objects anchored as character may exceed right margin
-                // of body frame:
-                (rRect.*fnRect->fnSetRight)( (pUp->GetUpper()->Frm().*fnRect->fnGetRight)() );
-            }
-            long nHeight = (9*(rRect.*fnRect->fnGetHeight)())/10;
-            long nTop;
-            const SwFmt *pFmt = ((SwContact*)GetUserCall(pSdrObj))->GetFmt();
-            const SvxULSpaceItem &rUL = pFmt->GetULSpace();
-            if( bMove )
-            {
-                nTop = bVert ? ((SwFlyInCntFrm*)pFly)->GetRefPoint().X() :
-                               ((SwFlyInCntFrm*)pFly)->GetRefPoint().Y();
-                nTop = (*fnRect->fnYInc)( nTop, -nHeight );
-                long nWidth = (pFly->Frm().*fnRect->fnGetWidth)();
-                (rRect.*fnRect->fnSetLeftAndWidth)( bVert ?
-                            ((SwFlyInCntFrm*)pFly)->GetRefPoint().Y() :
-                            ((SwFlyInCntFrm*)pFly)->GetRefPoint().X(), nWidth );
-                nHeight = 2*nHeight - rUL.GetLower() - rUL.GetUpper();
+			const SwFrm *pUp = pFly->GetAnchorFrm()->GetUpper();
+			SWRECTFN( pFly->GetAnchorFrm() )
+			while( pUp->IsColumnFrm() || pUp->IsSctFrm() || pUp->IsColBodyFrm())
+				pUp = pUp->GetUpper();
+			rRect = pUp->Frm();
+			if( !pUp->IsBodyFrm() )
+			{
+				rRect += pUp->Prt().Pos();
+				rRect.SSize( pUp->Prt().SSize() );
+				if ( pUp->IsCellFrm() )
+				{
+					const SwFrm *pTab = pUp->FindTabFrm();
+					(rRect.*fnRect->fnSetBottom)(
+									(pTab->GetUpper()->*fnRect->fnGetPrtBottom)() );
+				}
+			}
+			else if ( pUp->GetUpper()->IsPageFrm() )
+			{
+				// #111909# Objects anchored as character may exceed right margin
+				// of body frame:
+				(rRect.*fnRect->fnSetRight)( (pUp->GetUpper()->Frm().*fnRect->fnGetRight)() );
+			}
+			long nHeight = (9*(rRect.*fnRect->fnGetHeight)())/10;
+			long nTop;
+			const SwFmt *pFmt = ((SwContact*)GetUserCall(pSdrObj))->GetFmt();
+			const SvxULSpaceItem &rUL = pFmt->GetULSpace();
+			if( bMove )
+			{
+				nTop = bVert ? ((SwFlyInCntFrm*)pFly)->GetRefPoint().X() :
+							   ((SwFlyInCntFrm*)pFly)->GetRefPoint().Y();
+				nTop = (*fnRect->fnYInc)( nTop, -nHeight );
+				long nWidth = (pFly->Frm().*fnRect->fnGetWidth)();
+				(rRect.*fnRect->fnSetLeftAndWidth)( bVert ?
+							((SwFlyInCntFrm*)pFly)->GetRefPoint().Y() :
+							((SwFlyInCntFrm*)pFly)->GetRefPoint().X(), nWidth );
+				nHeight = 2*nHeight - rUL.GetLower() - rUL.GetUpper();
 			}
-            else
-            {
-                nTop = (*fnRect->fnYInc)( (pFly->Frm().*fnRect->fnGetBottom)(),
-                                           rUL.GetLower() - nHeight );
-                nHeight = 2*nHeight - (pFly->Frm().*fnRect->fnGetHeight)()
-                          - rUL.GetLower() - rUL.GetUpper();
-            }
-            (rRect.*fnRect->fnSetTopAndHeight)( nTop, nHeight );
+			else
+			{
+				nTop = (*fnRect->fnYInc)( (pFly->Frm().*fnRect->fnGetBottom)(),
+										   rUL.GetLower() - nHeight );
+				nHeight = 2*nHeight - (pFly->Frm().*fnRect->fnGetHeight)()
+						  - rUL.GetLower() - rUL.GetUpper();
+			}
+			(rRect.*fnRect->fnSetTopAndHeight)( nTop, nHeight );
 		}
 	}
 	else
@@ -1328,62 +1299,64 @@ sal_Bool CalcClipRect( const SdrObject *pSdrObj, SwRect &rRect, sal_Bool bMove )
 		const SwDrawContact *pC = (const SwDrawContact*)GetUserCall(pSdrObj);
 		const SwFrmFmt  *pFmt = (const SwFrmFmt*)pC->GetFmt();
 		const SwFmtAnchor &rAnch = pFmt->GetAnchor();
-        if ( FLY_AS_CHAR == rAnch.GetAnchorId() )
-        {
-            const SwFrm* pAnchorFrm = pC->GetAnchorFrm( pSdrObj );
-            if( !pAnchorFrm )
-            {
-                ASSERT( false, "<::CalcClipRect(..)> - missing anchor frame." );
-                ((SwDrawContact*)pC)->ConnectToLayout();
-                pAnchorFrm = pC->GetAnchorFrm();
-            }
-            const SwFrm* pUp = pAnchorFrm->GetUpper();
-            rRect = pUp->Prt();
-            rRect += pUp->Frm().Pos();
-            SWRECTFN( pAnchorFrm )
-            long nHeight = (9*(rRect.*fnRect->fnGetHeight)())/10;
-            long nTop;
-            const SvxULSpaceItem &rUL = pFmt->GetULSpace();
-            SwRect aSnapRect( pSdrObj->GetSnapRect() );
-            long nTmpH = 0;
-            if( bMove )
-            {
-                nTop = (*fnRect->fnYInc)( bVert ? pSdrObj->GetAnchorPos().X() :
-                                       pSdrObj->GetAnchorPos().Y(), -nHeight );
-                long nWidth = (aSnapRect.*fnRect->fnGetWidth)();
-                (rRect.*fnRect->fnSetLeftAndWidth)( bVert ?
-                            pSdrObj->GetAnchorPos().Y() :
-                            pSdrObj->GetAnchorPos().X(), nWidth );
+		if ( FLY_AS_CHAR == rAnch.GetAnchorId() )
+		{
+			const SwFrm* pAnchorFrm = pC->GetAnchorFrm( pSdrObj );
+			if( !pAnchorFrm )
+			{
+				ASSERT( false, "<::CalcClipRect(..)> - missing anchor frame." );
+				((SwDrawContact*)pC)->ConnectToLayout();
+				pAnchorFrm = pC->GetAnchorFrm();
 			}
-            else
-            {
-                // OD 2004-04-13 #i26791# - value of <nTmpH> is needed to
-                // calculate value of <nTop>.
-                nTmpH = bVert ? pSdrObj->GetCurrentBoundRect().GetWidth() :
-                                pSdrObj->GetCurrentBoundRect().GetHeight();
-                nTop = (*fnRect->fnYInc)( (aSnapRect.*fnRect->fnGetTop)(),
-                                          rUL.GetLower() + nTmpH - nHeight );
-            }
-            nHeight = 2*nHeight - nTmpH - rUL.GetLower() - rUL.GetUpper();
-            (rRect.*fnRect->fnSetTopAndHeight)( nTop, nHeight );
+			const SwFrm* pUp = pAnchorFrm->GetUpper();
+			rRect = pUp->Prt();
+			rRect += pUp->Frm().Pos();
+			SWRECTFN( pAnchorFrm )
+			long nHeight = (9*(rRect.*fnRect->fnGetHeight)())/10;
+			long nTop;
+			const SvxULSpaceItem &rUL = pFmt->GetULSpace();
+			SwRect aSnapRect( pSdrObj->GetSnapRect() );
+			long nTmpH = 0;
+			if( bMove )
+			{
+				nTop = (*fnRect->fnYInc)( bVert ? pSdrObj->GetAnchorPos().X() :
+									   pSdrObj->GetAnchorPos().Y(), -nHeight );
+				long nWidth = (aSnapRect.*fnRect->fnGetWidth)();
+				(rRect.*fnRect->fnSetLeftAndWidth)( bVert ?
+							pSdrObj->GetAnchorPos().Y() :
+							pSdrObj->GetAnchorPos().X(), nWidth );
+			}
+			else
+			{
+				// OD 2004-04-13 #i26791# - value of <nTmpH> is needed to
+				// calculate value of <nTop>.
+				nTmpH = bVert ? pSdrObj->GetCurrentBoundRect().GetWidth() :
+								pSdrObj->GetCurrentBoundRect().GetHeight();
+				nTop = (*fnRect->fnYInc)( (aSnapRect.*fnRect->fnGetTop)(),
+										  rUL.GetLower() + nTmpH - nHeight );
+			}
+			nHeight = 2*nHeight - nTmpH - rUL.GetLower() - rUL.GetUpper();
+			(rRect.*fnRect->fnSetTopAndHeight)( nTop, nHeight );
 		}
 		else
-        {
-            // OD 23.06.2003 #108784# - restrict clip rectangle for drawing
-            // objects in header/footer to the page frame.
-            // OD 2004-03-29 #i26791#
-            const SwFrm* pAnchorFrm = pC->GetAnchorFrm( pSdrObj );
-            if ( pAnchorFrm && pAnchorFrm->FindFooterOrHeader() )
-            {
-                // clip frame is the page frame the header/footer is on.
-                const SwFrm* pClipFrm = pAnchorFrm->FindPageFrm();
-                rRect = pClipFrm->Frm();
-            }
-            else
-            {
-                bRet = sal_False;
-            }
-        }
+		{
+			// OD 23.06.2003 #108784# - restrict clip rectangle for drawing
+			// objects in header/footer to the page frame.
+			// OD 2004-03-29 #i26791#
+			const SwFrm* pAnchorFrm = pC->GetAnchorFrm( pSdrObj );
+			if ( pAnchorFrm && pAnchorFrm->FindFooterOrHeader() )
+			{
+				// clip frame is the page frame the header/footer is on.
+				const SwFrm* pClipFrm = pAnchorFrm->FindPageFrm();
+				rRect = pClipFrm->Frm();
+			}
+			else
+			{
+				bRet = sal_False;
+			}
+		}
 	}
 	return bRet;
 }
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/vcl/os2/source/app/makefile.mk b/main/vcl/os2/source/app/makefile.mk
index 10e911e9c3..1ed9f63940 100644
--- a/main/vcl/os2/source/app/makefile.mk
+++ b/main/vcl/os2/source/app/makefile.mk
@@ -19,8 +19,6 @@
 #
 #**************************************************************
 
-
-
 PRJ=..$/..$/..
 
 PRJNAME=SV
@@ -28,11 +26,10 @@ TARGET=salapp
 
 # --- Settings -----------------------------------------------------
 
-#.INCLUDE :  svpre.mk
-.INCLUDE :  settings.mk
-#.INCLUDE :  sv.mk
-.INCLUDE :  $(PRJ)$/util$/makefile2.pmk
-
+#.INCLUDE : svpre.mk
+.INCLUDE : settings.mk
+#.INCLUDE : sv.mk
+.INCLUDE : $(PRJ)$/util$/makefile2.pmk
 
 # --- Files --------------------------------------------------------
 
@@ -52,4 +49,6 @@ SLOFILES=	$(SLO)$/salshl.obj	\
 
 # --- Targets ------------------------------------------------------
 
-.INCLUDE :  target.mk
+.INCLUDE : target.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/main/vcl/os2/source/window/makefile.mk b/main/vcl/os2/source/window/makefile.mk
index 07d4eb3eb9..5a9c133c20 100644
--- a/main/vcl/os2/source/window/makefile.mk
+++ b/main/vcl/os2/source/window/makefile.mk
@@ -19,8 +19,6 @@
 #
 #**************************************************************
 
-
-
 PRJ=..$/..$/..
 
 PRJNAME=SV
@@ -28,11 +26,11 @@ TARGET=salwin
 
 # --- Settings -----------------------------------------------------
 
-.INCLUDE :  settings.mk
+.INCLUDE : settings.mk
 
 # --- Files --------------------------------------------------------
 
-CXXFILES__YD=	salframe.cxx			\
+CXXFILES__YD=	salframe.cxx		\
 			salobj.cxx
 
 SLOFILES=	$(SLO)$/salframe.obj 	\
@@ -40,4 +38,6 @@ SLOFILES=	$(SLO)$/salframe.obj 	\
 
 # --- Targets ------------------------------------------------------
 
-.INCLUDE :  target.mk
+.INCLUDE : target.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/main/vcl/os2/source/window/salframe.cxx b/main/vcl/os2/source/window/salframe.cxx
index f7e080061d..8de52aefec 100644
--- a/main/vcl/os2/source/window/salframe.cxx
+++ b/main/vcl/os2/source/window/salframe.cxx
@@ -285,8 +285,8 @@ static void dumpWindowInfo( char* fnc, HWND hwnd)
 
 struct ImplSalIMEProc
 {
-    ULONG       nOrd;
-    PFN*        pProc;
+	ULONG       nOrd;
+	PFN*        pProc;
 };
 
 #define SAL_IME_PROC_COUNT          12
@@ -295,15 +295,15 @@ struct ImplSalIMEProc
 
 static SalIMEData* GetSalIMEData()
 {
-    SalData* pSalData = GetSalData();
+	SalData* pSalData = GetSalData();
 
-    if ( !pSalData->mbIMEInit )
-    {
-        pSalData->mbIMEInit = TRUE;
+	if ( !pSalData->mbIMEInit )
+	{
+		pSalData->mbIMEInit = TRUE;
 
-        HMODULE hMod = 0;
-        if ( 0 == DosLoadModule( NULL, 0, "OS2IM", &hMod ) )
-        {
+		HMODULE hMod = 0;
+		if ( 0 == DosLoadModule( NULL, 0, "OS2IM", &hMod ) )
+		{
             SalIMEData*     pIMEData = new SalIMEData;
             sal_Bool            bError = FALSE;
             ImplSalIMEProc  aProcAry[SAL_IME_PROC_COUNT] =
@@ -339,8 +339,8 @@ static SalIMEData* GetSalIMEData()
             }
             else
                 pSalData->mpIMEData = pIMEData;
-        }
-    }
+		}
+	}
 
 	return pSalData->mpIMEData;
 }
@@ -370,21 +370,21 @@ static void ImplSaveFrameState( Os2SalFrame* pFrame )
 		SWP aSWP;
 		sal_Bool bVisible = WinIsWindowVisible( pFrame->mhWndFrame);
 
-        // Query actual state (maState uses screen coords)
-        WinQueryWindowPos( pFrame->mhWndFrame, &aSWP );
+		// Query actual state (maState uses screen coords)
+		WinQueryWindowPos( pFrame->mhWndFrame, &aSWP );
 
-        if ( aSWP.fl & SWP_MINIMIZE )
-        {
+		if ( aSWP.fl & SWP_MINIMIZE )
+		{
 #if OSL_DEBUG_LEVEL>0
 			debug_printf("Os2SalFrame::GetWindowState %08x SAL_FRAMESTATE_MINIMIZED\n",
 					pFrame->mhWndFrame);
 #endif
-            pFrame->maState.mnState |= SAL_FRAMESTATE_MINIMIZED;
-            if ( bVisible )
-                pFrame->mnShowState = SWP_SHOWMAXIMIZED;
-        }
-        else if ( aSWP.fl & SWP_MAXIMIZE )
-        {
+			pFrame->maState.mnState |= SAL_FRAMESTATE_MINIMIZED;
+			if ( bVisible )
+				pFrame->mnShowState = SWP_SHOWMAXIMIZED;
+		}
+		else if ( aSWP.fl & SWP_MAXIMIZE )
+		{
 #if OSL_DEBUG_LEVEL>0
 			debug_printf("Os2SalFrame::GetWindowState %08x SAL_FRAMESTATE_MAXIMIZED\n",
 					pFrame->mhWndFrame);
@@ -394,9 +394,9 @@ static void ImplSaveFrameState( Os2SalFrame* pFrame )
             if ( bVisible )
                 pFrame->mnShowState = SWP_SHOWMINIMIZED;
             pFrame->mbRestoreMaximize = TRUE;
-        }
-        else
-        {
+		}
+		else
+		{
 			LONG nFrameX, nFrameY, nCaptionY;
 			ImplSalCalcFrameSize( pFrame, nFrameX, nFrameY, nCaptionY );
 			// to be consistent with Unix, the frame state is without(!) decoration
@@ -405,20 +405,20 @@ static void ImplSaveFrameState( Os2SalFrame* pFrame )
 			long nBottomDeco = nFrameY;
 			long nRightDeco = nFrameX;
 
-            pFrame->maState.mnState &= ~(SAL_FRAMESTATE_MINIMIZED | SAL_FRAMESTATE_MAXIMIZED);
-            // subtract decoration, store screen coords
-            pFrame->maState.mnX      = aSWP.x+nLeftDeco;
-            pFrame->maState.mnY      = nScreenHeight - (aSWP.y+aSWP.cy)+nTopDeco;
-            pFrame->maState.mnWidth  = aSWP.cx-nLeftDeco-nRightDeco;
-            pFrame->maState.mnHeight = aSWP.cy-nTopDeco-nBottomDeco;
+			pFrame->maState.mnState &= ~(SAL_FRAMESTATE_MINIMIZED | SAL_FRAMESTATE_MAXIMIZED);
+			// subtract decoration, store screen coords
+			pFrame->maState.mnX      = aSWP.x+nLeftDeco;
+			pFrame->maState.mnY      = nScreenHeight - (aSWP.y+aSWP.cy)+nTopDeco;
+			pFrame->maState.mnWidth  = aSWP.cx-nLeftDeco-nRightDeco;
+			pFrame->maState.mnHeight = aSWP.cy-nTopDeco-nBottomDeco;
 #if OSL_DEBUG_LEVEL>0
 			debug_printf("Os2SalFrame::GetWindowState %08x (%dx%d) at %d,%d VCL\n",
 					pFrame->mhWndFrame,
 					pFrame->maState.mnWidth,pFrame->maState.mnHeight,pFrame->maState.mnX,pFrame->maState.mnY);
 #endif
-            if ( bVisible )
-                pFrame->mnShowState = SWP_SHOWNORMAL;
-            pFrame->mbRestoreMaximize = FALSE;
+			if ( bVisible )
+				pFrame->mnShowState = SWP_SHOWNORMAL;
+			pFrame->mbRestoreMaximize = FALSE;
 			//debug_printf( "ImplSaveFrameState: window %08x at %d,%d (size %dx%d)\n",
 			//	pFrame->mhWndFrame,
 			//	pFrame->maState.mnX, pFrame->maState.mnY, pFrame->maState.mnWidth, pFrame->maState.mnHeight);
@@ -430,7 +430,7 @@ static void ImplSaveFrameState( Os2SalFrame* pFrame )
 
 long ImplSalCallbackDummy( void*, SalFrame*, USHORT, const void* )
 {
-    return 0;
+	return 0;
 }
 
 // -----------------------------------------------------------------------
@@ -447,30 +447,30 @@ static void ImplSalCalcFrameSize( HWND hWnd,
 static void ImplSalCalcFrameSize( const Os2SalFrame* pFrame,
                                   LONG& nFrameX, LONG& nFrameY, LONG& nCaptionY )
 {
-    if ( pFrame->mbSizeBorder )
-    {
-        nFrameX = WinQuerySysValue( HWND_DESKTOP, SV_CXSIZEBORDER );
-        nFrameY = WinQuerySysValue( HWND_DESKTOP, SV_CYSIZEBORDER );
-    }
-    else if ( pFrame->mbFixBorder )
-    {
-        nFrameX = WinQuerySysValue( HWND_DESKTOP, SV_CXDLGFRAME );
-        nFrameY = WinQuerySysValue( HWND_DESKTOP, SV_CYDLGFRAME );
-    }
-    else if ( pFrame->mbBorder )
-    {
-        nFrameX = WinQuerySysValue( HWND_DESKTOP, SV_CXBORDER );
-        nFrameY = WinQuerySysValue( HWND_DESKTOP, SV_CYBORDER );
-    }
-    else
-    {
-        nFrameX = 0;
-        nFrameY = 0;
-    }
-    if ( pFrame->mbCaption )
-        nCaptionY = WinQuerySysValue( HWND_DESKTOP, SV_CYTITLEBAR );
-    else
-        nCaptionY = 0;
+	if ( pFrame->mbSizeBorder )
+	{
+		nFrameX = WinQuerySysValue( HWND_DESKTOP, SV_CXSIZEBORDER );
+		nFrameY = WinQuerySysValue( HWND_DESKTOP, SV_CYSIZEBORDER );
+	}
+	else if ( pFrame->mbFixBorder )
+	{
+		nFrameX = WinQuerySysValue( HWND_DESKTOP, SV_CXDLGFRAME );
+		nFrameY = WinQuerySysValue( HWND_DESKTOP, SV_CYDLGFRAME );
+	}
+	else if ( pFrame->mbBorder )
+	{
+		nFrameX = WinQuerySysValue( HWND_DESKTOP, SV_CXBORDER );
+		nFrameY = WinQuerySysValue( HWND_DESKTOP, SV_CYBORDER );
+	}
+	else
+	{
+		nFrameX = 0;
+		nFrameY = 0;
+	}
+	if ( pFrame->mbCaption )
+		nCaptionY = WinQuerySysValue( HWND_DESKTOP, SV_CYTITLEBAR );
+	else
+		nCaptionY = 0;
 
 #if OSL_DEBUG_LEVEL>0
 	//if (_bCapture)
@@ -501,10 +501,10 @@ static void ImplSalCalcFullScreenSize( const Os2SalFrame* pFrame,
 
 static void ImplSalFrameFullScreenPos( Os2SalFrame* pFrame, sal_Bool bAlways = FALSE )
 {
-    SWP aSWP;
-    _WinQueryWindowPos( pFrame, &aSWP );
-    if ( bAlways || !(aSWP.fl & SWP_MINIMIZE) )
-    {
+	SWP aSWP;
+	_WinQueryWindowPos( pFrame, &aSWP );
+	if ( bAlways || !(aSWP.fl & SWP_MINIMIZE) )
+	{
         // set window to screen size
         LONG nX;
         LONG nY;
@@ -514,7 +514,7 @@ static void ImplSalFrameFullScreenPos( Os2SalFrame* pFrame, sal_Bool bAlways = F
         _WinSetWindowPos( pFrame, 0,
                          nX, nY, nWidth, nHeight,
                          SWP_MOVE | SWP_SIZE );
-    }
+	}
 }
 
 // -----------------------------------------------------------------------
@@ -588,14 +588,14 @@ static USHORT aImplTranslateKeyTab[KEY_TAB_SIZE] =
 
 SalFrame* ImplSalCreateFrame( Os2SalInstance* pInst, HWND hWndParent, ULONG nSalFrameStyle )
 {
-    SalData*    	pSalData = GetSalData();
-    Os2SalFrame*   	pFrame = new Os2SalFrame;
-    HWND        	hWndFrame;
-    HWND        	hWndClient;
-    ULONG    		nFrameFlags = FCF_NOBYTEALIGN | FCF_SCREENALIGN;
-    ULONG    		nFrameStyle = 0;
-    ULONG    		nClientStyle = WS_CLIPSIBLINGS;
-    sal_Bool        	bSubFrame = FALSE;
+	SalData*    	pSalData = GetSalData();
+	Os2SalFrame*   	pFrame = new Os2SalFrame;
+	HWND        	hWndFrame;
+	HWND        	hWndClient;
+	ULONG    		nFrameFlags = FCF_NOBYTEALIGN | FCF_SCREENALIGN;
+	ULONG    		nFrameStyle = 0;
+	ULONG    		nClientStyle = WS_CLIPSIBLINGS;
+	sal_Bool        	bSubFrame = FALSE;
 
 #if OSL_DEBUG_LEVEL>0
 	debug_printf(">ImplSalCreateFrame hWndParent 0x%x, nSalFrameStyle 0x%x\n", hWndParent, nSalFrameStyle);
@@ -649,60 +649,60 @@ SalFrame* ImplSalCreateFrame( Os2SalInstance* pInst, HWND hWndParent, ULONG nSal
     //if( nSalFrameStyle & SAL_FRAME_STYLE_TOOLTIP )
     //    nExSysStyle |= WS_EX_TOPMOST;
 
-    // init frame data
-    pFrame->mnStyle = nSalFrameStyle;
+	// init frame data
+	pFrame->mnStyle = nSalFrameStyle;
 
-    // determine show style
-    pFrame->mnShowState = SWP_SHOWNORMAL;
+	// determine show style
+	pFrame->mnShowState = SWP_SHOWNORMAL;
 
-    // create frame
+	// create frame
 	// YD FIXME this is a potential bug with multiple threads and concurrent
 	// window creation, because this field is accessed in
 	// WM_CREATE to get window data,
-    pSalData->mpCreateFrame = pFrame;
+	pSalData->mpCreateFrame = pFrame;
 
 	// YD FIXME if SAL_FRAME_CHILD is specified, use hWndParent as parent handle...
-    hWndFrame = WinCreateStdWindow( HWND_DESKTOP, nFrameStyle, &nFrameFlags,
+	hWndFrame = WinCreateStdWindow( HWND_DESKTOP, nFrameStyle, &nFrameFlags,
 					(PSZ)(bSubFrame ? SAL_SUBFRAME_CLASSNAME : SAL_FRAME_CLASSNAME),
 					NULL,
 					nClientStyle, 0, 0, &hWndClient );
-    debug_printf("ImplSalCreateFrame hWndParent 0x%x, hWndFrame 0x%x, hWndClient 0x%x\n", hWndParent, hWndFrame, hWndClient);
-    if ( !hWndFrame )
-    {
-        delete pFrame;
-        return NULL;
-    }
+	debug_printf("ImplSalCreateFrame hWndParent 0x%x, hWndFrame 0x%x, hWndClient 0x%x\n", hWndParent, hWndFrame, hWndClient);
+	if ( !hWndFrame )
+	{
+		delete pFrame;
+		return NULL;
+	}
 
-    // Parent setzen (Owner)
-    if ( hWndParent != 0 && hWndParent != HWND_DESKTOP )
-        WinSetOwner( hWndFrame, hWndParent );
+	// Parent setzen (Owner)
+	if ( hWndParent != 0 && hWndParent != HWND_DESKTOP )
+		WinSetOwner( hWndFrame, hWndParent );
 
-    Os2SalFrame* pParentFrame = GetWindowPtr( hWndParent );
-    if ( pParentFrame )
+	Os2SalFrame* pParentFrame = GetWindowPtr( hWndParent );
+	if ( pParentFrame )
 		pFrame->mpParentFrame = pParentFrame;
 
-    // since OS/2 windows always have a close button, always set icon
-    WinSendMsg( hWndFrame, WM_SETICON, (MPARAM)pInst->mhAppIcon, (MPARAM)0 );
+	// since OS/2 windows always have a close button, always set icon
+	WinSendMsg( hWndFrame, WM_SETICON, (MPARAM)pInst->mhAppIcon, (MPARAM)0 );
 
-    // If we have an Window with an Caption Bar and without
-    // an MaximizeBox, we change the SystemMenu
-    if ( (nFrameFlags & (FCF_TITLEBAR | FCF_MAXBUTTON)) == (FCF_TITLEBAR) )
-    {
-        HWND hSysMenu = WinWindowFromID( hWndFrame, FID_SYSMENU );
-        if ( hSysMenu )
-        {
-            if ( !(nFrameFlags & (FCF_MINBUTTON | FCF_MAXBUTTON)) )
+	// If we have an Window with an Caption Bar and without
+	// an MaximizeBox, we change the SystemMenu
+	if ( (nFrameFlags & (FCF_TITLEBAR | FCF_MAXBUTTON)) == (FCF_TITLEBAR) )
+	{
+		HWND hSysMenu = WinWindowFromID( hWndFrame, FID_SYSMENU );
+		if ( hSysMenu )
+		{
+			if ( !(nFrameFlags & (FCF_MINBUTTON | FCF_MAXBUTTON)) )
 				WinEnableMenuItem(hSysMenu, SC_RESTORE, FALSE);
-            if ( !(nFrameFlags & FCF_MINBUTTON) )
+			if ( !(nFrameFlags & FCF_MINBUTTON) )
 				WinEnableMenuItem(hSysMenu, SC_MINIMIZE, FALSE);
-            if ( !(nFrameFlags & FCF_MAXBUTTON) )
+			if ( !(nFrameFlags & FCF_MAXBUTTON) )
 				WinEnableMenuItem(hSysMenu, SC_MAXIMIZE, FALSE);
-            if ( !(nFrameFlags & FCF_SIZEBORDER) )
+			if ( !(nFrameFlags & FCF_SIZEBORDER) )
 				WinEnableMenuItem(hSysMenu, SC_SIZE, FALSE);
-        }
-    }
-    if ( (nFrameFlags & FCF_SYSMENU) && !(nSalFrameStyle & SAL_FRAME_STYLE_CLOSEABLE) )
-    {
+		}
+	}
+	if ( (nFrameFlags & FCF_SYSMENU) && !(nSalFrameStyle & SAL_FRAME_STYLE_CLOSEABLE) )
+	{
         HWND hSysMenu = WinWindowFromID( hWndFrame, FID_SYSMENU );
         if ( hSysMenu )
         {
@@ -710,67 +710,67 @@ SalFrame* ImplSalCreateFrame( Os2SalInstance* pInst, HWND hWndParent, ULONG nSal
         }
     }
 
-    // ticket#124 subclass frame window: we need to intercept TRACK message
-    aSalShlData.mpFrameProc = WinSubclassWindow( hWndFrame, SalFrameSubClassWndProc);
+	// ticket#124 subclass frame window: we need to intercept TRACK message
+	aSalShlData.mpFrameProc = WinSubclassWindow( hWndFrame, SalFrameSubClassWndProc);
 
-    // init OS/2 frame data
-    pFrame->mhAB            = pInst->mhAB;
+	// init OS/2 frame data
+	pFrame->mhAB            = pInst->mhAB;
 
-    // YD 18/08 under OS/2, invisible frames have size 0,0 at 0,0, so
-    // we need to set an initial size/position manually
-    SWP aSWP;
-    memset( &aSWP, 0, sizeof( aSWP ) );
-    WinQueryTaskSizePos( pInst->mhAB, 0, &aSWP );
-    WinSetWindowPos( hWndFrame, NULL, aSWP.x, aSWP.y, aSWP.cx, aSWP.cy,
-                     SWP_MOVE | SWP_SIZE);
+	// YD 18/08 under OS/2, invisible frames have size 0,0 at 0,0, so
+	// we need to set an initial size/position manually
+	SWP aSWP;
+	memset( &aSWP, 0, sizeof( aSWP ) );
+	WinQueryTaskSizePos( pInst->mhAB, 0, &aSWP );
+	WinSetWindowPos( hWndFrame, NULL, aSWP.x, aSWP.y, aSWP.cx, aSWP.cy,
+					 SWP_MOVE | SWP_SIZE);
 
 #ifdef ENABLE_IME
-    // Input-Context einstellen
-    SalIMEData* pIMEData = GetSalIMEData();
-    if ( pIMEData )
-    {
-        pFrame->mhIMEContext = 0;
-        if ( 0 != pIMEData->mpAssocIME( hWndClient, pFrame->mhIMEContext, &pFrame->mhDefIMEContext ) )
-            pFrame->mhDefIMEContext = 0;
-    }
-    else
-    {
-        pFrame->mhIMEContext = 0;
-        pFrame->mhDefIMEContext = 0;
-    }
+	// Input-Context einstellen
+	SalIMEData* pIMEData = GetSalIMEData();
+	if ( pIMEData )
+	{
+		pFrame->mhIMEContext = 0;
+		if ( 0 != pIMEData->mpAssocIME( hWndClient, pFrame->mhIMEContext, &pFrame->mhDefIMEContext ) )
+			pFrame->mhDefIMEContext = 0;
+	}
+	else
+	{
+		pFrame->mhIMEContext = 0;
+		pFrame->mhDefIMEContext = 0;
+	}
 #endif
 
-    RECTL rectl;
-    _WinQueryWindowRect( hWndClient, &rectl );
-    pFrame->mnWidth  = rectl.xRight;
-    pFrame->mnHeight = rectl.yBottom;
-    debug_printf( "ImplSalCreateFrame %dx%d\n", pFrame->mnWidth, pFrame->mnHeight);
-    ImplSaveFrameState( pFrame );
-    pFrame->mbDefPos = TRUE;
+	RECTL rectl;
+	_WinQueryWindowRect( hWndClient, &rectl );
+	pFrame->mnWidth  = rectl.xRight;
+	pFrame->mnHeight = rectl.yBottom;
+	debug_printf( "ImplSalCreateFrame %dx%d\n", pFrame->mnWidth, pFrame->mnHeight);
+	ImplSaveFrameState( pFrame );
+	pFrame->mbDefPos = TRUE;
 
 	UpdateFrameGeometry( hWndFrame, pFrame );
 
-    if( pFrame->mnShowState == SWP_SHOWMAXIMIZED )
+	if( pFrame->mnShowState == SWP_SHOWMAXIMIZED )
 	{
 		// #96084 set a useful internal window size because
 		// the window will not be maximized (and the size updated) before show()
-        SetMaximizedFrameGeometry( hWndFrame, pFrame );
+		SetMaximizedFrameGeometry( hWndFrame, pFrame );
 	}
 
 #if OSL_DEBUG_LEVEL > 1
 	dumpWindowInfo( "<ImplSalCreateFrame (exit)", hWndFrame);
 #endif
 
-    return pFrame;
+	return pFrame;
 }
 
 // =======================================================================
 
 Os2SalFrame::Os2SalFrame()
 {
-    SalData* pSalData = GetSalData();
+	SalData* pSalData = GetSalData();
 
-    mbGraphics          = NULL;
+	mbGraphics          = NULL;
     mhPointer           = WinQuerySysPointer( HWND_DESKTOP, SPTR_ARROW, FALSE );
     mpGraphics          = NULL;
     mpInst              = NULL;
@@ -898,31 +898,31 @@ SalGraphics* Os2SalFrame::GetGraphics()
     else
         mbGraphics = TRUE;
 
-    return mpGraphics;
+	return mpGraphics;
 }
 
 // -----------------------------------------------------------------------
 
 void Os2SalFrame::ReleaseGraphics( SalGraphics* )
 {
-    mbGraphics = FALSE;
+	mbGraphics = FALSE;
 }
 
 // -----------------------------------------------------------------------
 
 sal_Bool Os2SalFrame::PostEvent( void* pData )
 {
-    return (sal_Bool)WinPostMsg( mhWndClient, SAL_MSG_USEREVENT, 0, (MPARAM)pData );
+	return (sal_Bool)WinPostMsg( mhWndClient, SAL_MSG_USEREVENT, 0, (MPARAM)pData );
 }
 
 // -----------------------------------------------------------------------
 
 void Os2SalFrame::SetTitle( const XubString& rTitle )
 {
-    // set window title
+	// set window title
 	ByteString title( rTitle, gsl_getSystemTextEncoding() );
 	debug_printf("Os2SalFrame::SetTitle %x '%s'\n", mhWndFrame, title.GetBuffer() );
-    WinSetWindowText( mhWndFrame, title.GetBuffer() );
+	WinSetWindowText( mhWndFrame, title.GetBuffer() );
 }
 
 // -----------------------------------------------------------------------
@@ -931,20 +931,20 @@ void Os2SalFrame::SetIcon( USHORT nIcon )
 {
 	debug_printf("Os2SalFrame::SetIcon\n");
 
-    // If we have a window without an Icon (for example a dialog), ignore this call
-    if ( mbNoIcon )
-        return;
+	// If we have a window without an Icon (for example a dialog), ignore this call
+	if ( mbNoIcon )
+		return;
 
-    // 0 means default (class) icon
-    HPOINTER hIcon = NULL;
-    if ( !nIcon )
-        nIcon = 1;
+	// 0 means default (class) icon
+	HPOINTER hIcon = NULL;
+	if ( !nIcon )
+		nIcon = 1;
 
-    ImplLoadSalIcon( nIcon, hIcon );
+	ImplLoadSalIcon( nIcon, hIcon );
 
-    DBG_ASSERT( hIcon , "Os2SalFrame::SetIcon(): Could not load icon !" );
+	DBG_ASSERT( hIcon , "Os2SalFrame::SetIcon(): Could not load icon !" );
 
-    // Icon setzen
+	// Icon setzen
 	WinSendMsg( mhWndFrame, WM_SETICON, (MPARAM)hIcon, (MPARAM)0 );
 }
 
@@ -953,48 +953,48 @@ void Os2SalFrame::SetIcon( USHORT nIcon )
 SalFrame* Os2SalFrame::GetParent() const
 {
 	//debug_printf("Os2SalFrame::GetParent\n");
-    return GetWindowPtr( WinQueryWindow(mhWndFrame, QW_OWNER) );
+	return GetWindowPtr( WinQueryWindow(mhWndFrame, QW_OWNER) );
 }
 
 // -----------------------------------------------------------------------
 
 static void ImplSalShow( HWND hWnd, ULONG bVisible, ULONG bNoActivate )
 {
-    Os2SalFrame* pFrame = GetWindowPtr( hWnd );
-    if ( !pFrame )
-        return;
+	Os2SalFrame* pFrame = GetWindowPtr( hWnd );
+	if ( !pFrame )
+		return;
 
-    if ( bVisible )
-    {
-        pFrame->mbDefPos = FALSE;
-        pFrame->mbOverwriteState = TRUE;
-        pFrame->mbInShow = TRUE;
+	if ( bVisible )
+	{
+		pFrame->mbDefPos = FALSE;
+		pFrame->mbOverwriteState = TRUE;
+		pFrame->mbInShow = TRUE;
 
 #if OSL_DEBUG_LEVEL > 0
 		debug_printf( "ImplSalShow hwnd %x visible flag %d, no activate: flag %d\n", hWnd, bVisible, bNoActivate);
 #endif
 
-        if( bNoActivate )
+		if( bNoActivate )
 			WinSetWindowPos(hWnd, NULL, 0, 0, 0, 0, SWP_SHOW);
-        else
-            WinSetWindowPos(hWnd, NULL, 0, 0, 0, 0, pFrame->mnShowState);
+		else
+			WinSetWindowPos(hWnd, NULL, 0, 0, 0, 0, pFrame->mnShowState);
 
-        pFrame->mbInShow = FALSE;
+		pFrame->mbInShow = FALSE;
 
-        // Direct Paint only, if we get the SolarMutx
-        if ( ImplSalYieldMutexTryToAcquire() )
-        {
-            WinUpdateWindow( hWnd );
-            ImplSalYieldMutexRelease();
-        }
-    }
-    else
-    {
+		// Direct Paint only, if we get the SolarMutx
+		if ( ImplSalYieldMutexTryToAcquire() )
+		{
+			WinUpdateWindow( hWnd );
+			ImplSalYieldMutexRelease();
+		}
+	}
+	else
+	{
 #if OSL_DEBUG_LEVEL > 0
 		debug_printf( "ImplSalShow hwnd %x HIDE\n");
 #endif
 		WinSetWindowPos(hWnd, NULL, 0, 0, 0, 0, SWP_HIDE);
-    }
+	}
 }
 
 
@@ -1022,23 +1022,23 @@ void Os2SalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate )
 
 void Os2SalFrame::Enable( sal_Bool bEnable )
 {
-    WinEnableWindow( mhWndFrame, bEnable );
+	WinEnableWindow( mhWndFrame, bEnable );
 }
 
 // -----------------------------------------------------------------------
 
 void Os2SalFrame::SetMinClientSize( long nWidth, long nHeight )
 {
-    debug_printf("Os2SalFrame::SetMinClientSize\n");
-    mnMinWidth  = nWidth;
-    mnMinHeight = nHeight;
+	debug_printf("Os2SalFrame::SetMinClientSize\n");
+	mnMinWidth  = nWidth;
+	mnMinHeight = nHeight;
 }
 
 void Os2SalFrame::SetMaxClientSize( long nWidth, long nHeight )
 {
-    debug_printf("Os2SalFrame::SetMaxClientSize\n");
-    mnMaxWidth  = nWidth;
-    mnMaxHeight = nHeight;
+	debug_printf("Os2SalFrame::SetMaxClientSize\n");
+	mnMaxWidth  = nWidth;
+	mnMaxHeight = nHeight;
 }
 
 // -----------------------------------------------------------------------
@@ -1046,8 +1046,8 @@ void Os2SalFrame::SetMaxClientSize( long nWidth, long nHeight )
 void Os2SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
                                                    USHORT nFlags )
 {
-    // calculation frame size
-    USHORT 	nEvent = 0;
+	// calculation frame size
+	USHORT 	nEvent = 0;
 	ULONG	nPosFlags = 0;
 
 #if OSL_DEBUG_LEVEL > 0
@@ -1057,68 +1057,68 @@ void Os2SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
 
 	SWP aSWP;
 	_WinQueryWindowPos( this, &aSWP );
-    sal_Bool bVisible = WinIsWindowVisible( mhWndFrame );
-    if ( !bVisible )
-    {
-        if ( mbFloatWin )
+	sal_Bool bVisible = WinIsWindowVisible( mhWndFrame );
+	if ( !bVisible )
+	{
+		if ( mbFloatWin )
 			mnShowState = SWP_SHOW;
-        else
+		else
 			mnShowState = SWP_SHOWNORMAL;
-    }
-    else
-    {
-        if ( (aSWP.fl & SWP_MINIMIZE) || (aSWP.fl & SWP_MAXIMIZE) )
+	}
+	else
+	{
+		if ( (aSWP.fl & SWP_MINIMIZE) || (aSWP.fl & SWP_MAXIMIZE) )
 			WinSetWindowPos(mhWndFrame, NULL, 0, 0, 0, 0, SWP_RESTORE );
-    }
+	}
 
-    if ( (nFlags & (SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y)) ) {
-        nPosFlags |= SWP_MOVE;
+	if ( (nFlags & (SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y)) ) {
+		nPosFlags |= SWP_MOVE;
 #if OSL_DEBUG_LEVEL > 0
 		debug_printf( "-Os2SalFrame::SetPosSize MOVE to %d,%d\n", nX, nY);
 #endif
-        //DBG_ASSERT( nX && nY, " Windowposition of (0,0) requested!" );
-        nEvent = SALEVENT_MOVE;
+		//DBG_ASSERT( nX && nY, " Windowposition of (0,0) requested!" );
+		nEvent = SALEVENT_MOVE;
 	}
 
-    if ( (nFlags & (SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT)) ) {
-        nPosFlags |= SWP_SIZE;
+	if ( (nFlags & (SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT)) ) {
+		nPosFlags |= SWP_SIZE;
 #if OSL_DEBUG_LEVEL > 0
 		debug_printf( "-Os2SalFrame::SetPosSize SIZE to %d,%d\n", nWidth,nHeight);
 #endif
-        nEvent = (nEvent == SALEVENT_MOVE) ? SALEVENT_MOVERESIZE : SALEVENT_RESIZE;
+		nEvent = (nEvent == SALEVENT_MOVE) ? SALEVENT_MOVERESIZE : SALEVENT_RESIZE;
 	}
 
-    // Default-Position, dann zentrieren, ansonsten Position beibehalten
-    if ( mbDefPos  && !(nPosFlags & SWP_MOVE))
-    {
-        // calculate bottom left corner of frame
-        mbDefPos = FALSE;
+	// Default-Position, dann zentrieren, ansonsten Position beibehalten
+	if ( mbDefPos  && !(nPosFlags & SWP_MOVE))
+	{
+		// calculate bottom left corner of frame
+		mbDefPos = FALSE;
 		nPosFlags |= SWP_MOVE | SWP_CENTER;
-        nEvent = SALEVENT_MOVERESIZE;
+		nEvent = SALEVENT_MOVERESIZE;
 #if OSL_DEBUG_LEVEL > 10
 		debug_printf( "-Os2SalFrame::SetPosSize CENTER\n");
 		debug_printf( "-Os2SalFrame::SetPosSize default position to %d,%d\n", nX, nY);
 #endif
-    }
+	}
 
-    // Adjust Window in the screen
-    sal_Bool bCheckOffScreen = TRUE;
+	// Adjust Window in the screen
+	sal_Bool bCheckOffScreen = TRUE;
 
-    // but don't do this for floaters or ownerdraw windows that are currently moved interactively
-    if( (mnStyle & SAL_FRAME_STYLE_FLOAT) && !(mnStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) )
-        bCheckOffScreen = FALSE;
+	// but don't do this for floaters or ownerdraw windows that are currently moved interactively
+	if( (mnStyle & SAL_FRAME_STYLE_FLOAT) && !(mnStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION) )
+		bCheckOffScreen = FALSE;
 
-    if( mnStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION )
-    {
+	if( mnStyle & SAL_FRAME_STYLE_OWNERDRAWDECORATION )
+	{
         // maybe the window is currently being moved (mouse is captured), then no check is required
         if( mhWndClient == WinQueryCapture( HWND_DESKTOP) )
             bCheckOffScreen = FALSE;
         else
             bCheckOffScreen = TRUE;
-    }
+	}
 
-    if( bCheckOffScreen )
-    {
+	if( bCheckOffScreen )
+	{
         if ( nX+nWidth > nScreenWidth )
             nX = nScreenWidth - nWidth;
         if ( nY+nHeight > nScreenHeight )
@@ -1153,9 +1153,9 @@ void Os2SalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
 
 void Os2SalFrame::SetParent( SalFrame* pNewParent )
 {
-    APIRET rc;
+	APIRET rc;
 #if OSL_DEBUG_LEVEL>0
-    debug_printf("Os2SalFrame::SetParent mhWndFrame 0x%08x to 0x%08x\n",
+	debug_printf("Os2SalFrame::SetParent mhWndFrame 0x%08x to 0x%08x\n",
 			static_cast<Os2SalFrame*>(this)->mhWndFrame,
 			static_cast<Os2SalFrame*>(pNewParent)->mhWndClient);
 #endif
@@ -3550,7 +3550,7 @@ MRESULT EXPENTRY SalFrameWndProc( HWND hWnd, ULONG nMsg,
 
         case WM_TRANSLATEACCEL:
             {
-            // Da uns OS/2 zu viele Tasten abfägnt, unternehmen wir etwas,
+            // Da uns OS/2 zu viele Tasten abfängt, unternehmen wir etwas,
             // damit wir Shift+F1, Shift+F10 und Shift+Enter bekommen
             PQMSG   pMsg        = (PQMSG)nMP1;
             USHORT  nKeyFlags   = SHORT1FROMMP( pMsg->mp1 );
@@ -3582,62 +3582,62 @@ MRESULT EXPENTRY SalFrameWndProc( HWND hWnd, ULONG nMsg,
 				pFrame->mhWndClient = hWnd;
 				pFrame->mhWndFrame = hWndFrame;
 				pFrame->maSysData.hWnd = hWnd;
-            }
-            break;
+			}
+			break;
 
-        case WM_CLOSE:
-            ImplHandleCloseMsg( hWnd );
-            bDef = FALSE;
-            break;
+		case WM_CLOSE:
+			ImplHandleCloseMsg( hWnd );
+			bDef = FALSE;
+			break;
 
-        case WM_SYSVALUECHANGED:
-            if ( pFrame->mbFullScreen )
-                ImplSalFrameFullScreenPos( pFrame );
-            // kein break, da der Rest auch noch verarbeitet werden soll
-        case PL_ALTERED:
-        case WM_SYSCOLORCHANGE:
-            ImplSalYieldMutexAcquire();
-            pFrame->CallCallback( SALEVENT_SETTINGSCHANGED, 0 );
-            ImplSalYieldMutexRelease();
-            break;
+		case WM_SYSVALUECHANGED:
+			if ( pFrame->mbFullScreen )
+				ImplSalFrameFullScreenPos( pFrame );
+			// kein break, da der Rest auch noch verarbeitet werden soll
+		case PL_ALTERED:
+		case WM_SYSCOLORCHANGE:
+			ImplSalYieldMutexAcquire();
+			pFrame->CallCallback( SALEVENT_SETTINGSCHANGED, 0 );
+			ImplSalYieldMutexRelease();
+			break;
 
-        case SAL_MSG_USEREVENT:
-            ImplHandleUserEvent( hWnd, nMP2 );
-            bDef = FALSE;
-            break;
-        case SAL_MSG_TOTOP:
-            ImplSalToTop( hWnd, (ULONG)nMP1 );
-            bDef = FALSE;
-            break;
-        case SAL_MSG_SHOW:
-            ImplSalShow( hWnd, (ULONG)nMP1, (ULONG)nMP2 );
-            bDef = FALSE;
-            break;
+		case SAL_MSG_USEREVENT:
+			ImplHandleUserEvent( hWnd, nMP2 );
+			bDef = FALSE;
+			break;
+		case SAL_MSG_TOTOP:
+			ImplSalToTop( hWnd, (ULONG)nMP1 );
+			bDef = FALSE;
+			break;
+		case SAL_MSG_SHOW:
+			ImplSalShow( hWnd, (ULONG)nMP1, (ULONG)nMP2 );
+			bDef = FALSE;
+			break;
 
 		case WM_KBDLAYERCHANGED:
 			debug_printf("hWnd 0x%08x WM_KBDLAYERCHANGED\n", hWnd);
-            ImplHandleInputLangChange( hWnd );
-            break;
+			ImplHandleInputLangChange( hWnd );
+			break;
 
 		case WM_HSCROLL:
 		case WM_VSCROLL:
 			ImplHandleWheelMsg( hWnd, nMsg, nMP1, nMP2 );
-            bDef = FALSE;
+			bDef = FALSE;
 			break;
 
-        case WM_COMMAND:
-        case SAL_MSG_SYSPROCESSMENU:
-            if ( SalImplHandleProcessMenu( pFrame, nMsg, nMP1, nMP2 ) )
-            {
-                bDef = FALSE;
-                nRet = (MRESULT)1;
-            }
-            break;
+		case WM_COMMAND:
+		case SAL_MSG_SYSPROCESSMENU:
+			if ( SalImplHandleProcessMenu( pFrame, nMsg, nMP1, nMP2 ) )
+			{
+				bDef = FALSE;
+				nRet = (MRESULT)1;
+			}
+			break;
 
 #ifdef ENABLE_IME
-        case WM_IMEREQUEST:
-            if ( (ULONG)nMP1 == IMR_CONVRESULT )
-            {
+		case WM_IMEREQUEST:
+			if ( (ULONG)nMP1 == IMR_CONVRESULT )
+			{
                 if ( pFrame->mbHandleIME )
                 {
                     // Nur im Conversionmodus akzeptieren wir den IME-Input