diff options
Diffstat (limited to 'sw/source/core/frmedt/fews.cxx')
-rw-r--r-- | sw/source/core/frmedt/fews.cxx | 92 |
1 files changed, 27 insertions, 65 deletions
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 7ea3d079cc4b..a0e3a816df45 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +29,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" -#include <tools/list.hxx> #include <svx/svdobj.hxx> #include <init.hxx> #include <fesh.hxx> @@ -55,14 +55,10 @@ #include <edimp.hxx> #include <pagedesc.hxx> #include <fmtanchr.hxx> -// OD 29.10.2003 #113049# #include <environmentofanchoredobject.hxx> -// OD 12.11.2003 #i22341# -#include <ndtxt.hxx> -// OD 27.11.2003 #112045# +#include <ndtxt.hxx> // #i22341# #include <dflyobj.hxx> -// OD 2004-03-29 #i26791# -#include <dcontact.hxx> +#include <dcontact.hxx> // #i26791# using namespace com::sun::star; @@ -73,9 +69,6 @@ TYPEINIT1(SwFEShell,SwEditShell) /*********************************************************************** #* Class : SwFEShell #* Methode : EndAllActionAndCall() -#* -#* Datum : MA 03. May. 93 -#* Update : MA 31. Oct. 95 #***********************************************************************/ void SwFEShell::EndAllActionAndCall() @@ -97,8 +90,6 @@ void SwFEShell::EndAllActionAndCall() #* Class : SwFEShell #* Methode : GetCntntPos #* Beschreibung: Ermitteln des Cntnt's der dem Punkt am naechsten liegt -#* Datum : MA 02. Jun. 92 -#* Update : MA 02. May. 95 #***********************************************************************/ Point SwFEShell::GetCntntPos( const Point& rPoint, sal_Bool bNext ) const @@ -156,14 +147,14 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, case RECT_OUTTABSECTION : if( pFrm->IsInTab() ) pFrm = pFrm->FindTabFrm(); else { - ASSERT( sal_False, "Missing Table" ); + OSL_ENSURE( sal_False, "Missing Table" ); } /* KEIN BREAK */ case RECT_SECTION_PRT: case RECT_SECTION: if( pFrm->IsInSct() ) pFrm = pFrm->FindSctFrm(); else { - ASSERT( sal_False, "Missing section" ); + OSL_ENSURE( sal_False, "Missing section" ); } if( RECT_OUTTABSECTION_PRT == eType || @@ -249,9 +240,6 @@ bool SwFEShell::IsDirectlyInSection() const |* |* SwFEShell::GetFrmType() |* -|* Ersterstellung MA 12. Jan. 93 -|* Letzte Aenderung AMA 25. Nov. 98 -|* *************************************************************************/ sal_uInt16 SwFEShell::GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const @@ -300,7 +288,7 @@ sal_uInt16 SwFEShell::GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const nReturn |= FRMTYPE_FLY_ATCNT; else { - ASSERT( ((SwFlyFrm*)pFrm)->IsFlyInCntFrm(), + OSL_ENSURE( ((SwFlyFrm*)pFrm)->IsFlyInCntFrm(), "Neuer Rahmentyp?" ); nReturn |= FRMTYPE_FLY_INCNT; } @@ -325,9 +313,6 @@ sal_uInt16 SwFEShell::GetFrmType( const Point *pPt, sal_Bool bStopAtFly ) const |* |* SwFEShell::ShLooseFcs(), ShGetFcs() |* -|* Ersterstellung MA 10. May. 93 -|* Letzte Aenderung MA 09. Sep. 98 -|* *************************************************************************/ void SwFEShell::ShGetFcs( sal_Bool bUpdate ) @@ -352,7 +337,6 @@ void SwFEShell::ShLooseFcs() Imp()->GetDrawView()->hideMarkHandles(); FrameNotify( this, FLY_DRAG_END ); } -// ::ResetShell(); } /************************************************************************* @@ -360,9 +344,6 @@ void SwFEShell::ShLooseFcs() |* SwFEShell::GetPhyPageNum() |* SwFEShell::GetVirtPageNum() |* -|* Ersterstellung OK 07.07.93 08:20 -|* Letzte Aenderung MA 03. Jan. 94 -|* *************************************************************************/ sal_uInt16 SwFEShell::GetPhyPageNum() @@ -388,15 +369,12 @@ sal_uInt16 SwFEShell::GetVirtPageNum( const sal_Bool bCalcFrm ) |* void SwFEShell::SetPageOffset() |* sal_uInt16 SwFEShell::GetPageOffset() const |* -|* Ersterstellung OK 07.07.93 08:20 -|* Letzte Aenderung MA 30. Mar. 95 -|* *************************************************************************/ void lcl_SetAPageOffset( sal_uInt16 nOffset, SwPageFrm* pPage, SwFEShell* pThis ) { pThis->StartAllAction(); - ASSERT( pPage->FindFirstBodyCntnt(), + OSL_ENSURE( pPage->FindFirstBodyCntnt(), "SwFEShell _SetAPageOffset() ohne CntntFrm" ); SwFmtPageDesc aDesc( pPage->GetPageDesc() ); @@ -466,9 +444,6 @@ sal_uInt16 SwFEShell::GetPageOffset() const |* |* SwFEShell::InsertLabel() |* -|* Ersterstellung MA 10. Feb. 94 -|* Letzte Aenderung MA 10. Feb. 94 -|* *************************************************************************/ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const String& rSeparator, @@ -495,7 +470,6 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const //Bei Flys den Index auf den StartNode herunterreichen. nIdx = pCnt->FindFlyFrm()-> GetFmt()->GetCntnt().GetCntntIdx()->GetIndex(); -//warum?? Bug 61913 ParkCrsr( GetCrsr()->GetPoint()->nNode ); } break; case LTYPE_TABLE: @@ -514,7 +488,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const const SdrMarkList& rMrkList = pDView->GetMarkedObjectList(); StartUndo(); - // OD 27.11.2003 #112045# - copy marked drawing objects to + // copy marked drawing objects to // local list to perform the corresponding action for each object std::vector<SdrObject*> aDrawObjs; { @@ -544,7 +518,7 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const } break; default: - ASSERT( !this, "Crsr weder in Tabelle noch in Fly." ); + OSL_ENSURE( !this, "Crsr weder in Tabelle noch in Fly." ); } if( nIdx ) @@ -564,8 +538,6 @@ void SwFEShell::InsertLabel( const SwLabelType eType, const String &rTxt, const /*********************************************************************** #* Class : SwFEShell #* Methoden : Sort -#* Datum : ?? -#* Update : ?? #***********************************************************************/ sal_Bool SwFEShell::Sort(const SwSortOptions& rOpt) @@ -581,7 +553,7 @@ sal_Bool SwFEShell::Sort(const SwSortOptions& rOpt) // Tabelle sortieren // pruefe ob vom aktuellen Crsr der SPoint/Mark in einer Tabelle stehen SwFrm *pFrm = GetCurrFrm( sal_False ); - ASSERT( pFrm->FindTabFrm(), "Crsr nicht in Tabelle." ); + OSL_ENSURE( pFrm->FindTabFrm(), "Crsr nicht in Tabelle." ); // lasse ueber das Layout die Boxen suchen SwSelBoxes aBoxes; @@ -593,7 +565,7 @@ sal_Bool SwFEShell::Sort(const SwSortOptions& rOpt) while( !pFrm->IsCellFrm() ) pFrm = pFrm->GetUpper(); { - /* #107993# ParkCursor->ParkCursorTab */ + /* ParkCursor->ParkCursorTab */ ParkCursorInTab(); } @@ -642,9 +614,6 @@ sal_Bool SwFEShell::Sort(const SwSortOptions& rOpt) |* |* SwFEShell::GetCurColNum(), _GetColNum() |* -|* Ersterstellung MA 03. Feb. 95 -|* Letzte Aenderung MA 20. Apr. 95 -| |*************************************************************************/ sal_uInt16 SwFEShell::_GetCurColNum( const SwFrm *pFrm, @@ -692,7 +661,7 @@ sal_uInt16 SwFEShell::_GetCurColNum( const SwFrm *pFrm, sal_uInt16 SwFEShell::GetCurColNum( SwGetCurColNumPara* pPara ) const { - ASSERT( GetCurrFrm(), "Crsr geparkt?" ); + OSL_ENSURE( GetCurrFrm(), "Crsr geparkt?" ); return _GetCurColNum( GetCurrFrm(), pPara ); } @@ -700,12 +669,12 @@ sal_uInt16 SwFEShell::GetCurOutColNum( SwGetCurColNumPara* pPara ) const { sal_uInt16 nRet = 0; SwFrm* pFrm = GetCurrFrm(); - ASSERT( pFrm, "Crsr geparkt?" ); + OSL_ENSURE( pFrm, "Crsr geparkt?" ); if( pFrm ) { pFrm = pFrm->IsInTab() ? (SwFrm*)pFrm->FindTabFrm() : (SwFrm*)pFrm->FindSctFrm(); - ASSERT( pFrm, "No Tab, no Sect" ); + OSL_ENSURE( pFrm, "No Tab, no Sect" ); if( pFrm ) nRet = _GetCurColNum( pFrm, pPara ); } @@ -730,11 +699,11 @@ SwFEShell::~SwFEShell() delete pChainTo; } -// OD 18.09.2003 #i17567#, #108749#, #110354# - adjustments for allowing +// #i17567# - adjustments for allowing // negative vertical positions for fly frames anchored to paragraph/to character. -// OD 06.11.2003 #i22305# - adjustments for option 'Follow text flow' +// #i22305# - adjustments for option 'Follow text flow' // for to frame anchored objects. -// OD 12.11.2003 #i22341# - adjustments for vertical alignment at top of line +// #i22341# - adjustments for vertical alignment at top of line // for to character anchored objects. void SwFEShell::CalcBoundRect( SwRect& _orRect, const RndStdIds _nAnchorId, @@ -922,7 +891,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, aPos = pFrm->Frm().TopRight(); else aPos = (pFrm->Frm().*fnRect->fnGetPos)(); - // OD 08.09.2003 #i17567#, #108749#, #110354# - allow negative positions + // #i17567# - allow negative positions // for fly frames anchor to paragraph/to character. if ((_nAnchorId == FLY_AT_PARA) || (_nAnchorId == FLY_AT_CHAR)) { @@ -931,7 +900,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, // and vertically by the printing area of the vertical environment, // if the object follows the text flow, or by the frame area of the // vertical environment, if the object doesn't follow the text flow. - // OD 29.10.2003 #113049# - new class <SwEnvironmentOfAnchoredObject> + // new class <SwEnvironmentOfAnchoredObject> objectpositioning::SwEnvironmentOfAnchoredObject aEnvOfObj( _bFollowTextFlow ); const SwLayoutFrm& rHoriEnvironLayFrm = @@ -944,7 +913,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, { aVertEnvironRect = rVertEnvironLayFrm.Prt(); aVertEnvironRect.Pos() += rVertEnvironLayFrm.Frm().Pos(); - // OD 19.09.2003 #i18732# - adjust vertical 'virtual' anchor position + // #i18732# - adjust vertical 'virtual' anchor position // (<aPos.Y()> respectively <aPos.X()>), if object is vertical aligned // to page areas. if ( _eVertRelOrient == text::RelOrientation::PAGE_FRAME || _eVertRelOrient == text::RelOrientation::PAGE_PRINT_AREA ) @@ -968,7 +937,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, } else { - ASSERT( rVertEnvironLayFrm.IsPageFrm(), + OSL_ENSURE( rVertEnvironLayFrm.IsPageFrm(), "<SwFEShell::CalcBoundRect(..)> - not following text flow, but vertical environment *not* page!" ); aVertEnvironRect = rVertEnvironLayFrm.Frm(); // OD 19.09.2003 #i18732# - adjustment vertical 'virtual' anchor position @@ -1013,7 +982,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, } } - // OD 12.11.2003 #i22341# - adjust vertical 'virtual' anchor position + // #i22341# - adjust vertical 'virtual' anchor position // (<aPos.Y()> respectively <aPos.X()>), if object is anchored to // character and vertical aligned at character or top of line // --> OD 2005-12-29 #125800# @@ -1323,9 +1292,7 @@ Size SwFEShell::GetGraphicDefaultSize() const } return aRet; } -/* -----------------------------12.08.2002 12:51------------------------------ - ---------------------------------------------------------------------------*/ // --> OD 2009-08-31 #mongolianlayou# // add output parameter <bVertL2R> sal_Bool SwFEShell::IsFrmVertical(const sal_Bool bEnvironment, sal_Bool& bRTL, sal_Bool& bVertL2R) const @@ -1341,33 +1308,27 @@ sal_Bool SwFEShell::IsFrmVertical(const sal_Bool bEnvironment, sal_Bool& bRTL, s return bVert; SdrObject* pObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj(); - // --> OD 2006-01-06 #123831# - make code robust: if ( !pObj ) { - ASSERT( false, + OSL_ENSURE( false, "<SwFEShell::IsFrmVertical(..)> - missing SdrObject instance in marked object list -> This is a serious situation, please inform OD" ); return bVert; } - // <-- - // OD 2004-03-29 #i26791# + // #i26791# SwContact* pContact = static_cast<SwContact*>(GetUserCall( pObj )); - // --> OD 2006-01-06 #123831# - make code robust: if ( !pContact ) { - ASSERT( false, + OSL_ENSURE( false, "<SwFEShell::IsFrmVertical(..)> - missing SwContact instance at marked object -> This is a serious situation, please inform OD" ); return bVert; } - // <-- const SwFrm* pRef = pContact->GetAnchoredObj( pObj )->GetAnchorFrm(); - // --> OD 2006-01-06 #123831# - make code robust: if ( !pRef ) { - ASSERT( false, + OSL_ENSURE( false, "<SwFEShell::IsFrmVertical(..)> - missing anchor frame at marked object -> This is a serious situation, please inform OD" ); return bVert; } - // <-- if ( pObj->ISA(SwVirtFlyDrawObj) && !bEnvironment ) pRef = static_cast<const SwVirtFlyDrawObj*>(pObj)->GetFlyFrm(); @@ -1386,3 +1347,4 @@ void SwFEShell::MoveObjectIfActive( svt::EmbeddedObjectRef&, const Point& ) // does not do anything, only avoids crash if the method is used for wrong shell } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |