diff options
author | Philipp Riemer <ruderphilipp@gmail.com> | 2014-02-15 21:05:14 +0100 |
---|---|---|
committer | Philipp Riemer <ruderphilipp@gmail.com> | 2014-02-15 21:22:50 +0100 |
commit | 0ffc090d80707017f5f590c43be6c25184298a93 (patch) | |
tree | 11824c63dd912d3f9194464721e51aba747f4bad | |
parent | d024fe60dcb402e7ed8c8fa0ef623176f03c62c0 (diff) |
fdo#62475 - remove visual noise
- remove "borders"
- move method explanations if misplaced
- rewrite for Doxygen if needed
- "shrink" multiple blank lines
Change-Id: Ia4678b7f2456de70eb307e9c0d80c4ecd068048b
38 files changed, 324 insertions, 2516 deletions
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx index f88690bde9b8..6f840983dc76 100644 --- a/sw/source/core/layout/anchoreddrawobject.cxx +++ b/sw/source/core/layout/anchoreddrawobject.cxx @@ -32,10 +32,8 @@ using namespace ::com::sun::star; -// ============================================================================ // helper class for correct notification due to the positioning of // the anchored drawing object -// ============================================================================ class SwPosNotify { private: @@ -121,10 +119,8 @@ Point SwPosNotify::LastObjPos() const return maOldObjRect.Pos(); } -// ============================================================================ // #i32795# // helper class for oscillation control on object positioning -// ============================================================================ class SwObjPosOscillationControl { private: @@ -192,9 +188,8 @@ bool SwObjPosOscillationControl::OscillationDetected() return bOscillationDetected; } -// ============================================================================ -// implementation of class <SwAnchoredDrawObject> -// ============================================================================ +// class <SwAnchoredDrawObject> + TYPEINIT1(SwAnchoredDrawObject,SwAnchoredObject); SwAnchoredDrawObject::SwAnchoredDrawObject() : @@ -247,10 +242,6 @@ bool SwAnchoredDrawObject::IsOutsidePage() const return bOutsidePage; } -// ============================================================================= -// #i26791# - implementation of pure virtual method declared in -// base class <SwAnchoredObject> -// ============================================================================= void SwAnchoredDrawObject::MakeObjPos() { if ( IsPositioningInProgress() ) @@ -848,6 +839,4 @@ void SwAnchoredDrawObject::RegisterAtCorrectPage() } } -// ============================================================================= - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx index e1118238fa1a..6abe4335a066 100644 --- a/sw/source/core/layout/anchoredobject.cxx +++ b/sw/source/core/layout/anchoredobject.cxx @@ -30,14 +30,11 @@ // --> #i35911# #include <layouter.hxx> - using namespace ::com::sun::star; - -// ============================================================================ // --> #i28701# - // implementation of helper class <SwObjPositioningInProgress> -// ============================================================================ + SwObjPositioningInProgress::SwObjPositioningInProgress( SdrObject& _rSdrObj ) : mpAnchoredObj( 0L ), // --> #i52904# @@ -67,7 +64,7 @@ SwObjPositioningInProgress::~SwObjPositioningInProgress() } } -// ============================================================================ +// SwAnchoredObject TYPEINIT0(SwAnchoredObject); @@ -112,9 +109,6 @@ SwAnchoredObject::~SwAnchoredObject() ClearVertPosOrientFrm(); } -// ============================================================================= -// accessors for member <mpDrawObj> -// ============================================================================= void SwAnchoredObject::SetDrawObj( SdrObject& _rDrawObj ) { mpDrawObj = &_rDrawObj; @@ -130,9 +124,6 @@ SdrObject* SwAnchoredObject::DrawObj() return mpDrawObj; } -// ============================================================================= -// accessors for member <mpAnchorFrm> -// ============================================================================= const SwFrm* SwAnchoredObject::GetAnchorFrm() const { return mpAnchorFrm; @@ -174,9 +165,6 @@ SwFrm* SwAnchoredObject::GetAnchorFrmContainingAnchPos() return pAnchorFrmContainingAnchPos; } -// ============================================================================= -// #i28701# accessors for member <mpPageFrm> -// ============================================================================= SwPageFrm* SwAnchoredObject::GetPageFrm() { return mpPageFrm; @@ -205,9 +193,6 @@ void SwAnchoredObject::SetPageFrm( SwPageFrm* _pNewPageFrm ) } } -// ============================================================================= -// accessors for member <maLastCharRect> -// ============================================================================= const SwRect& SwAnchoredObject::GetLastCharRect() const { return maLastCharRect; @@ -232,9 +217,7 @@ void SwAnchoredObject::ResetLastCharRectHeight() { maLastCharRect.Height( 0 ); } -// ============================================================================= -// accessors for member <mpVertPosOrientFrm> -// ============================================================================= + void SwAnchoredObject::SetVertPosOrientFrm( const SwLayoutFrm& _rVertPosOrientFrm ) { ClearVertPosOrientFrm(); @@ -248,9 +231,6 @@ void SwAnchoredObject::SetVertPosOrientFrm( const SwLayoutFrm& _rVertPosOrientFr RegisterAtCorrectPage(); } -// ============================================================================= -// accessors for member <mnLastTopOfLine> -// ============================================================================= SwTwips SwAnchoredObject::GetLastTopOfLine() const { return mnLastTopOfLine; @@ -554,9 +534,6 @@ bool SwAnchoredObject::ConsiderObjWrapInfluenceOfOtherObjs() const return bRet; } -// ============================================================================= -// --> #i28701# - accessors to booleans for layout process -// ============================================================================= bool SwAnchoredObject::ConsiderForTextWrap() const { if ( ConsiderObjWrapInfluenceOnObjPos() ) diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 690538b328c3..7ee281dfc142 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -1102,7 +1102,6 @@ bool SwFmtCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) return bRet; } - // class SwFmtSurround // Partially implemented inline in hxx @@ -1325,7 +1324,6 @@ bool SwFmtVertOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) } - // class SwFmtHoriOrient // Partially implemented inline in hxx @@ -1422,8 +1420,6 @@ bool SwFmtHoriOrient::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) return bRet; } - - // class SwFmtAnchor // Partially implemented inline in hxx @@ -1634,7 +1630,6 @@ bool SwFmtAnchor::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) // class SwFmtURL // Partially implemented inline in hxx - SwFmtURL::SwFmtURL() : SfxPoolItem( RES_URL ), pMap( 0 ), @@ -1792,7 +1787,6 @@ bool SwFmtURL::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) return bRet; } - // class SwNoReadOnly SfxPoolItem* SwFmtEditInReadonly::Clone( SfxItemPool* ) const @@ -1814,7 +1808,6 @@ SfxPoolItem* SwFmtRowSplit::Clone( SfxItemPool* ) const return new SwFmtRowSplit( GetValue() ); } - // class SwFmtNoBalancedColumns SfxPoolItem* SwFmtNoBalancedColumns::Clone( SfxItemPool* ) const @@ -1955,7 +1948,6 @@ bool SwFmtFtnEndAtTxtEnd::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) return bRet; } - // class SwFmtFtnAtTxtEnd SfxPoolItem* SwFmtFtnAtTxtEnd::Clone( SfxItemPool* ) const @@ -1976,7 +1968,6 @@ SfxPoolItem* SwFmtEndAtTxtEnd::Clone( SfxItemPool* ) const //class SwFmtChain - bool SwFmtChain::operator==( const SfxPoolItem &rAttr ) const { OSL_ENSURE( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" ); @@ -2040,9 +2031,6 @@ bool SwFmtChain::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const return bRet; } - - - //class SwFmtLineNumber SwFmtLineNumber::SwFmtLineNumber() : @@ -2118,9 +2106,7 @@ bool SwFmtLineNumber::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) return bRet; } -/************************************************************************* - * class SwTextGridItem - *************************************************************************/ +// class SwTextGridItem SwTextGridItem::SwTextGridItem() : SfxPoolItem( RES_TEXTGRID ), aColor( COL_LIGHTGRAY ), nLines( 20 ), @@ -2406,6 +2392,7 @@ void SwTextGridItem::Init() //} } } + // class SwHeaderAndFooterEatSpacingItem SfxPoolItem* SwHeaderAndFooterEatSpacingItem::Clone( SfxItemPool* ) const @@ -2413,7 +2400,6 @@ SfxPoolItem* SwHeaderAndFooterEatSpacingItem::Clone( SfxItemPool* ) const return new SwHeaderAndFooterEatSpacingItem( Which(), GetValue() ); } - // class SwFrmFmt // Partially implemented inline in hxx @@ -2468,7 +2454,6 @@ void SwFrmFmt::RegisterToFormat( SwFmt& rFmt ) } //Deletes all Frms which are registered in aDepend. - void SwFrmFmt::DelFrms() { SwIterator<SwFrm,SwFmt> aIter( *this ); @@ -2485,8 +2470,6 @@ void SwFrmFmt::MakeFrms() OSL_ENSURE( !this, "Sorry not implemented." ); } - - SwRect SwFrmFmt::FindLayoutRect( const sal_Bool bPrtArea, const Point* pPoint, const sal_Bool bCalcFrm ) const { @@ -2561,7 +2544,6 @@ SdrObject* SwFrmFmt::FindRealSdrObject() return FindSdrObject(); } - sal_Bool SwFrmFmt::IsLowerOf( const SwFrmFmt& rFmt ) const { //Also linking from inside to outside or from outside to inside is not @@ -2668,7 +2650,6 @@ SwFlyFrmFmt::~SwFlyFrmFmt() //Creates the Frms if the format describes a paragraph-bound frame. //MA: 1994-02-14, creates the Frms also for frames anchored at page. - void SwFlyFrmFmt::MakeFrms() { // is there a layout? @@ -2861,7 +2842,6 @@ SwAnchoredObject* SwFlyFrmFmt::GetAnchoredObj( const Point* pPoint, const sal_Bo } } - bool SwFlyFrmFmt::GetInfo( SfxPoolItem& rInfo ) const { bool bRet = true; @@ -3077,6 +3057,7 @@ SwHandleAnchorNodeChg::~SwHandleAnchorNodeChg() mrFlyFrmFmt.MakeFrms(); } } + // class SwDrawFrmFmt // Partially implemented inline in hxx diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index fed131697854..a09eedcb02ed 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -42,19 +42,9 @@ // #i36347# #include <flyfrms.hxx> -//------------------------------------------------------------------------ -// Move methods -//------------------------------------------------------------------------ - -/************************************************************************* -|* -|* SwCntntFrm::ShouldBwdMoved() -|* -|* Description Return value tells whether the Frm should be moved. -|* -|*************************************************************************/ - +// Move methods +/// Return value tells whether the Frm should be moved. sal_Bool SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool & ) { if ( (SwFlowFrm::IsMoveBwdJump() || !IsPrevObjMove())) @@ -213,27 +203,8 @@ sal_Bool SwCntntFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool return sal_False; } -//------------------------------------------------------------------------ -// Calc methods -//------------------------------------------------------------------------ - -/************************************************************************* -|* -|* SwFrm::Prepare() -|* -|* Description: Prepares the Frm for "formatting" (MakeAll()). -|* This method serves to save stack space: To calculate the position -|* of the Frm we have to make sure that the positions of Upper and Prev -|* respectively are valid. This may require a recursive call (a loop -|* would be quite expensive, as it's not required very often). -|* Every call of MakeAll requires around 500 bytes on the stack - you -|* easily see where this leads. _Prepare requires only a little bit of -|* stack space, so the recursive call should not be a problem here. -|* Another advantage is that one nice day, _Prepare and with it -|* the formatting of predecessors could be avoided. Then it could -|* probably be possible to jump "quickly" to the document's end. -|* -|*************************************************************************/ +// Calc methods + // Two little friendships form a secret society inline void PrepareLock( SwFlowFrm *pTab ) { @@ -256,6 +227,23 @@ static bool lcl_IsCalcUpperAllowed( const SwFrm& rFrm ) !( rFrm.IsTabFrm() && rFrm.GetUpper()->IsInTab() ); } +/** Prepares the Frame for "formatting" (MakeAll()). + * + * This method serves to save stack space: To calculate the position of the Frm + * we have to make sure that the positions of Upper and Prev respectively are + * valid. This may require a recursive call (a loop would be quite expensive, + * as it's not required very often). + * + * Every call of MakeAll requires around 500 bytes on the stack - you easily + * see where this leads to. This method requires only a little bit of stack + * space, so the recursive call should not be a problem here. + * + * Another advantage is that one nice day, this method and with it the + * formatting of predecessors could be avoided. Then it could probably be + * possible to jump "quickly" to the document's end. + * + * @see MakeAll() + */ void SwFrm::PrepareMake() { StackHack aHack; @@ -382,8 +370,6 @@ void SwFrm::OptPrepareMake() } } - - void SwFrm::PrepareCrsr() { StackHack aHack; @@ -461,12 +447,6 @@ void SwFrm::PrepareCrsr() Calc(); } -/************************************************************************* -|* -|* SwFrm::MakePos() -|* -|*************************************************************************/ - // Here we return GetPrev(); however we will ignore empty SectionFrms static SwFrm* lcl_Prev( SwFrm* pFrm, bool bSectPrv = true ) { @@ -631,11 +611,6 @@ void SwFrm::MakePos() } } -/************************************************************************* -|* -|* SwPageFrm::MakeAll() -|* -|*************************************************************************/ // #i28701# - new type <SwSortedObjs> static void lcl_CheckObjects( SwSortedObjs* pSortedObjs, SwFrm* pFrm, long& rBot ) { @@ -810,13 +785,6 @@ void SwPageFrm::MakeAll() "Upper (Root) must be wide enough to contain the widest page"); } -/************************************************************************* -|* -|* SwLayoutFrm::MakeAll() -|* -|*************************************************************************/ - - void SwLayoutFrm::MakeAll() { PROTOCOL_ENTER( this, PROT_MAKEALL, 0, 0 ) @@ -894,11 +862,6 @@ void SwLayoutFrm::MakeAll() delete pAccess; } -/************************************************************************* -|* -|* SwCntntFrm::MakePrtArea() -|* -|*************************************************************************/ bool SwTxtNode::IsCollapse() const { if (GetDoc()->get( IDocumentSettingAccess::COLLAPSE_EMPTY_CELL_PARA ) @@ -1064,12 +1027,6 @@ sal_Bool SwCntntFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) return bSizeChgd; } -/************************************************************************* -|* -|* SwCntntFrm::MakeAll() -|* -|*************************************************************************/ - #define STOP_FLY_FORMAT 10 // - loop prevention const int cnStopFormat = 15; @@ -1704,7 +1661,6 @@ void SwCntntFrm::MakeAll() } //while ( !mbValidPos || !mbValidSize || !mbValidPrtArea ) - // NEW: Looping Louie (Light). Should not be applied in balanced sections. // Should only be applied if there is no better solution! LOOPING_LOUIE_LIGHT( bMovedFwd && bMovedBwd && !IsInBalancedSection() && @@ -1736,15 +1692,6 @@ void SwCntntFrm::MakeAll() SetFlyLock( sal_False ); } -/************************************************************************* -|* -|* SwCntntFrm::_WouldFit() -|* -|*************************************************************************/ - - - - void MakeNxt( SwFrm *pFrm, SwFrm *pNxt ) { // fix(25455): Validate, otherwise this leads to a recursion. @@ -1794,7 +1741,6 @@ void MakeNxt( SwFrm *pFrm, SwFrm *pNxt ) // This routine checks whether there are no other FtnBosses // between the pFrm's FtnBoss and the pNxt's FtnBoss. - static bool lcl_IsNextFtnBoss( const SwFrm *pFrm, const SwFrm* pNxt ) { OSL_ENSURE( pFrm && pNxt, "lcl_IsNextFtnBoss: No Frames?" ); @@ -1810,7 +1756,6 @@ static bool lcl_IsNextFtnBoss( const SwFrm *pFrm, const SwFrm* pNxt ) return ( pFrm && pNxt && pFrm->GetNext() == pNxt ); } -// sal_Bool SwCntntFrm::_WouldFit( SwTwips nSpace, SwLayoutFrm *pNewUpper, sal_Bool bTstMove, diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx index 5088bf3e591b..34d8baa1bbb2 100644 --- a/sw/source/core/layout/colfrm.cxx +++ b/sw/source/core/layout/colfrm.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <editeng/ulspitem.hxx> #include <fmtclds.hxx> #include <fmtfordr.hxx> @@ -33,12 +32,6 @@ // ftnfrm.cxx: void sw_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes ); - -/************************************************************************* -|* -|* SwColumnFrm::SwColumnFrm() -|* -|*************************************************************************/ SwColumnFrm::SwColumnFrm( SwFrmFmt *pFmt, SwFrm* pSib ): SwFtnBossFrm( pFmt, pSib ) { @@ -61,12 +54,6 @@ SwColumnFrm::~SwColumnFrm() } } -/************************************************************************* -|* -|* SwLayoutFrm::ChgColumns() -|* -|*************************************************************************/ - static void lcl_RemoveColumns( SwLayoutFrm *pCont, sal_uInt16 nCnt ) { OSL_ENSURE( pCont && pCont->Lower() && pCont->Lower()->IsColumnFrm(), @@ -106,7 +93,6 @@ static SwLayoutFrm * lcl_FindColumns( SwLayoutFrm *pLay, sal_uInt16 nCount ) return 0; } - static sal_Bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount ) { SwDoc *pDoc = pCont->GetFmt()->GetDoc(); @@ -174,14 +160,16 @@ static sal_Bool lcl_AddColumns( SwLayoutFrm *pCont, sal_uInt16 nCount ) return bRet; } -/*-------------------------------------------------- - * ChgColumns() adds or removes columns from a layoutframe. +/** add or remove columns from a layoutframe. + * * Normally, a layoutframe with a column attribut of 1 or 0 columns contains * no columnframe. However, a sectionframe with "footnotes at the end" needs - * a columnframe. If the bChgFtn-flag is set, the columnframe will be inserted - * or remove, if necessary. - * --------------------------------------------------*/ - + * a columnframe. + * + * @param rOld + * @param rNew + * @param bChgFtn if true, the columnframe will be inserted or removed, if necessary. + */ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew, const sal_Bool bChgFtn ) { @@ -292,12 +280,6 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew, } } -/************************************************************************* -|* -|* SwLayoutFrm::AdjustColumns() -|* -|*************************************************************************/ - void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttributes ) { if( !Lower()->GetNext() ) @@ -446,8 +428,4 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttribut } } - - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index f8b52eef8f26..4f4627279f6d 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -199,8 +199,7 @@ public: void ChkStream() { if( !pStream ) NewStream(); } }; -/* -------------------------------------------------- - * Through the PROTOCOL_ENTER macro a SwEnterLeave object gets created. If the +/* Through the PROTOCOL_ENTER macro a SwEnterLeave object gets created. If the * current function should be logged a SwImplEnterLeace object gets created. * The funny thing here is, that the Ctor of the Impl object is automatically * called at the beginning of the function and the Dtor is automatically called @@ -209,7 +208,7 @@ public: * It's possible to derive from this class, for example to be able to document * frame resize while leaving a function. To do this, one only needs to add the * desired SwImplEnterLeave class in SwEnterLeave::Ctor(). - * --------------------------------------------------*/ + */ class SwImplEnterLeave { @@ -341,10 +340,7 @@ SwImplProtocol::~SwImplProtocol() aVars.clear(); } -/* -------------------------------------------------- - * SwImplProtocol::CheckLine analyzes a line in the INI file - * --------------------------------------------------*/ - +/// analyze a line in the INI file void SwImplProtocol::CheckLine( OString& rLine ) { rLine = rLine.toAsciiLowerCase(); // upper/lower case is the same @@ -444,10 +440,7 @@ void SwImplProtocol::CheckLine( OString& rLine ) while ( nIndex >= 0 ); } -/* -------------------------------------------------- - * SwImplProtocol::FileInit() reads the file "dbg_lay.ini" - * in the current directory and evaluates it. - * --------------------------------------------------*/ +/// read the file "dbg_lay.ini" in the current directory and evaluate it. void SwImplProtocol::FileInit() { OUString aName("dbg_lay.ini"); @@ -476,10 +469,7 @@ void SwImplProtocol::FileInit() aStream.Close(); } -/* -------------------------------------------------- - * lcl_Start enables indentation by two spaces during ACT_START and disables - * it again at ACT_END. - * --------------------------------------------------*/ +/// enable indentation by two spaces during ACT_START and disable it again at ACT_END. static void lcl_Start(OStringBuffer& rOut, OStringBuffer& rLay, sal_uLong nAction) { if( nAction == ACT_START ) @@ -498,11 +488,8 @@ static void lcl_Start(OStringBuffer& rOut, OStringBuffer& rLay, sal_uLong nActio } } -/* -------------------------------------------------- - * lcl_Flags outputs the ValidSize-, ValidPos- and ValidPrtArea-Flag ("Sz","Ps","PA") - * of the frame; "+" stands for valid, "-" stands for invalid. - * --------------------------------------------------*/ - +/// output the ValidSize-, ValidPos- and ValidPrtArea-Flag ("Sz","Ps","PA") +/// of the frame; "+" stands for valid, "-" stands for invalid. static void lcl_Flags(OStringBuffer& rOut, const SwFrm* pFrm) { rOut.append(" Sz"); @@ -513,10 +500,7 @@ static void lcl_Flags(OStringBuffer& rOut, const SwFrm* pFrm) rOut.append(pFrm->GetValidPrtAreaFlag() ? '+' : '-'); } -/* -------------------------------------------------- - * lcl_FrameType outputs the type of the frame as clear text. - * --------------------------------------------------*/ - +/// output the type of the frame as plain text. static void lcl_FrameType( OStringBuffer& rOut, const SwFrm* pFrm ) { if( pFrm->IsTxtFrm() ) @@ -562,12 +546,12 @@ static void lcl_FrameType( OStringBuffer& rOut, const SwFrm* pFrm ) rOut.append("Not impl. "); } -/* -------------------------------------------------- - * SwImplProtocol::Record(..) is only called if the PROTOCOL macro finds out, - * that this function should be recorded ( SwProtocol::nRecord ). +/** + * Is only called if the PROTOCOL macro finds out, + * that this function should be recorded ( @see{SwProtocol::nRecord} ). + * * In this method we also check if FrmId and frame type should be logged. - * --------------------------------------------------*/ - + */ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong nAct, void* pParam ) { sal_uInt16 nSpecial = 0; @@ -728,11 +712,7 @@ void SwImplProtocol::_Record( const SwFrm* pFrm, sal_uLong nFunction, sal_uLong SwProtocol::SetRecord( 0 ); // => end f logging } -/* -------------------------------------------------- - * SwImplProtocol::SectFunc(...) is called from SwImplProtocol::_Record(..) - * here we handle the output of the SectionFrms. - * --------------------------------------------------*/ - +/// Handle the output of the SectionFrms. void SwImplProtocol::SectFunc(OStringBuffer &rOut, const SwFrm* , sal_uLong nAct, void* pParam) { bool bTmp = false; @@ -760,12 +740,13 @@ void SwImplProtocol::SectFunc(OStringBuffer &rOut, const SwFrm* , sal_uLong nAct } } -/* -------------------------------------------------- - * SwImplProtocol::InsertFrm(..) takes a new FrmId for logging; if pFrmIds==NULL - * all are going to be logged but as soon as pFrmIds are set through - * InsertFrm(..) only the added FrmIds are being logged. - * --------------------------------------------------*/ - +/** + * if pFrmIds==NULL all Frames will be logged. But as soon as pFrmIds are + * set, only the added FrmIds are being logged. + * + * @param nId new FrmId for logging + * @return TRUE if newly added, FALSE if FrmId is already under control + */ bool SwImplProtocol::InsertFrm( sal_uInt16 nId ) { if( !pFrmIds ) @@ -776,10 +757,7 @@ bool SwImplProtocol::InsertFrm( sal_uInt16 nId ) return true; } -/* -------------------------------------------------- - * SwImplProtocol::DeleteFrm(..) removes a FrmId from the pFrmIds array, so they - * won't be logged anymore. - * --------------------------------------------------*/ +/// Removes a FrmId from the pFrmIds array, so that it won't be logged anymore. bool SwImplProtocol::DeleteFrm( sal_uInt16 nId ) { if( !pFrmIds ) @@ -789,12 +767,11 @@ bool SwImplProtocol::DeleteFrm( sal_uInt16 nId ) return false; } -/* -------------------------------------------------- - * SwEnterLeave::Ctor(..) is called from the (inline-)CTor if the function should +/* SwEnterLeave::Ctor(..) is called from the (inline-)CTor if the function should * be logged. * The task here is to find the right SwImplEnterLeave object based on the * function; everything else is then done in his Ctor/Dtor. - * --------------------------------------------------*/ + */ void SwEnterLeave::Ctor( const SwFrm* pFrm, sal_uLong nFunc, sal_uLong nAct, void* pPar ) { switch( nFunc ) @@ -810,12 +787,10 @@ void SwEnterLeave::Ctor( const SwFrm* pFrm, sal_uLong nFunc, sal_uLong nAct, voi pImpl->Enter(); } -/* -------------------------------------------------- - * SwEnterLeave::Dtor() only calls the Dtor of the SwImplEnterLeave object. It's +/* SwEnterLeave::Dtor() only calls the Dtor of the SwImplEnterLeave object. It's * just no inline because we don't want the SwImplEnterLeave definition inside * dbg_lay.hxx. - * --------------------------------------------------*/ - + */ void SwEnterLeave::Dtor() { if( pImpl ) diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index 32aee617d33a..98b2bad73c79 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -32,13 +32,7 @@ #include <txtfrm.hxx> #include <switerator.hxx> -/************************************************************************* -|* -|* FindBodyCont, FindLastBodyCntnt() -|* -|* Description Searches the first/last CntntFrm in BodyText below the page. -|* -|*************************************************************************/ +/// Searches the first CntntFrm in BodyText below the page. SwLayoutFrm *SwFtnBossFrm::FindBodyCont() { SwFrm *pLay = Lower(); @@ -47,6 +41,7 @@ SwLayoutFrm *SwFtnBossFrm::FindBodyCont() return (SwLayoutFrm*)pLay; } +/// Searches the last CntntFrm in BodyText below the page. SwCntntFrm *SwPageFrm::FindLastBodyCntnt() { SwCntntFrm *pRet = FindFirstBodyCntnt(); @@ -58,16 +53,10 @@ SwCntntFrm *SwPageFrm::FindLastBodyCntnt() return pRet; } -/************************************************************************* -|* -|* SwLayoutFrm::ContainsCntnt -|* -|* Description Checks if the frame contains one or more CntntFrm's -|* anywhere in his subsidiary structure; if so the first found CntntFrm -|* is returned -|* -|*************************************************************************/ - +/** + * Checks if the frame contains one or more CntntFrm's anywhere in his + * subsidiary structure; if so the first found CntntFrm is returned. + */ const SwCntntFrm *SwLayoutFrm::ContainsCntnt() const { //Search downwards the layout leaf and if there is no content, jump to the @@ -109,16 +98,11 @@ const SwCntntFrm *SwLayoutFrm::ContainsCntnt() const return 0; } -/************************************************************************* -|* -|* SwLayoutFrm::FirstCell -|* -|* Description Calls ContainsAny first to reach the innermost cell. From -|* there we walk back up to the first SwCellFrm. Since we use -|* SectionFrms ContainsCntnt()->GetUpper() is not enough any -|* more. -|*************************************************************************/ - +/** + * Calls ContainsAny first to reach the innermost cell. From there we walk back + * up to the first SwCellFrm. Since we use SectionFrms, ContainsCntnt()->GetUpper() + * is not enough anymore. + */ const SwCellFrm *SwLayoutFrm::FirstCell() const { const SwFrm* pCnt = ContainsAny(); @@ -127,17 +111,11 @@ const SwCellFrm *SwLayoutFrm::FirstCell() const return (const SwCellFrm*)pCnt; } -/************************************************************************* -|* -|* SwLayoutFrm::ContainsAny -|* -|* like ComtainsCntnt, but does not only return CntntFrms but -|* also sections and tables. -|*************************************************************************/ - -// #130797# -// New parameter <_bInvestigateFtnForSections> controls investigation of -// content of footnotes for sections. +/** return CntntFrms, sections, and tables. + * + * @param _bInvestigateFtnForSections controls investigation of content of footnotes for sections. + * @see ContainsCntnt + */ const SwFrm *SwLayoutFrm::ContainsAny( const bool _bInvestigateFtnForSections ) const { //Search downwards the layout leaf and if there is no content, jump to the @@ -178,12 +156,6 @@ const SwFrm *SwLayoutFrm::ContainsAny( const bool _bInvestigateFtnForSections ) return 0; } - -/************************************************************************* -|* -|* SwFrm::GetLower() -|* -|*************************************************************************/ const SwFrm* SwFrm::GetLower() const { return IsLayoutFrm() ? ((SwLayoutFrm*)this)->Lower() : 0; @@ -194,11 +166,6 @@ SwFrm* SwFrm::GetLower() return IsLayoutFrm() ? ((SwLayoutFrm*)this)->Lower() : 0; } -/************************************************************************* -|* -|* SwLayoutFrm::IsAnLower() -|* -|*************************************************************************/ sal_Bool SwLayoutFrm::IsAnLower( const SwFrm *pAssumed ) const { const SwFrm *pUp = pAssumed; @@ -274,9 +241,7 @@ bool SwLayoutFrm::IsBefore( const SwLayoutFrm* _pCheckRefLayFrm ) const return bReturn; } -// // Local helper functions for GetNextLayoutLeaf -// static const SwFrm* lcl_FindLayoutFrame( const SwFrm* pFrm, bool bNext ) { @@ -299,18 +264,13 @@ static const SwFrm* lcl_GetLower( const SwFrm* pFrm, bool bFwd ) static_cast<const SwLayoutFrm*>(pFrm)->GetLastLower(); } -/************************************************************************* -|* -|* SwFrm::ImplGetNextLayoutLeaf -|* -|* Finds the next layout leaf. This is a layout frame, which does not +/** + * Finds the next layout leaf. This is a layout frame, which does not * have a lower which is a LayoutFrame. That means, pLower can be 0 or a * content frame. * * However, pLower may be a TabFrm - * -|*************************************************************************/ - + */ const SwLayoutFrm *SwFrm::ImplGetNextLayoutLeaf( bool bFwd ) const { const SwFrm *pFrm = this; @@ -355,22 +315,16 @@ const SwLayoutFrm *SwFrm::ImplGetNextLayoutLeaf( bool bFwd ) const return pLayoutFrm; } - - -/************************************************************************* -|* -|* SwFrm::ImplGetNextCntntFrm( bool ) -|* -|* Walk back inside the tree: grab the subordinate Frm if one exists and -|* the last step was not moving up a level (this would lead to an infinite -|* up/down loop!). With this we ensure that during walking back we search -|* through all sub trees. If we walked downwards we have to go to the end -|* of the chain first because we go backwards from the last Frm inside -|* another Frm. Walking forward works the same. -|*************************************************************************/ - -// Caution: fixes in ImplGetNextCntntFrm() may also need to be applied to the -// lcl_NextFrm(..) method above +/** + * Walk back inside the tree: grab the subordinate Frm if one exists and the + * last step was not moving up a level (this would lead to an infinite up/down + * loop!). With this we ensure that during walking back we search through all + * sub trees. If we walked downwards we have to go to the end of the chain first + * because we go backwards from the last Frm inside another Frm. Walking + * forward works the same. + * + * @warning fixes here may also need to be applied to the @{lcl_NextFrm} method above + */ const SwCntntFrm* SwCntntFrm::ImplGetNextCntntFrm( bool bFwd ) const { const SwFrm *pFrm = this; @@ -410,15 +364,6 @@ const SwCntntFrm* SwCntntFrm::ImplGetNextCntntFrm( bool bFwd ) const return pCntntFrm; } - - - -/************************************************************************* -|* -|* SwFrm::FindRootFrm(), FindTabFrm(), FindFtnFrm(), FindFlyFrm(), -|* FindPageFrm(), FindColFrm() -|* -|*************************************************************************/ SwPageFrm* SwFrm::FindPageFrm() { SwFrm *pRet = this; @@ -606,11 +551,6 @@ const SwPageFrm* SwRootFrm::GetPageAtPos( const Point& rPt, const Size* pSize, b return pRet; } -/************************************************************************* -|* -|* SwFrmFrm::GetAttrSet() -|* -|*************************************************************************/ const SwAttrSet* SwFrm::GetAttrSet() const { if ( IsCntntFrm() ) @@ -1225,14 +1165,8 @@ void SwFrm::InvalidateNextPrtArea() } } -/************************************************************************* -|* -|* lcl_IsInColSect() -|* -|* returns true if the frame _directly_ sits in a section with columns -|* but not if it sits in a table which itself sits in a section with columns. -|*************************************************************************/ - +/// @returns true if the frame _directly_ sits in a section with columns +/// but not if it sits in a table which itself sits in a section with columns. static bool lcl_IsInColSct( const SwFrm *pUp ) { bool bRet = false; @@ -1249,11 +1183,6 @@ static bool lcl_IsInColSct( const SwFrm *pUp ) return false; } -/************************************************************************* -|* -|* SwFrm::IsMoveable(); -|* -|*************************************************************************/ /** determine, if frame is moveable in given environment OD 08.08.2003 #110978# @@ -1264,7 +1193,6 @@ static bool lcl_IsInColSct( const SwFrm *pUp ) @author OD */ - bool SwFrm::IsMoveable( const SwLayoutFrm* _pLayoutFrm ) const { bool bRetVal = false; @@ -1327,11 +1255,6 @@ bool SwFrm::IsMoveable( const SwLayoutFrm* _pLayoutFrm ) const return bRetVal; } -/************************************************************************* -|* -|* SwFrm::SetInfFlags(); -|* -|*************************************************************************/ void SwFrm::SetInfFlags() { if ( !IsFlyFrm() && !GetUpper() ) //not yet pasted, no information available @@ -1364,13 +1287,11 @@ void SwFrm::SetInfFlags() } while ( pFrm && !pFrm->IsPageFrm() ); //there is nothing above the page } -/* - * SwFrm::SetDirFlags( sal_Bool ) - * actualizes the vertical or the righttoleft-flags. +/** Updates the vertical or the righttoleft-flags. + * * If the property is derived, it's from the upper or (for fly frames) from * the anchor. Otherwise we've to call a virtual method to check the property. */ - void SwFrm::SetDirFlags( sal_Bool bVert ) { if( bVert ) @@ -1742,9 +1663,6 @@ bool SwFrm::IsInBalancedSection() const return bRet; } -/* - * SwLayoutFrm::GetLastLower() - */ const SwFrm* SwLayoutFrm::GetLastLower() const { const SwFrm* pRet = Lower(); diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index cadb1c208f71..e946819ab779 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -52,14 +52,6 @@ sal_Bool SwFlowFrm::m_bMoveBwdJump = sal_False; - -/************************************************************************* -|* -|* SwFlowFrm::SwFlowFrm() -|* -|*************************************************************************/ - - SwFlowFrm::SwFlowFrm( SwFrm &rFrm ) : m_rThis( rFrm ), m_pFollow( 0 ), @@ -100,13 +92,7 @@ void SwFlowFrm::SetFollow(SwFlowFrm *const pFollow) } } -/************************************************************************* -|* -|* SwFlowFrm::IsFollowLocked() -|* return sal_True if any follow has the JoinLocked flag -|* -|*************************************************************************/ - +/// @return sal_True if any follow has the JoinLocked flag sal_Bool SwFlowFrm::HasLockedFollow() const { const SwFlowFrm* pFrm = GetFollow(); @@ -119,13 +105,6 @@ sal_Bool SwFlowFrm::HasLockedFollow() const return sal_False; } -/************************************************************************* -|* -|* SwFlowFrm::IsKeepFwdMoveAllowed() -|* -|*************************************************************************/ - - sal_Bool SwFlowFrm::IsKeepFwdMoveAllowed() { // If all the predecessors up to the first of the chain have @@ -147,13 +126,6 @@ sal_Bool SwFlowFrm::IsKeepFwdMoveAllowed() return bRet; } -/************************************************************************* -|* -|* SwFlowFrm::CheckKeep() -|* -|*************************************************************************/ - - void SwFlowFrm::CheckKeep() { // Kick off the "last" predecessor with a 'keep' attribute, because @@ -186,12 +158,6 @@ void SwFlowFrm::CheckKeep() pPre->InvalidatePos(); } -/************************************************************************* -|* -|* SwFlowFrm::IsKeep() -|* -|*************************************************************************/ - sal_Bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldKeep ) const { // 1. The keep attribute is ignored inside footnotes @@ -282,13 +248,6 @@ sal_Bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldK return bKeep; } -/************************************************************************* -|* -|* SwFlowFrm::BwdMoveNecessary() -|* -|*************************************************************************/ - - sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRect ) { // The return value helps deciding whether we need to flow back (3), @@ -395,18 +354,8 @@ sal_uInt8 SwFlowFrm::BwdMoveNecessary( const SwPageFrm *pPage, const SwRect &rRe return nRet; } -/************************************************************************* -|* -|* SwFlowFrm::CutTree(), PasteTree(), MoveSubTree() -|* -|* Description A specialized form of Cut() and Paste(), which -|* relocates a whole chain (this and the following, in particular). -|* During this process, only the minimum operations and notifications -|* are done. -|* -|*************************************************************************/ - - +/// A specialized form of Cut(), which relocates a whole chain (this and the following, +/// in particular). During this process, only the minimum operations and notifications are done. SwLayoutFrm *SwFlowFrm::CutTree( SwFrm *pStart ) { // Cut the Start and all the neighbours; they are chained together and @@ -471,8 +420,8 @@ SwLayoutFrm *SwFlowFrm::CutTree( SwFrm *pStart ) return pLay; } - - +/// A specialized form of Paste(), which relocates a whole chain (this and the following, +/// in particular). During this process, only the minimum operations and notifications are done. sal_Bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibling, SwFrm *pOldParent ) { @@ -586,8 +535,6 @@ sal_Bool SwFlowFrm::PasteTree( SwFrm *pStart, SwLayoutFrm *pParent, SwFrm *pSibl return bRet; } - - void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling ) { OSL_ENSURE( pParent, "No parent given." ); @@ -671,13 +618,6 @@ void SwFlowFrm::MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling ) m_rThis.GetUpper()->InvalidatePage( pPage ); } -/************************************************************************* -|* -|* SwFlowFrm::IsAnFollow() -|* -|*************************************************************************/ - - sal_Bool SwFlowFrm::IsAnFollow( const SwFlowFrm *pAssumed ) const { const SwFlowFrm *pFoll = this; @@ -689,13 +629,6 @@ sal_Bool SwFlowFrm::IsAnFollow( const SwFlowFrm *pAssumed ) const return sal_False; } - -/************************************************************************* -|* -|* SwFlowFrm::FindMaster() -|* -|*************************************************************************/ - SwTxtFrm* SwCntntFrm::FindMaster() const { OSL_ENSURE( IsFollow(), "SwCntntFrm::FindMaster(): !IsFollow" ); @@ -768,17 +701,10 @@ SwTabFrm* SwTabFrm::FindMaster( bool bFirstMaster ) const return 0; } -/************************************************************************* -|* -|* SwFrm::GetLeaf() -|* -|* Description Returns the next/previous Layout leaf that's NOT below -|* this (or even is this itself). Also, that leaf must be in the same -|* text flow as the pAnch origin frm (Body, Ftn) -|* -|*************************************************************************/ - - +/** + * Returns the next/previous Layout leaf that's NOT below this (or even is this itself). + * Also, that leaf must be in the same text flow as the pAnch origin frame (Body, Ftn) + */ const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, sal_Bool bFwd, const SwFrm *pAnch ) const { @@ -806,15 +732,6 @@ const SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, sal_Bool bFwd, return (const SwLayoutFrm*)pLeaf; } -/************************************************************************* -|* -|* SwFrm::GetLeaf() -|* -|* Description calls Get[Next|Prev]Leaf -|* -|*************************************************************************/ - - SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, sal_Bool bFwd ) { if ( IsInFtn() ) @@ -856,8 +773,6 @@ SwLayoutFrm *SwFrm::GetLeaf( MakePageType eMakePage, sal_Bool bFwd ) return bFwd ? GetNextLeaf( eMakePage ) : GetPrevLeaf( eMakePage ); } - - sal_Bool SwFrm::WrongPageDesc( SwPageFrm* pNew ) { // Now it's getting a bit complicated: @@ -927,15 +842,7 @@ sal_Bool SwFrm::WrongPageDesc( SwPageFrm* pNew ) } -/************************************************************************* -|* -|* SwFrm::GetNextLeaf() -|* -|* Description Returns the next layout leaf in which we can move -|* the frame. -|* -|*************************************************************************/ - +/// Returns the next layout leaf in which we can move the frame. SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage ) { OSL_ENSURE( !IsInFtn(), "GetNextLeaf(), don't call me for Ftn." ); @@ -1067,15 +974,7 @@ SwLayoutFrm *SwFrm::GetNextLeaf( MakePageType eMakePage ) return pLayLeaf; } -/************************************************************************* -|* -|* SwFrm::GetPrevLeaf() -|* -|* Returns the previous layout leaf where we can move the frame. -|* -|*************************************************************************/ - - +/// Returns the previous layout leaf where we can move the frame. SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType ) { OSL_ENSURE( !IsInFtn(), "GetPrevLeaf(), don't call me for Ftn." ); @@ -1109,13 +1008,6 @@ SwLayoutFrm *SwFrm::GetPrevLeaf( MakePageType ) return pLayLeaf ? pLayLeaf : pPrevLeaf; } -/************************************************************************* -|* -|* SwFlowFrm::IsPrevObjMove() -|* -|*************************************************************************/ - - sal_Bool SwFlowFrm::IsPrevObjMove() const { //sal_True The FlowFrm must respect the a border of the predecessor, also needs @@ -1173,11 +1065,8 @@ sal_Bool SwFlowFrm::IsPrevObjMove() const return sal_False; } -/************************************************************************* -|* -|* sal_Bool SwFlowFrm::IsPageBreak() -|* -|* Description If there's a hard page break before the Frm AND there's a +/** +|* If there's a hard page break before the Frm AND there's a |* predecessor on the same page, sal_True is returned (we need to create a |* new PageBreak). Otherwise, returns sal_False. |* If bAct is set to sal_True, this function returns sal_True if @@ -1190,10 +1079,7 @@ sal_Bool SwFlowFrm::IsPrevObjMove() const |* the FrmFmt contains a PageDesc. |* The implementation works only on CntntFrms! - the definition |* of the predecessor is not clear for LayoutFrms. -|* -|*************************************************************************/ - - +|*/ sal_Bool SwFlowFrm::IsPageBreak( sal_Bool bAct ) const { if ( !IsFollow() && m_rThis.IsInDocBody() && @@ -1238,10 +1124,7 @@ sal_Bool SwFlowFrm::IsPageBreak( sal_Bool bAct ) const return sal_False; } -/************************************************************************* -|* -|* sal_Bool SwFlowFrm::IsColBreak() -|* +/** |* If there's a hard column break before the Frm AND there is |* a predecessor in the same column, we return sal_True (we need to create |* a ColBreak). Otherwise, we return sal_False. @@ -1253,9 +1136,7 @@ sal_Bool SwFlowFrm::IsPageBreak( sal_Bool bAct ) const |* need to think further. |* The implementation works only on CntntFrms! - the definition |* of the predecessor is not clear for LayoutFrms. -|* -|*************************************************************************/ - +|*/ sal_Bool SwFlowFrm::IsColBreak( sal_Bool bAct ) const { if ( !IsFollow() && (m_rThis.IsMoveable() || bAct) ) @@ -1820,16 +1701,7 @@ SwTwips SwFlowFrm::CalcAddLowerSpaceAsLastInTableCell( return nAdditionalLowerSpace; } -/************************************************************************* -|* -|* sal_Bool SwFlowFrm::CheckMoveFwd() -|* -|* Description Moves the Frm forward if it seems necessary regarding -|* the current conditions and attributes. -|* -|*************************************************************************/ - - +/// Moves the Frm forward if it seems necessary regarding the current conditions and attributes. sal_Bool SwFlowFrm::CheckMoveFwd( bool& rbMakePage, sal_Bool bKeep, sal_Bool ) { const SwFrm* pNxt = m_rThis.GetIndNext(); @@ -1914,16 +1786,7 @@ sal_Bool SwFlowFrm::CheckMoveFwd( bool& rbMakePage, sal_Bool bKeep, sal_Bool ) return bMovedFwd; } -/************************************************************************* -|* -|* sal_Bool SwFlowFrm::MoveFwd() -|* -|* Description Return value tells us whether the Frm has changed -|* the page. -|* -|*************************************************************************/ - - +/// Return value tells us whether the Frm has changed the page. sal_Bool SwFlowFrm::MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool bMoveAlways ) { //!!!!MoveFtnCntFwd might need to be updated as well. @@ -2110,17 +1973,11 @@ sal_Bool SwFlowFrm::MoveFwd( sal_Bool bMakePage, sal_Bool bPageBreak, sal_Bool b return bSamePage; } - -/************************************************************************* -|* -|* sal_Bool SwFlowFrm::MoveBwd() -|* -|* Description Return value tells whether the Frm should change the page. -|* This should be called by derived classes. -|* The actual moving must be implemented in the subclasses. -|* -|*************************************************************************/ - +/** Return value tells whether the Frm should change the page. + * + * @note This should be called by derived classes. + * @note The actual moving must be implemented in the subclasses. + */ sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat ) { SwFlowFrm::SetMoveBwdJump( sal_False ); @@ -2650,12 +2507,6 @@ sal_Bool SwFlowFrm::MoveBwd( sal_Bool &rbReformat ) return pNewUpper != 0; } -/************************************************************************* -|* -|* SwFlowFrm::CastFlowFrm -|* -|*************************************************************************/ - SwFlowFrm *SwFlowFrm::CastFlowFrm( SwFrm *pFrm ) { if ( pFrm->IsCntntFrm() ) diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 48bdefe0f4b6..56544c50fd94 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -60,15 +60,8 @@ using namespace ::com::sun::star; - TYPEINIT2(SwFlyFrm,SwLayoutFrm,SwAnchoredObject); -/************************************************************************* -|* -|* SwFlyFrm::SwFlyFrm() -|* -|*************************************************************************/ - SwFlyFrm::SwFlyFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) : SwLayoutFrm( pFmt, pSib ), SwAnchoredObject(), // #i26791# @@ -236,12 +229,6 @@ void SwFlyFrm::InsertCnt() } } -/************************************************************************* -|* -|* SwFlyFrm::~SwFlyFrm() -|* -|*************************************************************************/ - SwFlyFrm::~SwFlyFrm() { // Accessible objects for fly frames will be destroyed in this destructor. @@ -338,12 +325,6 @@ void SwFlyFrm::DeleteCnt() InvalidatePage(); } -/************************************************************************* -|* -|* SwFlyFrm::InitDrawObj() -|* -|*************************************************************************/ - sal_uInt32 SwFlyFrm::_GetOrdNumForNewRef( const SwFlyDrawContact* pContact ) { sal_uInt32 nOrdNum( 0L ); @@ -405,8 +386,6 @@ SwVirtFlyDrawObj* SwFlyFrm::CreateNewRef( SwFlyDrawContact *pContact ) return pDrawObj; } - - void SwFlyFrm::InitDrawObj( sal_Bool bNotify ) { // Find ContactObject from the Format. If there's already one, we just @@ -436,12 +415,6 @@ void SwFlyFrm::InitDrawObj( sal_Bool bNotify ) NotifyDrawObj(); } -/************************************************************************* -|* -|* SwFlyFrm::FinitDrawObj() -|* -|*************************************************************************/ - void SwFlyFrm::FinitDrawObj() { if ( !GetVirtDrawObj() ) @@ -498,12 +471,6 @@ void SwFlyFrm::FinitDrawObj() delete pMyContact; // Destroys the Master itself } -/************************************************************************* -|* -|* SwFlyFrm::ChainFrames() -|* -|*************************************************************************/ - void SwFlyFrm::ChainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow ) { OSL_ENSURE( pMaster && pFollow, "uncomplete chain" ); @@ -598,12 +565,6 @@ void SwFlyFrm::UnchainFrames( SwFlyFrm *pMaster, SwFlyFrm *pFollow ) } } -/************************************************************************* -|* -|* SwFlyFrm::FindChainNeighbour() -|* -|*************************************************************************/ - SwFlyFrm *SwFlyFrm::FindChainNeighbour( SwFrmFmt &rChain, SwFrm *pAnch ) { // We look for the Fly that's in the same Area. @@ -650,13 +611,6 @@ SwFlyFrm *SwFlyFrm::FindChainNeighbour( SwFrmFmt &rChain, SwFrm *pAnch ) return pFly; } - -/************************************************************************* -|* -|* SwFlyFrm::FindLastLower() -|* -|*************************************************************************/ - SwFrm *SwFlyFrm::FindLastLower() { SwFrm *pRet = ContainsAny(); @@ -670,13 +624,6 @@ SwFrm *SwFlyFrm::FindLastLower() return pRet; } - -/************************************************************************* -|* -|* SwFlyFrm::FrmSizeChg() -|* -|*************************************************************************/ - sal_Bool SwFlyFrm::FrmSizeChg( const SwFmtFrmSize &rFrmSize ) { sal_Bool bRet = sal_False; @@ -726,12 +673,6 @@ sal_Bool SwFlyFrm::FrmSizeChg( const SwFmtFrmSize &rFrmSize ) return bRet; } -/************************************************************************* -|* -|* SwFlyFrm::Modify() -|* -|*************************************************************************/ - void SwFlyFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { sal_uInt8 nInvFlags = 0; @@ -1106,14 +1047,7 @@ void SwFlyFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, } } -/************************************************************************* -|* -|* SwFlyFrm::GetInfo() -|* -|* Gets information from the Modify -|* -*************************************************************************/ - +/// Gets information from the Modify bool SwFlyFrm::GetInfo( SfxPoolItem & rInfo ) const { if( RES_AUTOFMT_DOCNODE == rInfo.Which() ) @@ -1121,12 +1055,6 @@ bool SwFlyFrm::GetInfo( SfxPoolItem & rInfo ) const return true; // Continue searching } -/************************************************************************* -|* -|* SwFlyFrm::_Invalidate() -|* -|*************************************************************************/ - void SwFlyFrm::_Invalidate( SwPageFrm *pPage ) { InvalidatePage( pPage ); @@ -1157,16 +1085,10 @@ void SwFlyFrm::_Invalidate( SwPageFrm *pPage ) } } -/************************************************************************* -|* -|* SwFlyFrm::ChgRelPos() -|* -|* Change the relative position -|* The position will be Fix automatically and the attribute is changed -|* accordingly. -|* -|*************************************************************************/ - +/** Change the relative position + * + * The position will be Fix automatically and the attribute is changed accordingly. + */ void SwFlyFrm::ChgRelPos( const Point &rNewPos ) { if ( GetCurrRelPos() != rNewPos ) @@ -1280,15 +1202,11 @@ void SwFlyFrm::ChgRelPos( const Point &rNewPos ) pFmt->GetDoc()->SetAttr( aSet, *pFmt ); } } -/************************************************************************* -|* -|* SwFlyFrm::Format() -|* -|* "Formats" the Frame; Frm and PrtArea. -|* The FixSize is not inserted here. -|* -|*************************************************************************/ +/** "Formats" the Frame; Frm and PrtArea. + * + * The FixSize is not inserted here. + */ void SwFlyFrm::Format( const SwBorderAttrs *pAttrs ) { OSL_ENSURE( pAttrs, "FlyFrm::Format, pAttrs is 0." ); @@ -1779,11 +1697,6 @@ void CalcCntnt( SwLayoutFrm *pLay, while( true ); } -/************************************************************************* -|* -|* SwFlyFrm::MakeFlyPos() -|* -|*************************************************************************/ // OD 2004-03-23 #i26791# //void SwFlyFrm::MakeFlyPos() void SwFlyFrm::MakeObjPos() @@ -1810,11 +1723,6 @@ void SwFlyFrm::MakeObjPos() } } -/************************************************************************* -|* -|* SwFlyFrm::MakePrtArea() -|* -|*************************************************************************/ void SwFlyFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) { @@ -1831,12 +1739,6 @@ void SwFlyFrm::MakePrtArea( const SwBorderAttrs &rAttrs ) } } -/************************************************************************* -|* -|* SwFlyFrm::_Grow(), _Shrink() -|* -|*************************************************************************/ - SwTwips SwFlyFrm::_Grow( SwTwips nDist, sal_Bool bTst ) { SWRECTFN( this ) @@ -2012,12 +1914,6 @@ SwTwips SwFlyFrm::_Shrink( SwTwips nDist, sal_Bool bTst ) return 0L; } -/************************************************************************* -|* -|* SwFlyFrm::ChgSize() -|* -|*************************************************************************/ - Size SwFlyFrm::ChgSize( const Size& aNewSize ) { // #i53298# @@ -2060,12 +1956,6 @@ Size SwFlyFrm::ChgSize( const Size& aNewSize ) return Frm().SSize(); } -/************************************************************************* -|* -|* SwFlyFrm::IsLowerOf() -|* -|*************************************************************************/ - sal_Bool SwFlyFrm::IsLowerOf( const SwLayoutFrm* pUpperFrm ) const { OSL_ENSURE( GetAnchorFrm(), "8-( Fly is lost in Space." ); @@ -2088,12 +1978,6 @@ void SwFlyFrm::Cut() { } -/************************************************************************* -|* -|* SwFrm::AppendFly(), RemoveFly() -|* -|*************************************************************************/ - void SwFrm::AppendFly( SwFlyFrm *pNew ) { if ( !mpDrawObjs ) @@ -2175,13 +2059,6 @@ void SwFrm::RemoveFly( SwFlyFrm *pToRemove ) GetUpper()->InvalidateSize(); } -/************************************************************************* -|* -|* SwFrm::AppendDrawObj(), RemoveDrawObj() -|* -|* --> OD 2004-07-06 #i28701# - new methods -|* -|*************************************************************************/ void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj ) { if ( !_rNewObj.ISA(SwAnchoredDrawObject) ) @@ -2273,12 +2150,6 @@ void SwFrm::RemoveDrawObj( SwAnchoredObject& _rToRemoveObj ) _rToRemoveObj.ChgAnchorFrm( 0 ); } -/************************************************************************* -|* -|* SwFrm::InvalidateObjs() -|* -|*************************************************************************/ -// #i28701# - change purpose of method and adjust its name void SwFrm::InvalidateObjs( const bool _bInvaPosOnly, const bool _bNoInvaOfAsCharAnchoredObjs ) { @@ -2348,12 +2219,6 @@ void SwFrm::InvalidateObjs( const bool _bInvaPosOnly, } } -/************************************************************************* -|* -|* SwLayoutFrm::NotifyLowerObjs() -|* -|*************************************************************************/ -// #i28701# - change purpose of method and its name // #i26945# - correct check, if anchored object is a lower // of the layout frame. E.g., anchor character text frame can be a follow text // frame. @@ -2428,12 +2293,6 @@ void SwLayoutFrm::NotifyLowerObjs( const bool _bUnlockPosOfObjs ) } } -/************************************************************************* -|* -|* SwFlyFrm::NotifyDrawObj() -|* -|*************************************************************************/ - void SwFlyFrm::NotifyDrawObj() { SwVirtFlyDrawObj* pObj = GetVirtDrawObj(); @@ -2445,12 +2304,6 @@ void SwFlyFrm::NotifyDrawObj() ClrContourCache( pObj ); } -/************************************************************************* -|* -|* SwFlyFrm::CalcRel() -|* -|*************************************************************************/ - Size SwFlyFrm::CalcRel( const SwFmtFrmSize &rSz ) const { Size aRet( rSz.GetSize() ); @@ -2519,12 +2372,6 @@ Size SwFlyFrm::CalcRel( const SwFmtFrmSize &rSz ) const return aRet; } -/************************************************************************* -|* -|* SwFlyFrm::CalcAutoWidth() -|* -|*************************************************************************/ - static SwTwips lcl_CalcAutoWidth( const SwLayoutFrm& rFrm ) { SwTwips nRet = 0; @@ -2581,11 +2428,6 @@ SwTwips SwFlyFrm::CalcAutoWidth() const return lcl_CalcAutoWidth( *this ); } -/************************************************************************* -|* -|* SwFlyFrm::GetContour() -|* -|*************************************************************************/ /// OD 16.04.2003 #i13147# - If called for paint and the <SwNoTxtFrm> contains /// a graphic, load of intrinsic graphic has to be avoided. sal_Bool SwFlyFrm::GetContour( PolyPolygon& rContour, @@ -2698,10 +2540,9 @@ SwVirtFlyDrawObj* SwFlyFrm::GetVirtDrawObj() return static_cast<SwVirtFlyDrawObj*>(DrawObj()); } -// ============================================================================= // OD 2004-03-24 #i26791# - implementation of pure virtual method declared in // base class <SwAnchoredObject> -// ============================================================================= + void SwFlyFrm::InvalidateObjPos() { InvalidatePos(); diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index 06c6885b0d0c..045a87735f68 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <tools/bigint.hxx> #include "pagefrm.hxx" #include "txtfrm.hxx" @@ -45,13 +44,6 @@ using namespace ::com::sun::star; - -/************************************************************************* -|* -|* SwFlyAtCntFrm::SwFlyAtCntFrm() -|* -|*************************************************************************/ - SwFlyAtCntFrm::SwFlyAtCntFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) : SwFlyFreeFrm( pFmt, pSib, pAnch ) { @@ -61,11 +53,6 @@ SwFlyAtCntFrm::SwFlyAtCntFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) : // #i28701# TYPEINIT1(SwFlyAtCntFrm,SwFlyFreeFrm); -/************************************************************************* -|* -|* SwFlyAtCntFrm::Modify() -|* -|*************************************************************************/ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) { @@ -179,25 +166,6 @@ void SwFlyAtCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) SwFlyFrm::Modify( pOld, pNew ); } -/************************************************************************* -|* -|* SwFlyAtCntFrm::MakeAll() -|* -|* Description With a paragraph-anchored fly it's absolutely possible that -|* the anchor reacts to changes of the fly. To this reaction the fly must -|* certaily react too. Sadly this can lead to oscillations; for example the -|* fly wants to go down therefore the content can go up - this leads to a -|* smaller TxtFrm thus the fly needs to go up again whereby the text will -|* get pushed down... -|* To avoid such oscillations, a small position stack is built. If the fly -|* reaches a position which it already had once, the action is stopped. -|* To not run into problems, the stack is designed to hold five positions. -|* If the stack flows over, the action is stopped too. -|* Cancellation leads to the situation that the fly has a bad position in -|* the end. In case of cancellation, the frame is set to automatic top -|* alignment to not trigger a 'big oscillation' when calling from outside -|* again. -|*************************************************************************/ //We need some helper classes to monitor the oscillation and a few functions //to not get lost. @@ -221,6 +189,7 @@ public: bool ChkOsz(); static bool IsInProgress( const SwFlyFrm *pFly ); }; + const SwFlyFrm *SwOszControl::pStk1 = 0; const SwFlyFrm *SwOszControl::pStk2 = 0; const SwFlyFrm *SwOszControl::pStk3 = 0; @@ -314,6 +283,22 @@ bool SwOszControl::ChkOsz() return bOscillationDetected; } +/** +|* With a paragraph-anchored fly it's absolutely possible that +|* the anchor reacts to changes of the fly. To this reaction the fly must +|* certaily react too. Sadly this can lead to oscillations; for example the +|* fly wants to go down therefore the content can go up - this leads to a +|* smaller TxtFrm thus the fly needs to go up again whereby the text will +|* get pushed down... +|* To avoid such oscillations, a small position stack is built. If the fly +|* reaches a position which it already had once, the action is stopped. +|* To not run into problems, the stack is designed to hold five positions. +|* If the stack flows over, the action is stopped too. +|* Cancellation leads to the situation that the fly has a bad position in +|* the end. In case of cancellation, the frame is set to automatic top +|* alignment to not trigger a 'big oscillation' when calling from outside +|* again. +|*/ void SwFlyAtCntFrm::MakeAll() { if ( !GetFmt()->GetDoc()->IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) ) @@ -537,16 +522,6 @@ bool SwFlyAtCntFrm::IsFormatPossible() const !SwOszControl::IsInProgress( this ); } -/************************************************************************* -|* -|* FindAnchor() und Hilfsfunktionen. -|* -|* Description: Searches an anchor for paragraph bound objects -|* starting from pOldAnch. This is used to show anchors as well as changing -|* anchors when dragging paragraph bound objects. -|* -|*************************************************************************/ - class SwDistance { public: @@ -1039,6 +1014,11 @@ static void lcl_PointToPrt( Point &rPoint, const SwFrm *pFrm ) } +/** Searches an anchor for paragraph bound objects starting from pOldAnch. + * + * This is used to show anchors as well as changing anchors + * when dragging paragraph bound objects. + */ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew, const sal_Bool bBodyOnly ) { @@ -1190,12 +1170,6 @@ const SwCntntFrm *FindAnchor( const SwFrm *pOldAnch, const Point &rNew, return nDownLst < nUpLst ? pDownLst : pUpLst; } -/************************************************************************* -|* -|* SwFlyAtCntFrm::SetAbsPos() -|* -|*************************************************************************/ - void SwFlyAtCntFrm::SetAbsPos( const Point &rNew ) { SwPageFrm *pOldPage = FindPageFrm(); diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx index 8064bcdb6efe..a584a186ec32 100644 --- a/sw/source/core/layout/flyincnt.cxx +++ b/sw/source/core/layout/flyincnt.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "doc.hxx" #include "frmtool.hxx" #include "hints.hxx" @@ -30,11 +29,6 @@ //from FlyCnt.cxx void DeepCalc( const SwFrm *pFrm ); -/************************************************************************* -|* -|* SwFlyInCntFrm::SwFlyInCntFrm(), ~SwFlyInCntFrm() -|* -|*************************************************************************/ SwFlyInCntFrm::SwFlyInCntFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) : SwFlyFrm( pFmt, pSib, pAnch ) { @@ -51,7 +45,6 @@ SwFlyInCntFrm::SwFlyInCntFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) : SwFlyInCntFrm::~SwFlyInCntFrm() { - //good bye if ( !GetFmt()->GetDoc()->IsInDtor() && GetAnchorFrm() ) { SwRect aTmp( GetObjRectWithSpaces() ); @@ -61,11 +54,7 @@ SwFlyInCntFrm::~SwFlyInCntFrm() // #i28701# TYPEINIT1(SwFlyInCntFrm,SwFlyFrm); -/************************************************************************* -|* -|* SwFlyInCntFrm::SetRefPoint(), -|* -|*************************************************************************/ + void SwFlyInCntFrm::SetRefPoint( const Point& rPoint, const Point& rRelAttr, const Point& rRelPos ) @@ -93,11 +82,6 @@ void SwFlyInCntFrm::SetRefPoint( const Point& rPoint, } } -/************************************************************************* -|* -|* SwFlyInCntFrm::Modify() -|* -|*************************************************************************/ void SwFlyInCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) { bool bCallPrepare = false; @@ -137,13 +121,8 @@ void SwFlyInCntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) if ( bCallPrepare && GetAnchorFrm() ) AnchorFrm()->Prepare( PREP_FLY_ATTR_CHG, GetFmt() ); } -/************************************************************************* -|* -|* SwFlyInCntFrm::Format() -|* -|* Here the content gets formatted initially. -|* -|*************************************************************************/ + +/// Here the content gets formatted initially. void SwFlyInCntFrm::Format( const SwBorderAttrs *pAttrs ) { if ( !Frm().Height() ) @@ -158,15 +137,12 @@ void SwFlyInCntFrm::Format( const SwBorderAttrs *pAttrs ) } SwFlyFrm::Format( pAttrs ); } -/************************************************************************* -|* -|* SwFlyInCntFrm::MakeFlyPos() -|* -|* Description In contrast to other Frms we only calculate the RelPos -|* here. The absolute position is only calculated using SetAbsPos. -|*************************************************************************/ -// OD 2004-03-23 #i26791# -//void SwFlyInCntFrm::MakeFlyPos() + +/** Calculate object position + * + * @note: In contrast to other Frames, we only calculate the relative position + * here. The absolute position is only calculated using SetAbsPos. + **/ void SwFlyInCntFrm::MakeObjPos() { if ( !mbValidPos ) @@ -199,11 +175,7 @@ void SwFlyInCntFrm::_ActionOnInvalidation( const InvalidationType _nInvalid ) if ( INVALID_POS == _nInvalid || INVALID_ALL == _nInvalid ) AnchorFrm()->Prepare( PREP_FLY_ATTR_CHG, &GetFrmFmt() ); } -/************************************************************************* -|* -|* SwFlyInCntFrm::NotifyBackground() -|* -|*************************************************************************/ + void SwFlyInCntFrm::NotifyBackground( SwPageFrm *, const SwRect& rRect, PrepareHint eHint) { @@ -213,22 +185,12 @@ void SwFlyInCntFrm::NotifyBackground( SwPageFrm *, const SwRect& rRect, AnchorFrm()->Prepare( eHint, (void*)&rRect ); } -/************************************************************************* -|* -|* SwFlyInCntFrm::GetRelPos() -|* -|*************************************************************************/ const Point SwFlyInCntFrm::GetRelPos() const { Calc(); return GetCurrRelPos(); } -/************************************************************************* -|* -|* SwFlyInCntFrm::RegistFlys() -|* -|*************************************************************************/ void SwFlyInCntFrm::RegistFlys() { // vgl. SwRowFrm::RegistFlys() @@ -237,11 +199,6 @@ void SwFlyInCntFrm::RegistFlys() ::RegistFlys( pPage, this ); } -/************************************************************************* -|* -|* SwFlyInCntFrm::MakeAll() -|* -|*************************************************************************/ void SwFlyInCntFrm::MakeAll() { // OD 2004-01-19 #110582# @@ -284,7 +241,6 @@ void SwFlyInCntFrm::MakeAll() MakeObjPos(); } - // // re-activate clipping of as-character anchored Writer fly frames // depending on compatibility option <ClipAsCharacterAnchoredWriterFlyFrames> if ( mbValidPos && mbValidSize && diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index 66beef2a930d..ea9a5362b005 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -27,7 +27,6 @@ #include "hints.hxx" #include "sectfrm.hxx" - #include <svx/svdpage.hxx> #include <editeng/ulspitem.hxx> #include <fmtornt.hxx> @@ -42,16 +41,8 @@ #include <sortedobjs.hxx> #include <viewimp.hxx> - using namespace ::com::sun::star; - -/************************************************************************* -|* -|* SwFlyFreeFrm::SwFlyFreeFrm(), ~SwFlyFreeFrm() -|* -|*************************************************************************/ - SwFlyFreeFrm::SwFlyFreeFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) : SwFlyFrm( pFmt, pSib, pAnch ), pPage( 0 ), @@ -65,7 +56,6 @@ SwFlyFreeFrm::SwFlyFreeFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) : SwFlyFreeFrm::~SwFlyFreeFrm() { - // and goodbye. // #i28701# - use new method <GetPageFrm()> if( GetPageFrm() ) { @@ -92,29 +82,18 @@ SwFlyFreeFrm::~SwFlyFreeFrm() // #i28701# TYPEINIT1(SwFlyFreeFrm,SwFlyFrm); -/************************************************************************* -|* -|* SwFlyFreeFrm::NotifyBackground() -|* -|* Description notifies the background (all CntntFrms that currently -|* are overlapping). Additionally, the window is also directly -|* invalidated (especially where there are no overlapping CntntFrms) -|* This also takes CntntFrms within other Flys into account. -|* -|*************************************************************************/ - +/** Notifies the background (all CntntFrms that currently are overlapping). + * + * Additionally, the window is also directly invalidated (especially where + * there are no overlapping CntntFrms). + * This also takes CntntFrms within other Flys into account. + */ void SwFlyFreeFrm::NotifyBackground( SwPageFrm *pPageFrm, const SwRect& rRect, PrepareHint eHint ) { ::Notify_Background( GetVirtDrawObj(), pPageFrm, rRect, eHint, sal_True ); } -/************************************************************************* -|* -|* SwFlyFreeFrm::MakeAll() -|* -|*************************************************************************/ - void SwFlyFreeFrm::MakeAll() { if ( !GetFmt()->GetDoc()->IsVisibleLayerId( GetVirtDrawObj()->GetLayer() ) ) @@ -267,12 +246,6 @@ bool SwFlyFreeFrm::HasEnvironmentAutoSize() const return bRetVal; } -/************************************************************************* -|* -|* SwFlyFreeFrm::CheckClip() -|* -|*************************************************************************/ - void SwFlyFreeFrm::CheckClip( const SwFmtFrmSize &rSz ) { // It's probably time now to take appropriate measures, if the Fly @@ -477,12 +450,6 @@ bool SwFlyFreeFrm::IsFormatPossible() const ( GetAnchorFrm() && GetAnchorFrm()->IsInFly() ) ); } -/************************************************************************* -|* -|* SwFlyLayFrm::SwFlyLayFrm() -|* -|*************************************************************************/ - SwFlyLayFrm::SwFlyLayFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) : SwFlyFreeFrm( pFmt, pSib, pAnch ) { @@ -491,11 +458,6 @@ SwFlyLayFrm::SwFlyLayFrm( SwFlyFrmFmt *pFmt, SwFrm* pSib, SwFrm *pAnch ) : // #i28701# TYPEINIT1(SwFlyLayFrm,SwFlyFreeFrm); -/************************************************************************* -|* -|* SwFlyLayFrm::Modify() -|* -|*************************************************************************/ void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) { @@ -570,12 +532,6 @@ void SwFlyLayFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) SwFlyFrm::Modify( pOld, pNew ); } -/************************************************************************* -|* -|* SwPageFrm::AppendFly() -|* -|*************************************************************************/ - void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew ) { if ( !pNew->GetVirtDrawObj()->IsInserted() ) @@ -672,12 +628,6 @@ void SwPageFrm::AppendFlyToPage( SwFlyFrm *pNew ) } } -/************************************************************************* -|* -|* SwPageFrm::RemoveFly() -|* -|*************************************************************************/ - void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove ) { const sal_uInt32 nOrdNum = pToRemove->GetVirtDrawObj()->GetOrdNum(); @@ -727,12 +677,6 @@ void SwPageFrm::RemoveFlyFromPage( SwFlyFrm *pToRemove ) pToRemove->SetPageFrm( 0L ); } -/************************************************************************* -|* -|* SwPageFrm::MoveFly -|* -|*************************************************************************/ - void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest ) { // Invalidations @@ -830,13 +774,6 @@ void SwPageFrm::MoveFly( SwFlyFrm *pToMove, SwPageFrm *pDest ) } } -/************************************************************************* -|* -|* SwPageFrm::AppendDrawObjToPage(), RemoveDrawObjFromPage() -|* -|* #i28701# - new methods -|* -|*************************************************************************/ void SwPageFrm::AppendDrawObjToPage( SwAnchoredObject& _rNewObj ) { if ( !_rNewObj.ISA(SwAnchoredDrawObject) ) @@ -915,12 +852,6 @@ void SwPageFrm::RemoveDrawObjFromPage( SwAnchoredObject& _rToRemoveObj ) _rToRemoveObj.SetPageFrm( 0 ); } -/************************************************************************* -|* -|* SwPageFrm::PlaceFly -|* -|*************************************************************************/ - // #i50432# - adjust method description and synopsis. void SwPageFrm::PlaceFly( SwFlyFrm* pFly, SwFlyFrmFmt* pFmt ) { @@ -947,11 +878,6 @@ void SwPageFrm::PlaceFly( SwFlyFrm* pFly, SwFlyFrmFmt* pFmt ) } } -/************************************************************************* -|* -|* ::CalcClipRect -|* -|*************************************************************************/ // #i18732# - adjustments for following text flow or not // AND alignment at 'page areas' for to paragraph/to character anchored objects // #i22305# - adjustment for following text flow for to frame anchored objects diff --git a/sw/source/core/layout/flypos.cxx b/sw/source/core/layout/flypos.cxx index 661a4e944416..87f215cf9013 100644 --- a/sw/source/core/layout/flypos.cxx +++ b/sw/source/core/layout/flypos.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "doc.hxx" #include <docary.hxx> #include "dcontact.hxx" diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 9dee8b83da2c..0309f7c05a36 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -66,7 +66,6 @@ void sw_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes using namespace ::com::sun::star; - bool bObjsDirect = true; bool bDontCreateObjects = false; bool bSetCompletePaintOnInvalidate = false; @@ -74,10 +73,6 @@ bool bSetCompletePaintOnInvalidate = false; sal_uInt8 StackHack::nCnt = 0; sal_Bool StackHack::bLocked = sal_False; - - -/*************************************************************************/ - SwFrmNotify::SwFrmNotify( SwFrm *pF ) : pFrm( pF ), aFrm( pF->Frm() ), @@ -102,8 +97,6 @@ SwFrmNotify::SwFrmNotify( SwFrm *pF ) : sal_False; } -/*************************************************************************/ - SwFrmNotify::~SwFrmNotify() { // #i49383# @@ -401,16 +394,12 @@ SwFrmNotify::~SwFrmNotify() } } -/*************************************************************************/ - SwLayNotify::SwLayNotify( SwLayoutFrm *pLayFrm ) : SwFrmNotify( pLayFrm ), bLowersComplete( sal_False ) { } -/*************************************************************************/ - // OD 2004-05-11 #i28701# - local method to invalidate the position of all // frames inclusive its floating screen objects, which are lowers of the given // layout frame @@ -618,8 +607,6 @@ SwLayNotify::~SwLayNotify() ((SwFlyFrm*)pLay)->AnchorFrm()->InvalidateSize(); } -/*************************************************************************/ - SwFlyNotify::SwFlyNotify( SwFlyFrm *pFlyFrm ) : SwLayNotify( pFlyFrm ), // #115759# - keep correct page frame - the page frame @@ -629,8 +616,6 @@ SwFlyNotify::SwFlyNotify( SwFlyFrm *pFlyFrm ) : { } -/*************************************************************************/ - SwFlyNotify::~SwFlyNotify() { // #i49383# @@ -733,8 +718,6 @@ SwFlyNotify::~SwFlyNotify() } } -/*************************************************************************/ - SwCntntNotify::SwCntntNotify( SwCntntFrm *pCntntFrm ) : SwFrmNotify( pCntntFrm ), // OD 08.01.2004 #i11859# @@ -761,8 +744,6 @@ SwCntntNotify::SwCntntNotify( SwCntntFrm *pCntntFrm ) : } } -/*************************************************************************/ - SwCntntNotify::~SwCntntNotify() { // #i49383# @@ -998,8 +979,6 @@ SwCntntNotify::~SwCntntNotify() } } -/*************************************************************************/ - void AppendObjs( const SwFrmFmts *pTbl, sal_uLong nIndex, SwFrm *pFrm, SwPageFrm *pPage ) { @@ -1584,7 +1563,6 @@ void _InsertCnt( SwLayoutFrm *pLay, SwDoc *pDoc, pLayout->SetCallbackActionEnabled( bOldCallbackActionEnabled ); } - void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, const SwNodeIndex &rEndIdx ) { @@ -1800,9 +1778,6 @@ void MakeFrms( SwDoc *pDoc, const SwNodeIndex &rSttIdx, bObjsDirect = true; } - -/*************************************************************************/ - SwBorderAttrs::SwBorderAttrs( const SwModify *pMod, const SwFrm *pConstructor ) : SwCacheObj( pMod ), rAttrSet( pConstructor->IsCntntFrm() @@ -1848,17 +1823,13 @@ SwBorderAttrs::~SwBorderAttrs() ((SwModify*)pOwner)->SetInCache( sal_False ); } -/************************************************************************* -|* -|* SwBorderAttrs::CalcTop(), CalcBottom(), CalcLeft(), CalcRight() -|* -|* Beschreibung Die Calc-Methoden errechnen zusaetzlich zu den +/* +|* Die Calc-Methoden errechnen zusaetzlich zu den |* von den Attributen vorgegebenen Groessen einen Sicherheitsabstand. |* der Sicherheitsabstand wird nur einkalkuliert, wenn Umrandung und/oder |* Schatten im Spiel sind; er soll vermeiden, dass aufgrund der |* groben physikalischen Gegebenheiten Raender usw. uebermalt werden. -|* -|*************************************************************************/ +|*/ void SwBorderAttrs::_CalcTop() { @@ -1956,7 +1927,6 @@ long SwBorderAttrs::CalcLeft( const SwFrm *pCaller ) const nLeft += rLR.GetLeft(); } - // correction: do not retrieve left margin for numbering in R2L-layout // if ( pCaller->IsTxtFrm() ) if ( pCaller->IsTxtFrm() && !pCaller->IsRightToLeft() ) @@ -1967,17 +1937,12 @@ long SwBorderAttrs::CalcLeft( const SwFrm *pCaller ) const return nLeft; } -/************************************************************************* -|* -|* SwBorderAttrs::CalcTopLine(), CalcBottomLine(), -|* CalcLeftLine(), CalcRightLine() -|* +/* |* Beschreibung Berechnung der Groessen fuer Umrandung und Schatten. |* Es kann auch ohne Linien ein Abstand erwuenscht sein, |* dieser wird dann nicht vom Attribut sondern hier |* beruecksichtigt (bBorderDist, z.B. fuer Zellen). -|* -|*************************************************************************/ +|*/ void SwBorderAttrs::_CalcTopLine() { @@ -2015,8 +1980,6 @@ void SwBorderAttrs::_CalcRightLine() bRightLine = sal_False; } -/*************************************************************************/ - void SwBorderAttrs::_IsLine() { bIsLine = rBox.GetTop() || rBox.GetBottom() || @@ -2024,10 +1987,7 @@ void SwBorderAttrs::_IsLine() bLine = sal_False; } -/************************************************************************* -|* -|* SwBorderAttrs::CmpLeftRightLine(), IsTopLine(), IsBottomLine() -|* +/* |* Die Umrandungen benachbarter Absaetze werden nach folgendem |* Algorithmus zusammengefasst: |* @@ -2041,8 +2001,8 @@ void SwBorderAttrs::_IsLine() |* oben eine Umrandung haben. |* 3. Die Umrandungen links und rechts vor Vorgaenger bzw. Nachfolger |* sind identisch. -|* -|*************************************************************************/ +|*/ + inline bool CmpLines( const editeng::SvxBorderLine *pL1, const editeng::SvxBorderLine *pL2 ) { return ( ((pL1 && pL2) && (*pL1 == *pL2)) || (!pL1 && !pL2) ); @@ -2220,8 +2180,6 @@ SwBorderAttrAccess::SwBorderAttrAccess( SwCache &rCach, const SwFrm *pFrm ) : { } -/*************************************************************************/ - SwCacheObj *SwBorderAttrAccess::NewObj() { ((SwModify*)pOwner)->SetInCache( sal_True ); @@ -2233,8 +2191,6 @@ SwBorderAttrs *SwBorderAttrAccess::Get() return (SwBorderAttrs*)SwCacheAccess::Get(); } -/*************************************************************************/ - SwOrderIter::SwOrderIter( const SwPageFrm *pPg, sal_Bool bFlys ) : pPage( pPg ), pCurrent( 0 ), @@ -2242,8 +2198,6 @@ SwOrderIter::SwOrderIter( const SwPageFrm *pPg, sal_Bool bFlys ) : { } -/*************************************************************************/ - const SdrObject *SwOrderIter::Top() { pCurrent = 0; @@ -2271,8 +2225,6 @@ const SdrObject *SwOrderIter::Top() return pCurrent; } -/*************************************************************************/ - const SdrObject *SwOrderIter::Bottom() { pCurrent = 0; @@ -2300,8 +2252,6 @@ const SdrObject *SwOrderIter::Bottom() return pCurrent; } -/*************************************************************************/ - const SdrObject *SwOrderIter::Next() { const sal_uInt32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0; @@ -2330,8 +2280,6 @@ const SdrObject *SwOrderIter::Next() return pCurrent; } -/*************************************************************************/ - const SdrObject *SwOrderIter::Prev() { const sal_uInt32 nCurOrd = pCurrent ? pCurrent->GetOrdNumDirect() : 0; @@ -2360,8 +2308,6 @@ const SdrObject *SwOrderIter::Prev() return pCurrent; } -/*************************************************************************/ - //Unterstruktur eines LayoutFrms fuer eine Aktion aufheben und wieder //restaurieren. //Neuer Algorithmus: Es ist unuetz jeden Nachbarn einzeln zu betrachten und @@ -2682,8 +2628,6 @@ void RestoreCntnt( SwFrm *pSav, SwLayoutFrm *pParent, SwFrm *pSibling, bool bGro pParent->Grow( nGrowVal ); } -/*************************************************************************/ - SwPageFrm * InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper, bool bOdd, bool bFirst, bool bInsertEmpty, sal_Bool bFtn, SwFrm *pSibling ) @@ -2736,14 +2680,10 @@ SwPageFrm * InsertNewPage( SwPageDesc &rDesc, SwFrm *pUpper, return pRet; } - -/************************************************************************* -|* -|* RegistFlys(), Regist() Die beiden folgenden Methoden durchsuchen rekursiv +/* Die beiden folgenden Methoden durchsuchen rekursiv |* eine Layoutstruktur und melden alle FlyFrms, die einen beliebigen Frm |* innerhalb der Struktur als Anker haben bei der Seite an. -|* -|*************************************************************************/ +|*/ static void lcl_Regist( SwPageFrm *pPage, const SwFrm *pAnch ) { @@ -2805,15 +2745,7 @@ void RegistFlys( SwPageFrm *pPage, const SwLayoutFrm *pLay ) } } -/************************************************************************* -|* -|* void Notify() -|* -|* Beschreibung Benachrichtigt den Hintergrund je nach der -|* Veraenderung zwischen altem und neuem Rechteckt. -|* -|*************************************************************************/ - +/// Benachrichtigt den Hintergrund je nach der Veraenderung zwischen altem und neuem Rechteck. void Notify( SwFlyFrm *pFly, SwPageFrm *pOld, const SwRect &rOld, const SwRect* pOldPrt ) { @@ -2890,8 +2822,6 @@ void Notify( SwFlyFrm *pFly, SwPageFrm *pOld, const SwRect &rOld, } } -/*************************************************************************/ - static void lcl_CheckFlowBack( SwFrm* pFrm, const SwRect &rRect ) { SwTwips nBottom = rRect.Bottom(); @@ -3126,14 +3056,8 @@ void Notify_Background( const SdrObject* pObj, } } -/************************************************************************* -|* -|* GetVirtualUpper() liefert bei absatzgebundenen Objekten den Upper -|* des Ankers. Falls es sich dabei um verkettete Rahmen oder -|* Fussnoten handelt, wird ggf. der "virtuelle" Upper ermittelt. -|* -|*************************************************************************/ - +/// liefert bei absatzgebundenen Objekten den Upper des Ankers. Falls es sich dabei um +/// verkettete Rahmen oder Fussnoten handelt, wird ggf. der "virtuelle" Upper ermittelt. const SwFrm* GetVirtualUpper( const SwFrm* pFrm, const Point& rPos ) { if( pFrm->IsTxtFrm() ) @@ -3166,8 +3090,6 @@ const SwFrm* GetVirtualUpper( const SwFrm* pFrm, const Point& rPos ) return pFrm; } -/*************************************************************************/ - bool Is_Lower_Of( const SwFrm *pCurrFrm, const SdrObject* pObj ) { Point aPos; @@ -3242,9 +3164,6 @@ bool IsFrmInSameKontext( const SwFrm *pInnerFrm, const SwFrm *pFrm ) return false; } - -//--------------------------------- - static SwTwips lcl_CalcCellRstHeight( SwLayoutFrm *pCell ) { if ( pCell->Lower()->IsCntntFrm() || pCell->Lower()->IsSctFrm() ) @@ -3568,5 +3487,4 @@ bool SwDeletionChecker::HasBeenDeleted() return true; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index 5a803df01eef..6dc23a5fdcfd 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <txtftn.hxx> #include <fmtftn.hxx> #include <ftnidx.hxx> @@ -35,16 +34,10 @@ #include "viewopt.hxx" #include <switerator.hxx> -/************************************************************************* -|* -|* lcl_FindFtnPos() Sucht die Position des Attributes im FtnArray am -|* Dokument, dort stehen die Fussnoten gluecklicherweise nach ihrem -|* Index sortiert. -|* -|*************************************************************************/ - #define ENDNOTE 0x80000000 +/// Sucht die Position des Attributes im FtnArray am Dokument, dort stehen die Fussnoten +/// gluecklicherweise nach ihrem Index sortiert. static sal_uLong lcl_FindFtnPos( const SwDoc *pDoc, const SwTxtFtn *pAttr ) { const SwFtnIdxs &rFtnIdxs = pDoc->GetFtnIdxs(); @@ -70,15 +63,9 @@ sal_Bool SwFtnFrm::operator<( const SwTxtFtn* pTxtFtn ) const lcl_FindFtnPos( pDoc, pTxtFtn ); } -/************************************************************************* -|* -|* sal_Bool lcl_NextFtnBoss( SwFtnBossFrm* pBoss, SwPageFrm* pPage) -|* setzt pBoss auf den naechsten SwFtnBossFrm, das kann entweder eine Spalte -|* oder eine Seite (ohne Spalten) sein. Wenn die Seite dabei gewechselt wird -|* enthaelt pPage die neue Seite und die Funktion liefert sal_True. -|* -|*************************************************************************/ - +/// setzt pBoss auf den naechsten SwFtnBossFrm, das kann entweder eine Spalte oder eine +/// Seite (ohne Spalten) sein. Wenn die Seite dabei gewechselt wird enthaelt pPage die +/// neue Seite und die Funktion liefert sal_True. static sal_Bool lcl_NextFtnBoss( SwFtnBossFrm* &rpBoss, SwPageFrm* &rpPage, sal_Bool bDontLeave ) { @@ -120,14 +107,7 @@ static sal_Bool lcl_NextFtnBoss( SwFtnBossFrm* &rpBoss, SwPageFrm* &rpPage, return sal_True; } -/************************************************************************* -|* -|* sal_uInt16 lcl_ColumnNum( SwFrm* pBoss ) -|* liefert die Spaltennummer, wenn pBoss eine Spalte ist, -|* sonst eine Null (bei Seiten). -|* -|*************************************************************************/ - +/// liefert die Spaltennummer, wenn pBoss eine Spalte ist, sonst eine Null (bei Seiten). static sal_uInt16 lcl_ColumnNum( const SwFrm* pBoss ) { sal_uInt16 nRet = 0; @@ -156,23 +136,14 @@ static sal_uInt16 lcl_ColumnNum( const SwFrm* pBoss ) return nRet; } -/************************************************************************* -|* -|* SwFtnContFrm::SwFtnContFrm() -|* -|*************************************************************************/ - - SwFtnContFrm::SwFtnContFrm( SwFrmFmt *pFmt, SwFrm* pSib ): SwLayoutFrm( pFmt, pSib ) { mnType = FRMC_FTNCONT; } - // lcl_Undersize(..) klappert einen SwFrm und dessen Inneres ab // und liefert die Summe aller TxtFrm-Vergroesserungswuensche - static long lcl_Undersize( const SwFrm* pFrm ) { long nRet = 0; @@ -200,16 +171,8 @@ static long lcl_Undersize( const SwFrm* pFrm ) return nRet; } -/************************************************************************* -|* -|* SwFtnContFrm::Format() -|* -|* Beschreibung: "Formatiert" den Frame; -|* Die Fixsize wird hier nicht eingestellt. -|* -|*************************************************************************/ - - +/// "Formatiert" den Frame. +/// Die Fixsize wird hier nicht eingestellt. void SwFtnContFrm::Format( const SwBorderAttrs * ) { //GesamtBorder ermitteln, es gibt nur einen Abstand nach oben. @@ -290,11 +253,6 @@ void SwFtnContFrm::Format( const SwBorderAttrs * ) mbValidSize = sal_True; } } -/************************************************************************* -|* -|* SwFtnContFrm::GrowFrm(), ShrinkFrm() -|* -|*************************************************************************/ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool ) { @@ -433,7 +391,6 @@ SwTwips SwFtnContFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool ) return nReal; } - SwTwips SwFtnContFrm::ShrinkFrm( SwTwips nDiff, sal_Bool bTst, sal_Bool bInfo ) { SwPageFrm *pPage = FindPageFrm(); @@ -464,14 +421,6 @@ SwTwips SwFtnContFrm::ShrinkFrm( SwTwips nDiff, sal_Bool bTst, sal_Bool bInfo ) return 0; } - -/************************************************************************* -|* -|* SwFtnFrm::SwFtnFrm() -|* -|*************************************************************************/ - - SwFtnFrm::SwFtnFrm( SwFrmFmt *pFmt, SwFrm* pSib, SwCntntFrm *pCnt, SwTxtFtn *pAt ): SwLayoutFrm( pFmt, pSib ), pFollow( 0 ), @@ -485,13 +434,6 @@ SwFtnFrm::SwFtnFrm( SwFrmFmt *pFmt, SwFrm* pSib, SwCntntFrm *pCnt, SwTxtFtn *pAt mnType = FRMC_FTN; } -/************************************************************************* -|* -|* SwFtnFrm::InvalidateNxtFtnCnts() -|* -|*************************************************************************/ - - void SwFtnFrm::InvalidateNxtFtnCnts( SwPageFrm *pPage ) { if ( GetNext() ) @@ -530,7 +472,6 @@ SwTwips SwFtnFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) return SwLayoutFrm::GrowFrm( nDist, bTst, bInfo ); } - SwTwips SwFtnFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { static sal_uInt16 nNum = USHRT_MAX; @@ -547,13 +488,6 @@ SwTwips SwFtnFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) } #endif -/************************************************************************* -|* -|* SwFtnFrm::Cut() -|* -|*************************************************************************/ - - void SwFtnFrm::Cut() { if ( GetNext() ) @@ -605,13 +539,6 @@ void SwFtnFrm::Cut() } } -/************************************************************************* -|* -|* SwFtnFrm::Paste() -|* -|*************************************************************************/ - - void SwFtnFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) { OSL_ENSURE( pParent, "Kein Parent fuer Paste." ); @@ -671,17 +598,8 @@ void SwFtnFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) InvalidateNxtFtnCnts( pPage ); } -/************************************************************************* -|* -|* SwFrm::GetNextFtnLeaf() -|* -|* Beschreibung Liefert das naechste LayoutBlatt in den das -|* Frame gemoved werden kann. -|* Neue Seiten werden nur dann erzeugt, wenn der Parameter sal_True ist. -|* -|*************************************************************************/ - - +/// Liefert das naechste LayoutBlatt in den das Frame gemoved werden kann. +/// Neue Seiten werden nur dann erzeugt, wenn der Parameter sal_True ist. SwLayoutFrm *SwFrm::GetNextFtnLeaf( MakePageType eMakePage ) { SwFtnBossFrm *pOldBoss = FindFtnBossFrm(); @@ -765,16 +683,7 @@ SwLayoutFrm *SwFrm::GetNextFtnLeaf( MakePageType eMakePage ) return pCont; } -/************************************************************************* -|* -|* SwFrm::GetPrevFtnLeaf() -|* -|* Beschreibung Liefert das vorhergehende LayoutBlatt in das der -|* Frame gemoved werden kann. -|* -|*************************************************************************/ - - +/// Liefert das vorhergehende LayoutBlatt in das der Frame gemoved werden kann. SwLayoutFrm *SwFrm::GetPrevFtnLeaf( MakePageType eMakeFtn ) { //Der Vorgaenger fuer eine Fussnote ist falls moeglich der Master @@ -897,13 +806,6 @@ SwLayoutFrm *SwFrm::GetPrevFtnLeaf( MakePageType eMakeFtn ) return pRet; } -/************************************************************************* -|* -|* SwFrm::IsFtnAllowed() -|* -|*************************************************************************/ - - sal_Bool SwFrm::IsFtnAllowed() const { if ( !IsInDocBody() ) @@ -919,13 +821,6 @@ sal_Bool SwFrm::IsFtnAllowed() const return sal_True; } -/************************************************************************* -|* -|* SwRootFrm::UpdateFtnNums() -|* -|*************************************************************************/ - - void SwRootFrm::UpdateFtnNums() { //Seitenweise Numerierung nur wenn es am Dokument so eingestellt ist. @@ -940,13 +835,7 @@ void SwRootFrm::UpdateFtnNums() } } -/************************************************************************* -|* -|* RemoveFtns() Entfernen aller Fussnoten (nicht etwa die Referenzen) -|* und Entfernen aller Fussnotenseiten. -|* -|*************************************************************************/ - +/// Entfernen aller Fussnoten (nicht etwa die Referenzen) und Entfernen aller Fussnotenseiten. void sw_RemoveFtns( SwFtnBossFrm* pBoss, sal_Bool bPageOnly, sal_Bool bEndNotes ) { do @@ -1034,12 +923,7 @@ void SwRootFrm::RemoveFtns( SwPageFrm *pPage, sal_Bool bPageOnly, sal_Bool bEndN } while ( pPage ); } -/************************************************************************* -|* -|* SetFtnPageDescs() Seitenvorlagen der Fussnotenseiten aendern -|* -|*************************************************************************/ - +/// Seitenvorlagen der Fussnotenseiten aendern void SwRootFrm::CheckFtnPageDescs( sal_Bool bEndNote ) { SwPageFrm *pPage = (SwPageFrm*)Lower(); @@ -1051,14 +935,6 @@ void SwRootFrm::CheckFtnPageDescs( sal_Bool bEndNote ) SwFrm::CheckPageDescs( pPage, sal_False ); } - -/************************************************************************* -|* -|* SwFtnBossFrm::MakeFtnCont() -|* -|*************************************************************************/ - - SwFtnContFrm *SwFtnBossFrm::MakeFtnCont() { //Einfuegen eines Fussnotencontainers. Der Fussnotencontainer sitzt @@ -1078,13 +954,6 @@ SwFtnContFrm *SwFtnBossFrm::MakeFtnCont() return pNew; } -/************************************************************************* -|* -|* SwFtnBossFrm::FindFtnCont() -|* -|*************************************************************************/ - - SwFtnContFrm *SwFtnBossFrm::FindFtnCont() { SwFrm *pFrm = Lower(); @@ -1107,12 +976,6 @@ SwFtnContFrm *SwFtnBossFrm::FindFtnCont() return (SwFtnContFrm*)pFrm; } -/************************************************************************* -|* -|* SwFtnBossFrm::FindNearestFtnCont() Sucht den naechst greifbaren Fussnotencontainer. -|* -|*************************************************************************/ - SwFtnContFrm *SwFtnBossFrm::FindNearestFtnCont( sal_Bool bDontLeave ) { SwFtnContFrm *pCont = 0; @@ -1137,16 +1000,6 @@ SwFtnContFrm *SwFtnBossFrm::FindNearestFtnCont( sal_Bool bDontLeave ) return pCont; } - -/************************************************************************* -|* -|* SwFtnBossFrm::FindFirstFtn() -|* -|* Beschreibung Erste Fussnote des Fussnotenbosses suchen. -|* -|*************************************************************************/ - - SwFtnFrm *SwFtnBossFrm::FindFirstFtn() { //Erstmal den naechsten FussnotenContainer suchen. @@ -1225,15 +1078,7 @@ SwFtnFrm *SwFtnBossFrm::FindFirstFtn() return pRet; } -/************************************************************************* -|* -|* SwFtnBossFrm::FindFirstFtn() -|* -|* Beschreibunt Erste Fussnote zum Cnt suchen. -|* -|*************************************************************************/ - - +/// Erste Fussnote zum Cnt suchen. const SwFtnFrm *SwFtnBossFrm::FindFirstFtn( SwCntntFrm *pCnt ) const { const SwFtnFrm *pRet = ((SwFtnBossFrm*)this)->FindFirstFtn(); @@ -1267,13 +1112,6 @@ const SwFtnFrm *SwFtnBossFrm::FindFirstFtn( SwCntntFrm *pCnt ) const return pRet; } -/************************************************************************* -|* -|* SwFtnBossFrm::ResetFtn() -|* -|*************************************************************************/ - - void SwFtnBossFrm::ResetFtn( const SwFtnFrm *pCheck ) { //Vernichten der Inkarnationen von Fussnoten zum Attribut, wenn sie nicht @@ -1314,13 +1152,6 @@ void SwFtnBossFrm::ResetFtn( const SwFtnFrm *pCheck ) } } -/************************************************************************* -|* -|* SwFtnBossFrm::InsertFtn() -|* -|*************************************************************************/ - - void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew ) { //Die Fussnote haben wir, sie muss jetzt nur noch irgendwo @@ -1581,13 +1412,6 @@ void SwFtnBossFrm::InsertFtn( SwFtnFrm* pNew ) pNew->Paste( pParent, pSibling ); } -/************************************************************************* -|* -|* SwFtnBossFrm::AppendFtn() -|* -|*************************************************************************/ - - void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr ) { //Wenn es die Fussnote schon gibt tun wir nix. @@ -1808,12 +1632,6 @@ void SwFtnBossFrm::AppendFtn( SwCntntFrm *pRef, SwTxtFtn *pAttr ) else delete pNew; } -/************************************************************************* -|* -|* SwFtnBossFrm::FindFtn() -|* -|*************************************************************************/ - SwFtnFrm *SwFtnBossFrm::FindFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr ) { @@ -1854,12 +1672,6 @@ SwFtnFrm *SwFtnBossFrm::FindFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr ) return 0; } -/************************************************************************* -|* -|* SwFtnBossFrm::RemoveFtn() -|* -|*************************************************************************/ - void SwFtnBossFrm::RemoveFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr, sal_Bool bPrep ) @@ -1885,13 +1697,6 @@ void SwFtnBossFrm::RemoveFtn( const SwCntntFrm *pRef, const SwTxtFtn *pAttr, FindPageFrm()->UpdateFtnNum(); } -/************************************************************************* -|* -|* SwFtnBossFrm::ChangeFtnRef() -|* -|*************************************************************************/ - - void SwFtnBossFrm::ChangeFtnRef( const SwCntntFrm *pOld, const SwTxtFtn *pAttr, SwCntntFrm *pNew ) { @@ -1903,13 +1708,6 @@ void SwFtnBossFrm::ChangeFtnRef( const SwCntntFrm *pOld, const SwTxtFtn *pAttr, } } -/************************************************************************* -|* -|* SwFtnBossFrm::CollectFtns() -|* -|*************************************************************************/ - - /// OD 03.04.2003 #108446# - add parameter <_bCollectOnlyPreviousFtns> in /// order to control, if only footnotes, which are positioned before the /// footnote boss frame <this> have to be collected. @@ -1967,12 +1765,6 @@ void SwFtnBossFrm::CollectFtns( const SwCntntFrm* _pRef, _CollectFtns( _pRef, pFtn, _rFtnArr, _bCollectOnlyPreviousFtns, pRefBossFrm ); } - -/************************************************************************* -|* -|* SwFtnBossFrm::_CollectFtns() -|* -|*************************************************************************/ inline void FtnInArr( SwFtnFrms& rFtnArr, SwFtnFrm* pFtn ) { if ( rFtnArr.end() == std::find( rFtnArr.begin(), rFtnArr.end(), pFtn ) ) @@ -2127,13 +1919,6 @@ void SwFtnBossFrm::_CollectFtns( const SwCntntFrm* _pRef, } } -/************************************************************************* -|* -|* SwFtnBossFrm::_MoveFtns() -|* -|*************************************************************************/ - - void SwFtnBossFrm::_MoveFtns( SwFtnFrms &rFtnArr, sal_Bool bCalc ) { //Alle Fussnoten die von pRef referenziert werden muessen von der @@ -2335,13 +2120,6 @@ void SwFtnBossFrm::_MoveFtns( SwFtnFrms &rFtnArr, sal_Bool bCalc ) } } -/************************************************************************* -|* -|* SwFtnBossFrm::MoveFtns() -|* -|*************************************************************************/ - - void SwFtnBossFrm::MoveFtns( const SwCntntFrm *pSrc, SwCntntFrm *pDest, SwTxtFtn *pAttr ) { @@ -2380,13 +2158,6 @@ void SwFtnBossFrm::MoveFtns( const SwCntntFrm *pSrc, SwCntntFrm *pDest, } } -/************************************************************************* -|* -|* SwFtnBossFrm::RearrangeFtns() -|* -|*************************************************************************/ - - void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const sal_Bool bLock, const SwTxtFtn *pAttr ) { @@ -2611,12 +2382,6 @@ void SwFtnBossFrm::RearrangeFtns( const SwTwips nDeadLine, const sal_Bool bLock, } } -/************************************************************************* -|* -|* SwPageFrm::UpdateFtnNum() -|* -|*************************************************************************/ - void SwPageFrm::UpdateFtnNum() { //Seitenweise Numerierung nur wenn es am Dokument so eingestellt ist. @@ -2675,12 +2440,6 @@ void SwPageFrm::UpdateFtnNum() } } -/************************************************************************* -|* -|* SwFtnBossFrm::SetFtnDeadLine() -|* -|*************************************************************************/ - void SwFtnBossFrm::SetFtnDeadLine( const SwTwips nDeadLine ) { SwFrm *pBody = FindBodyCont(); @@ -2709,11 +2468,6 @@ void SwFtnBossFrm::SetFtnDeadLine( const SwTwips nDeadLine ) nMaxFtnHeight = nMax; } -/************************************************************************* -|* -|* SwFtnBossFrm::GetVarSpace() -|* -|*************************************************************************/ SwTwips SwFtnBossFrm::GetVarSpace() const { //Fuer Seiten soll ein Wert von 20% der Seitenhoehe nicht unterschritten @@ -2786,20 +2540,15 @@ SwTwips SwFtnBossFrm::GetVarSpace() const return nRet; } -/************************************************************************* -|* -|* SwFtnBossFrm::NeighbourhoodAdjustment(SwFrm*) -|* -|* gibt Auskunft, ob die Groessenveraenderung von pFrm von AdjustNeighbourhood(...) +/** gibt Auskunft, ob die Groessenveraenderung von pFrm von AdjustNeighbourhood(...) |* oder von Grow/Shrink(..) verarbeitet werden sollte. +|* |* Bei einem PageFrm oder in Spalten direkt unterhalb der Seite muss AdjustNei.. |* gerufen werden, in Rahmenspalten Grow/Shrink. |* Spannend sind die spaltigen Bereiche: Wenn es in der Spalte einen Fussnotencontainer |* gibt und die Fussnoten nicht vom Bereich eingesammelt werden, ist ein Adjust.., |* ansonsten ein Grow/Shrink notwendig. -|* -|*************************************************************************/ - +|*/ sal_uInt8 SwFtnBossFrm::_NeighbourhoodAdjustment( const SwFrm* ) const { sal_uInt8 nRet = NA_ONLY_ADJUST; @@ -2829,11 +2578,6 @@ sal_uInt8 SwFtnBossFrm::_NeighbourhoodAdjustment( const SwFrm* ) const return nRet; } -/************************************************************************* -|* -|* SwPageFrm::SetColMaxFtnHeight() -|* -|*************************************************************************/ void SwPageFrm::SetColMaxFtnHeight() { SwLayoutFrm *pBody = FindBodyCont(); @@ -2848,13 +2592,6 @@ void SwPageFrm::SetColMaxFtnHeight() } } -/************************************************************************* -|* -|* SwLayoutFrm::MoveLowerFtns -|* -|*************************************************************************/ - - sal_Bool SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss, SwFtnBossFrm *pNewBoss, const sal_Bool bFtnNums ) { @@ -2943,13 +2680,6 @@ sal_Bool SwLayoutFrm::MoveLowerFtns( SwCntntFrm *pStart, SwFtnBossFrm *pOldBoss, return bMoved; } -/************************************************************************* -|* -|* SwLayoutFrm::MoveFtnCntFwd() -|* -|*************************************************************************/ - - sal_Bool SwCntntFrm::MoveFtnCntFwd( sal_Bool bMakePage, SwFtnBossFrm *pOldBoss ) { OSL_ENSURE( IsInFtn(), "Keine Ftn." ); @@ -3082,13 +2812,6 @@ sal_Bool SwCntntFrm::MoveFtnCntFwd( sal_Bool bMakePage, SwFtnBossFrm *pOldBoss ) return bSamePage; } -/************************************************************************* -|* -|* class SwSaveFtnHeight -|* -|*************************************************************************/ - - SwSaveFtnHeight::SwSaveFtnHeight( SwFtnBossFrm *pBs, const SwTwips nDeadLine ) : pBoss( pBs ), nOldHeight( pBs->GetMaxFtnHeight() ) @@ -3097,8 +2820,6 @@ SwSaveFtnHeight::SwSaveFtnHeight( SwFtnBossFrm *pBs, const SwTwips nDeadLine ) : nNewHeight = pBoss->GetMaxFtnHeight(); } - - SwSaveFtnHeight::~SwSaveFtnHeight() { //Wenn zwischendurch jemand an der DeadLine gedreht hat, so lassen wir @@ -3107,7 +2828,6 @@ SwSaveFtnHeight::~SwSaveFtnHeight() pBoss->nMaxFtnHeight = nOldHeight; } - #ifdef DBG_UTIL //JP 15.10.2001: in a non pro version test if the attribute has the same // meaning which his reference is @@ -3134,7 +2854,6 @@ SwCntntFrm* SwFtnFrm::GetRef() "sw", "access to deleted Frame? pRef != pAttr->GetRef()" ); return pRef; } - #endif const SwCntntFrm* SwFtnFrm::GetRefFromAttr() const diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx index 25fb9b7e2485..b8b95a4b2601 100644 --- a/sw/source/core/layout/hffrm.cxx +++ b/sw/source/core/layout/hffrm.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "pagefrm.hxx" #include "viewsh.hxx" #include "doc.hxx" @@ -58,11 +57,9 @@ static SwTwips lcl_GetFrmMinHeight(const SwLayoutFrm & rFrm) nMinHeight = 0; } - return nMinHeight; } - static SwTwips lcl_CalcContentHeight(SwLayoutFrm & frm) { SwTwips nRemaining = 0; @@ -204,7 +201,6 @@ void SwHeadFootFrm::FormatPrt(SwTwips & nUL, const SwBorderAttrs * pAttrs) nNewHeight = 0; maPrt.Height(nNewHeight); - } else { @@ -655,16 +651,6 @@ sal_Bool SwHeadFootFrm::GetEatSpacing() const return sal_False; } - -/************************************************************************* -|* -|* SwPageFrm::PrepareHeader() -|* -|* Description Creates or removes headers -|* -|*************************************************************************/ - - void DelFlys( SwLayoutFrm *pFrm, SwPageFrm *pPage ) { for ( int i = 0; pPage->GetSortedObjs() && @@ -684,8 +670,7 @@ void DelFlys( SwLayoutFrm *pFrm, SwPageFrm *pPage ) } } - - +/// Creates or removes headers void SwPageFrm::PrepareHeader() { SwLayoutFrm *pLay = (SwLayoutFrm*)Lower(); @@ -724,15 +709,8 @@ void SwPageFrm::PrepareHeader() delete pLay; } } -/************************************************************************* -|* -|* SwPageFrm::PrepareFooter() -|* -|* Description Creates or removes footer -|* -|*************************************************************************/ - +/// Creates or removes footer void SwPageFrm::PrepareFooter() { SwLayoutFrm *pLay = (SwLayoutFrm*)Lower(); @@ -775,6 +753,4 @@ void SwPageFrm::PrepareFooter() } } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 7cd540034888..afbec8768657 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -81,16 +81,11 @@ #include <PostItMgr.hxx> #include <vector> -/************************************************************************* -|* -|* SwLayAction static stuff -|* -|*************************************************************************/ +// SwLayAction static stuff #define IS_FLYS (pPage->GetSortedObjs()) #define IS_INVAFLY (pPage->IsInvalidFly()) - // Save some typing work to avoid accessing destroyed pages. #if OSL_DEBUG_LEVEL > 1 @@ -142,11 +137,6 @@ void SwLayAction::CheckWaitCrsr() } } -/************************************************************************* -|* -|* SwLayAction::CheckIdleEnd() -|* -|*************************************************************************/ // Time over already? inline void SwLayAction::CheckIdleEnd() { @@ -154,11 +144,6 @@ inline void SwLayAction::CheckIdleEnd() bInput = GetInputType() && Application::AnyInput( GetInputType() ); } -/************************************************************************* -|* -|* SwLayAction::SetStatBar() -|* -|*************************************************************************/ void SwLayAction::SetStatBar( sal_Bool bNew ) { if ( bNew ) @@ -170,16 +155,6 @@ void SwLayAction::SetStatBar( sal_Bool bNew ) nEndPage = USHRT_MAX; } -/************************************************************************* -|* -|* SwLayAction::PaintCntnt() -|* -|* Description Depending of the type, the Cntnt is output -|* according to it's changes, or the area to be outputted is -|* registered with the region, respectively. -|* PaintCntnt: fills the region -|* -|*************************************************************************/ sal_Bool SwLayAction::PaintWithoutFlys( const SwRect &rRect, const SwCntntFrm *pCnt, const SwPageFrm *pPage ) { @@ -276,6 +251,10 @@ inline sal_Bool SwLayAction::_PaintCntnt( const SwCntntFrm *pCntnt, return sal_False; } +/** + * Depending of the type, the Cntnt is output according to it's changes, or the area + * to be outputted is registered with the region, respectively. + */ void SwLayAction::PaintCntnt( const SwCntntFrm *pCnt, const SwPageFrm *pPage, const SwRect &rOldRect, @@ -327,11 +306,6 @@ void SwLayAction::PaintCntnt( const SwCntntFrm *pCnt, } } -/************************************************************************* -|* -|* SwLayAction::SwLayAction() -|* -|*************************************************************************/ SwLayAction::SwLayAction( SwRootFrm *pRt, SwViewImp *pI ) : pRoot( pRt ), pImp( pI ), @@ -360,11 +334,6 @@ SwLayAction::~SwLayAction() pImp->pLayAct = 0; // unregister } -/************************************************************************* -|* -|* SwLayAction::Reset() -|* -|*************************************************************************/ void SwLayAction::Reset() { pOptTab = 0; @@ -376,12 +345,6 @@ void SwLayAction::Reset() bUpdateExpFlds = bBrowseActionStop = sal_False; } -/************************************************************************* -|* -|* SwLayAction::RemoveEmptyBrowserPages() -|* -|*************************************************************************/ - sal_Bool SwLayAction::RemoveEmptyBrowserPages() { // switching from the normal to the browser mode, empty pages may be @@ -409,12 +372,6 @@ sal_Bool SwLayAction::RemoveEmptyBrowserPages() return bRet; } - -/************************************************************************* -|* -|* SwLayAction::Action() -|* -|*************************************************************************/ void SwLayAction::Action() { bActionInProgress = sal_True; @@ -879,11 +836,7 @@ void SwLayAction::InternalAction() if( bNoLoop ) pLayoutAccess->GetLayouter()->EndLoopControl(); } -/************************************************************************* -|* -|* SwLayAction::TurboAction(), _TurboAction() -|* -|*************************************************************************/ + sal_Bool SwLayAction::_TurboAction( const SwCntntFrm *pCnt ) { @@ -957,19 +910,7 @@ sal_Bool SwLayAction::TurboAction() bRet = sal_False; return bRet; } -/************************************************************************* -|* -|* SwLayAction::IsShortCut() -|* -|* Description: Returns True if the page lies directly below or -|* right of the visible area. -|* It's possible for things to change in such a way that the processing -|* (of the caller!) has to continue with the predecessor of the passed -|* page. The parameter might therefore get modified! -|* For BrowseMode, you may even activate the ShortCut if the invalid -|* content of the page lies below the visible area. -|* -|*************************************************************************/ + static bool lcl_IsInvaLay( const SwFrm *pFrm, long nBottom ) { if ( @@ -1084,6 +1025,14 @@ static const SwAnchoredObject* lcl_FindFirstInvaObj( const SwPageFrm* _pPage, return 0; } +/* Returns True if the page lies directly below or right of the visible area. + * + * It's possible for things to change in such a way that the processing + * (of the caller!) has to continue with the predecessor of the passed page. + * The parameter might therefore get modified! + * For BrowseMode, you may even activate the ShortCut if the invalid content + * of the page lies below the visible area. + */ sal_Bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) { sal_Bool bRet = sal_False; @@ -1115,7 +1064,6 @@ sal_Bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) return sal_False; } - const SwRect &rVis = pImp->GetShell()->VisArea(); if ( (prPage->Frm().Top() >= rVis.Bottom()) || (prPage->Frm().Left()>= rVis.Right()) ) @@ -1302,11 +1250,6 @@ sal_Bool SwLayAction::IsShortCut( SwPageFrm *&prPage ) return bRet; } -/************************************************************************* -|* -|* SwLayAction::FormatLayout(), FormatLayoutFly, FormatLayoutTab() -|* -|*************************************************************************/ // OD 15.11.2002 #105155# - introduce support for vertical layout sal_Bool SwLayAction::FormatLayout( SwLayoutFrm *pLay, sal_Bool bAddRect ) { @@ -1723,11 +1666,6 @@ sal_Bool SwLayAction::FormatLayoutTab( SwTabFrm *pTab, sal_Bool bAddRect ) return bChanged; } -/************************************************************************* -|* -|* SwLayAction::FormatCntnt() -|* -|*************************************************************************/ sal_Bool SwLayAction::FormatCntnt( const SwPageFrm *pPage ) { const SwCntntFrm *pCntnt = pPage->ContainsCntnt(); @@ -1908,14 +1846,7 @@ sal_Bool SwLayAction::FormatCntnt( const SwPageFrm *pPage ) // OD 14.04.2003 #106346# - consider interrupt formatting. return !IsInterrupt() || mbFormatCntntOnInterrupt; } -/************************************************************************* -|* -|* SwLayAction::_FormatCntnt() -|* -|* Description Returns sal_True if the paragraph has been processed, -|* sal_False if there wasn't anything to be processed. -|* -|*************************************************************************/ + void SwLayAction::_FormatCntnt( const SwCntntFrm *pCntnt, const SwPageFrm *pPage ) { @@ -1946,15 +1877,8 @@ void SwLayAction::_FormatCntnt( const SwCntntFrm *pCntnt, } } -/************************************************************************* -|* -|* SwLayAction::_FormatFlyCntnt() -|* -|* Description: -|* - Returns sal_True if all Cntnts of the Fly have been processed completely. -|* Returns sal_False if processing has been interrupted prematurely. -|* -|*************************************************************************/ +/// Returns sal_True if all Cntnts of the Fly have been processed completely. +/// Returns sal_False if processing has been interrupted prematurely. sal_Bool SwLayAction::_FormatFlyCntnt( const SwFlyFrm *pFly ) { const SwCntntFrm *pCntnt = pFly->ContainsCntnt(); @@ -2015,11 +1939,6 @@ sal_Bool SwLayAction::IsStopPrt() const return bResult; } -/************************************************************************* -|* -|* SwLayAction::FormatSpelling(), _FormatSpelling() -|* -|*************************************************************************/ sal_Bool SwLayIdle::_DoIdleJob( const SwCntntFrm *pCnt, IdleJobType eJob ) { OSL_ENSURE( pCnt->IsTxtFrm(), "NoTxt neighbour of Txt" ); @@ -2230,11 +2149,6 @@ sal_Bool SwLayIdle::DoIdleJob( IdleJobType eJob, sal_Bool bVisAreaOnly ) } #if HAVE_FEATURE_DESKTOP && defined DBG_UTIL -/************************************************************************* -|* -|* void SwLayIdle::SwLayIdle() -|* -|*************************************************************************/ void SwLayIdle::ShowIdle( ColorData eColorData ) { if ( !m_bIndicator ) @@ -2259,11 +2173,6 @@ void SwLayIdle::ShowIdle( ColorData eColorData ) #define SHOW_IDLE( ColorData ) #endif // DBG_UTIL -/************************************************************************* -|* -|* void SwLayIdle::SwLayIdle() -|* -|*************************************************************************/ SwLayIdle::SwLayIdle( SwRootFrm *pRt, SwViewImp *pI ) : pRoot( pRt ), pImp( pI ) diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx index 3c289bc5c437..bc7bf8530dff 100644 --- a/sw/source/core/layout/laycache.cxx +++ b/sw/source/core/layout/laycache.cxx @@ -159,9 +159,7 @@ bool SwLayCacheImpl::Read( SvStream& rStream ) return !aIo.HasError(); } -/* - * SwLayoutCache::Write(..) - * writes the index (more precise: the difference between +/** writes the index (more precise: the difference between * the index and the first index of the document content) * of the first paragraph/table at the top of every page. * If at the top of a page is the rest of a paragraph/table @@ -170,7 +168,6 @@ bool SwLayCacheImpl::Read( SvStream& rStream ) * The position, size and page number of the text frames * are stored, too */ - void SwLayoutCache::Write( SvStream &rStream, const SwDoc& rDoc ) { if( rDoc.GetCurrentLayout() ) // the layout itself .. @@ -460,12 +457,7 @@ SwLayoutCache::~SwLayoutCache() delete pImpl; } -/* - * SwActualSection, - * a help class to create not nested section frames - * for nested sections. - */ - +/// helper class to create not nested section frames for nested sections. SwActualSection::SwActualSection( SwActualSection *pUp, SwSectionFrm *pSect, SwSectionNode *pNd ) : @@ -480,15 +472,12 @@ SwActualSection::SwActualSection( SwActualSection *pUp, } } -/* - * SwLayHelper - * is the helper class, which utilizes the layout cache information +/** helper class, which utilizes the layout cache information * to distribute the document content to the right pages. * It's used by the _InsertCnt(..)-function. * If there's no layout cache, the distibution to the pages is more * a guess, but a guess with statistical background. */ - SwLayHelper::SwLayHelper( SwDoc *pD, SwFrm* &rpF, SwFrm* &rpP, SwPageFrm* &rpPg, SwLayoutFrm* &rpL, SwActualSection* &rpA, sal_Bool &rB, sal_uLong nNodeIndex, bool bCache ) @@ -538,12 +527,10 @@ SwLayHelper::~SwLayHelper() } } -/* - * SwLayHelper::CalcPageCount() does not really calculate the page count, +/** Does NOT really calculate the page count, * it returns the page count value from the layout cache, if available, * otherwise it estimates the page count. */ - sal_uLong SwLayHelper::CalcPageCount() { sal_uLong nPgCount; @@ -597,8 +584,7 @@ sal_uLong SwLayHelper::CalcPageCount() return nPgCount; } -/* - * SwLayHelper::CheckInsertPage() +/** * inserts a page and return true, if * - the break after flag is set * - the actual content wants a break before @@ -607,7 +593,6 @@ sal_uLong SwLayHelper::CalcPageCount() * The break after flag is set, if the actual content * wants a break after. */ - bool SwLayHelper::CheckInsertPage() { bool bEnd = 0 == rpPage->GetNext(); @@ -682,16 +667,13 @@ bool SwLayHelper::CheckInsertPage() return false; } -/* - * SwLayHelper::CheckInsert - * is the entry point for the _InsertCnt-function. +/** entry point for the _InsertCnt-function. * The document content index is checked either it is * in the layout cache either it's time to insert a page * cause the maximal estimation of content per page is reached. * A really big table or long paragraph may contains more than * one page, in this case the needed count of pages will inserted. */ - bool SwLayHelper::CheckInsert( sal_uLong nNodeIndex ) { bool bRet = false; @@ -936,13 +918,11 @@ struct FlyCacheCompare } }; - /* - * SwLayHelper::_CheckFlyCache(..) - * If a new page is inserted, the last page is analysed. - * If there are text frames with default position, the fly cache - * is checked, if these frames are stored in the cache. - */ - +/** + * If a new page is inserted, the last page is analysed. + * If there are text frames with default position, the fly cache + * is checked, if these frames are stored in the cache. + */ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage ) { if( !pImpl || !pPage ) @@ -1028,15 +1008,13 @@ void SwLayHelper::_CheckFlyCache( SwPageFrm* pPage ) } } -/* - * SwLayHelper::CheckPageFlyCache(..) +/** * looks for the given text frame in the fly cache and sets * the position and size, if possible. * The fly cache is sorted by pages and we start searching with the given page. * If we found the page number in the fly cache, we set * the rpPage parameter to the right page, if possible. */ - bool SwLayHelper::CheckPageFlyCache( SwPageFrm* &rpPage, SwFlyFrm* pFly ) { if( !pFly->GetAnchorFrm() || !pFly->GetVirtDrawObj() || diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx index c359414bab6a..2df6a5f833c6 100644 --- a/sw/source/core/layout/layouter.cxx +++ b/sw/source/core/layout/layouter.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "layouter.hxx" #include "doc.hxx" #include "sectfrm.hxx" @@ -206,12 +205,6 @@ void SwLooping::Control( SwPageFrm* pPage ) } } -/************************************************************************* -|* -|* SwLayouter::SwLayouter() -|* -|*************************************************************************/ - SwLayouter::SwLayouter() : pEndnoter( NULL ), pLooping( NULL ), @@ -323,10 +316,8 @@ sal_Bool SwLayouter::StartLoopControl( SwDoc* pDoc, SwPageFrm *pPage ) } // #i28701# -// ----------------------------------------------------------------------------- // methods to manage text frames, which are moved forward by the positioning // of its anchored objects -// ----------------------------------------------------------------------------- void SwLayouter::ClearMovedFwdFrms( const SwDoc& _rDoc ) { if ( _rDoc.GetLayouter() && @@ -386,6 +377,7 @@ bool SwLayouter::FrmMovedFwdByObjPos( const SwDoc& _rDoc, FrmMovedFwdByObjPos( _rTxtFrm, _ornToPageNum ); } } + // #i26945# bool SwLayouter::DoesRowContainMovedFwdFrm( const SwDoc& _rDoc, const SwRowFrm& _rRowFrm ) diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index d1156b0b4a9a..d679feba662a 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -351,7 +351,6 @@ sal_uInt32 SwFrm::mnLastFrmId=0; TYPEINIT1(SwFrm,SwClient); //rtti for SwFrm TYPEINIT1(SwCntntFrm,SwFrm); //rtti for SwCntntFrm - void _FrmInit() { SwRootFrm::pVout = new SwLayVout(); @@ -363,8 +362,6 @@ void _FrmInit() SwFrm::SetCache( pNew ); } - - void _FrmFinit() { #if OSL_DEBUG_LEVEL > 0 @@ -380,11 +377,7 @@ void _FrmFinit() delete SwFrm::GetCachePtr(); } -/************************************************************************* -|* -|* RootFrm::Everything that belongs to CurrShell -|* -|*************************************************************************/ +// RootFrm::Everything that belongs to CurrShell class SwCurrShells : public std::set<CurrShell*> {}; @@ -450,19 +443,11 @@ void InitCurrShells( SwRootFrm *pRoot ) pRoot->pCurrShells = new SwCurrShells; } - -/************************************************************************* -|* -|* SwRootFrm::SwRootFrm() -|* -|* Description: +/* |* The RootFrm requests an own FrmFmt from the document, which it is |* going to delete again in the dtor. The own FrmFmt is derived from |* the passed FrmFmt. -|* -|*************************************************************************/ - - +|*/ SwRootFrm::SwRootFrm( SwFrmFmt *pFmt, SwViewShell * pSh ) : SwLayoutFrm( pFmt->GetDoc()->MakeFrmFmt( OUString("Root"), pFmt ), 0 ), @@ -574,7 +559,6 @@ void SwRootFrm::Init( SwFrmFmt* pFmt ) if( pSettingAccess->get(IDocumentSettingAccess::GLOBAL_DOCUMENT) ) pFieldsAccess->UpdateRefFlds( NULL ); //b6433357: Update page fields after loading - // ---> if ( !pCurrShell || !pCurrShell->Imp()->IsUpdateExpFlds() ) { SwDocPosUpdate aMsgHnt( pPage->Frm().Top() ); @@ -589,14 +573,6 @@ void SwRootFrm::Init( SwFrmFmt* pFmt ) mbNeedGrammarCheck = pViewSh->GetViewOptions()->IsOnlineSpell(); } -/************************************************************************* -|* -|* SwRootFrm::~SwRootFrm() -|* -|*************************************************************************/ - - - SwRootFrm::~SwRootFrm() { bTurboAllowed = sal_False; @@ -640,13 +616,6 @@ SwRootFrm::~SwRootFrm() SwFrm::Destroy(); } -/************************************************************************* -|* -|* SwRootFrm::RemoveMasterObjs() -|* -|*************************************************************************/ - - void SwRootFrm::RemoveMasterObjs( SdrPage *pPg ) { // Remove all master objects from the Page. But don't delete! @@ -658,7 +627,6 @@ void SwRootFrm::RemoveMasterObjs( SdrPage *pPg ) } } - void SwRootFrm::AllCheckPageDescs() const { if ( !IsLayoutFreezed() ) @@ -674,14 +642,17 @@ void SwRootFrm::AllInvalidateAutoCompleteWords() const pPage = (SwPageFrm*)pPage->GetNext(); } } + void SwRootFrm::AllAddPaintRect() const { GetCurrShell()->AddPaintRect( this->Frm() ); } + void SwRootFrm::AllRemoveFtns() { RemoveFtns(); } + void SwRootFrm::AllInvalidateSmartTagsOrSpelling(bool bSmartTags) const { SwPageFrm *pPage = (SwPageFrm*)this->Lower(); diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx index cd8d0ed144cd..22f621024cc2 100644 --- a/sw/source/core/layout/objectformatter.cxx +++ b/sw/source/core/layout/objectformatter.cxx @@ -33,11 +33,8 @@ #include <vector> -// ============================================================================= -// helper class <SwPageNumAndTypeOfAnchors> // --> #i26945# - Additionally the type of the anchor text frame // is collected - by type is meant 'master' or 'follow'. -// ============================================================================= class SwPageNumAndTypeOfAnchors { private: @@ -136,9 +133,6 @@ class SwPageNumAndTypeOfAnchors } }; -// ============================================================================= -// implementation of class <SwObjectFormatter> -// ============================================================================= SwObjectFormatter::SwObjectFormatter( const SwPageFrm& _rPageFrm, SwLayAction* _pLayAction, const bool _bCollectPgNumOfAnchors ) diff --git a/sw/source/core/layout/objectformatterlayfrm.cxx b/sw/source/core/layout/objectformatterlayfrm.cxx index 91552e89dcee..e0abda5ce3ef 100644 --- a/sw/source/core/layout/objectformatterlayfrm.cxx +++ b/sw/source/core/layout/objectformatterlayfrm.cxx @@ -26,9 +26,6 @@ // #124218# #include <layact.hxx> -// ============================================================================= -// implementation of class <SwObjectFormatterLayFrm> -// ============================================================================= SwObjectFormatterLayFrm::SwObjectFormatterLayFrm( SwLayoutFrm& _rAnchorLayFrm, const SwPageFrm& _rPageFrm, SwLayAction* _pLayAction ) diff --git a/sw/source/core/layout/objectformatterlayfrm.hxx b/sw/source/core/layout/objectformatterlayfrm.hxx index 89a47e0f2ee7..48c53d9a8d8e 100644 --- a/sw/source/core/layout/objectformatterlayfrm.hxx +++ b/sw/source/core/layout/objectformatterlayfrm.hxx @@ -23,10 +23,8 @@ class SwLayoutFrm; -// ----------------------------------------------------------------------------- // Format floating screen objects, which are anchored at a given anchor text frame // and registered at the given page frame. -// ----------------------------------------------------------------------------- class SwObjectFormatterLayFrm : public SwObjectFormatter { private: diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx index 16f9a453d393..9c7150032faf 100644 --- a/sw/source/core/layout/objectformattertxtfrm.cxx +++ b/sw/source/core/layout/objectformattertxtfrm.cxx @@ -33,8 +33,6 @@ using namespace ::com::sun::star; -// ============================================================================= - // little helper class to forbid follow formatting for the given text frame class SwForbidFollowFormat { @@ -59,9 +57,6 @@ public: } }; -// ============================================================================= -// implementation of class <SwObjectFormatterTxtFrm> -// ============================================================================= SwObjectFormatterTxtFrm::SwObjectFormatterTxtFrm( SwTxtFrm& _rAnchorTxtFrm, const SwPageFrm& _rPageFrm, SwTxtFrm* _pMasterAnchorTxtFrm, diff --git a/sw/source/core/layout/objectformattertxtfrm.hxx b/sw/source/core/layout/objectformattertxtfrm.hxx index eb52adaeaab6..74eff931c680 100644 --- a/sw/source/core/layout/objectformattertxtfrm.hxx +++ b/sw/source/core/layout/objectformattertxtfrm.hxx @@ -24,11 +24,9 @@ class SwTxtFrm; -// ----------------------------------------------------------------------------- // #i28701# // Format floating screen objects, which are anchored at a given anchor text frame // and registered at the given page frame. -// ----------------------------------------------------------------------------- class SwObjectFormatterTxtFrm : public SwObjectFormatter { private: diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 59dbaaa291bf..787b759b453b 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <com/sun/star/embed/EmbedStates.hpp> #include <ndole.hxx> #include <docary.hxx> @@ -72,23 +71,12 @@ using namespace ::com::sun::star; - -/************************************************************************* -|* -|* SwBodyFrm::SwBodyFrm() -|* -|*************************************************************************/ SwBodyFrm::SwBodyFrm( SwFrmFmt *pFmt, SwFrm* pSib ): SwLayoutFrm( pFmt, pSib ) { mnType = FRMC_BODY; } -/************************************************************************* -|* -|* SwBodyFrm::Format() -|* -|*************************************************************************/ void SwBodyFrm::Format( const SwBorderAttrs * ) { //Formatieren des Body ist zu einfach, deshalb bekommt er ein eigenes @@ -176,11 +164,6 @@ void SwBodyFrm::Format( const SwBorderAttrs * ) mbValidSize = mbValidPrtArea = sal_True; } -/************************************************************************* -|* -|* SwPageFrm::SwPageFrm(), ~SwPageFrm() -|* -|*************************************************************************/ SwPageFrm::SwPageFrm( SwFrmFmt *pFmt, SwFrm* pSib, SwPageDesc *pPgDsc ) : SwFtnBossFrm( pFmt, pSib ), pSortedObjs( 0 ), @@ -300,7 +283,6 @@ SwPageFrm::~SwPageFrm() } } - void SwPageFrm::CheckGrid( sal_Bool bInvalidate ) { sal_Bool bOld = bHasGrid; @@ -324,7 +306,6 @@ void SwPageFrm::CheckGrid( sal_Bool bInvalidate ) } } - void SwPageFrm::CheckDirection( sal_Bool bVert ) { sal_uInt16 nDir = @@ -370,14 +351,7 @@ void SwPageFrm::CheckDirection( sal_Bool bVert ) } } -/************************************************************************* -|* -|* SwPageFrm::PreparePage() -|* -|* Beschreibung Erzeugt die Spezifischen Flys zur Seite und formatiert -|* generischen Cntnt -|* -|*************************************************************************/ +/// Erzeugt die Spezifischen Flys zur Seite und formatiert generischen Cntnt static void lcl_FormatLay( SwLayoutFrm *pLay ) { //Alle LayoutFrms - nicht aber Tables, Flys o.ae. - formatieren. @@ -524,11 +498,6 @@ void SwPageFrm::PreparePage( sal_Bool bFtn ) } } -/************************************************************************* -|* -|* SwPageFrm::Modify() -|* -|*************************************************************************/ void SwPageFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { SwViewShell *pSh = getRootFrm()->GetCurrShell(); @@ -716,13 +685,6 @@ void SwPageFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, } } -/************************************************************************* -|* -|* SwPageFrm::GetInfo() -|* -|* Beschreibung erfragt Informationen -|* -*************************************************************************/ // erfrage vom Modify Informationen bool SwPageFrm::GetInfo( SfxPoolItem & rInfo ) const { @@ -734,11 +696,6 @@ bool SwPageFrm::GetInfo( SfxPoolItem & rInfo ) const return true; // weiter suchen } -/************************************************************************* -|* -|* SwPageFrm::SetPageDesc() -|* -|*************************************************************************/ void SwPageFrm::SetPageDesc( SwPageDesc *pNew, SwFrmFmt *pFmt ) { pDesc = pNew; @@ -746,11 +703,7 @@ void SwPageFrm::SetPageDesc( SwPageDesc *pNew, SwFrmFmt *pFmt ) SetFrmFmt( pFmt ); } -/************************************************************************* -|* -|* SwPageFrm::FindPageDesc() -|* -|* Beschreibung Der richtige PageDesc wird bestimmt: +/** Der richtige PageDesc wird bestimmt: |* 0. Vom Dokument bei Fussnotenseiten und Endnotenseiten |* 1. vom ersten BodyCntnt unterhalb der Seite. |* 2. vom PageDesc der vorstehenden Seite. @@ -761,8 +714,7 @@ void SwPageFrm::SetPageDesc( SwPageDesc *pNew, SwFrmFmt *pFmt ) |* Dokument oder Standard (der 0-te) wenn der erste Absatz keinen |* wuenscht. |* (6. Im HTML-Mode ist der Pagedesc immer die HTML-Seitenvorlage.) -|* -|*************************************************************************/ +|*/ SwPageDesc *SwPageFrm::FindPageDesc() { //0. @@ -853,17 +805,11 @@ void AdjustSizeChgNotify( SwRootFrm *pRoot ) pRoot->bCheckSuperfluous = bOld; } - inline void SetLastPage( SwPageFrm *pPage ) { ((SwRootFrm*)pPage->GetUpper())->pLastPage = pPage; } -/************************************************************************* -|* -|* SwPageFrm::Cut() -|* -|*************************************************************************/ void SwPageFrm::Cut() { //AdjustRootSize( CHG_CUTPAGE, 0 ); @@ -927,11 +873,6 @@ void SwPageFrm::Cut() static_cast<SwRootFrm*>(pRootFrm)->CheckViewLayout( 0, 0 ); } -/************************************************************************* -|* -|* SwPageFrm::Paste() -|* -|*************************************************************************/ void SwPageFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) { OSL_ENSURE( pParent->IsRootFrm(), "Parent ist keine Root." ); @@ -976,11 +917,6 @@ void SwPageFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) getRootFrm()->CheckViewLayout( 0, 0 ); } -/************************************************************************* -|* -|* SwPageFrm::PrepareRegisterChg() -|* -|*************************************************************************/ static void lcl_PrepFlyInCntRegister( SwCntntFrm *pFrm ) { pFrm->Prepare( PREP_REGISTER ); @@ -1034,16 +970,12 @@ void SwPageFrm::PrepareRegisterChg() } } -/************************************************************************* -|* -|* SwFrm::CheckPageDescs() -|* -|* Beschreibung Prueft alle Seiten ab der uebergebenen, daraufhin, +/** +|* Prueft alle Seiten ab der uebergebenen, daraufhin, |* ob sie das richtige FrmFmt verwenden. Wenn 'falsche' Seiten |* aufgespuehrt werden, so wird versucht die Situation moeglichst |* einfache zu bereinigen. -|* -|*************************************************************************/ +|*/ void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool bNotifyFields, SwPageFrm** ppPrev ) { OSL_ENSURE( pStart, "Keine Startpage." ); @@ -1261,11 +1193,6 @@ void SwFrm::CheckPageDescs( SwPageFrm *pStart, sal_Bool bNotifyFields, SwPageFrm #endif } -/************************************************************************* -|* -|* SwFrm::InsertPage() -|* -|*************************************************************************/ SwPageFrm *SwFrm::InsertPage( SwPageFrm *pPrevPage, sal_Bool bFtn ) { SwRootFrm *pRoot = (SwRootFrm*)pPrevPage->GetUpper(); @@ -1398,23 +1325,13 @@ sw::sidebarwindows::SidebarPosition SwPageFrm::SidebarPosition() const } } -/************************************************************************* -|* -|* SwRootFrm::GrowFrm() -|* -|*************************************************************************/ - SwTwips SwRootFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool ) { if ( !bTst ) Frm().SSize().Height() += nDist; return nDist; } -/************************************************************************* -|* -|* SwRootFrm::ShrinkFrm() -|* -|*************************************************************************/ + SwTwips SwRootFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool ) { OSL_ENSURE( nDist >= 0, "nDist < 0." ); @@ -1425,11 +1342,8 @@ SwTwips SwRootFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool ) return nDist; } -/************************************************************************* -|* -|* SwRootFrm::RemoveSuperfluous() +/** Entfernung von ueberfluessigen Seiten. |* -|* Beschreibung: Entfernung von ueberfluessigen Seiten. |* Arbeitet nur wenn das Flag bCheckSuperfluous gesetzt ist. |* Definition: Eine Seite ist genau dann leer, wenn der |* Body-Textbereich keinen CntntFrm enthaelt, aber nicht, wenn noch @@ -1439,8 +1353,7 @@ SwTwips SwRootFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool ) |* Es muss zweimal angesetzt werden um leeren Seiten aufzuspueren: |* - einmal fuer die Endnotenseiten. |* - und einmal fuer die Seiten des Bodytextes. -|* -|*************************************************************************/ +|*/ void SwRootFrm::RemoveSuperfluous() { if ( !IsSuperfluous() ) @@ -1528,15 +1441,8 @@ void SwRootFrm::RemoveSuperfluous() } } -/************************************************************************* -|* -|* SwRootFrm::AssertFlyPages() -|* -|* Beschreibung Stellt sicher, dass genuegend Seiten vorhanden -|* sind, damit alle Seitengebundenen Rahmen und DrawObject -|* untergebracht sind. -|* -|*************************************************************************/ +/// Stellt sicher, dass genuegend Seiten vorhanden sind, damit alle seitengebundenen +/// Rahmen und DrawObject untergebracht sind. void SwRootFrm::AssertFlyPages() { if ( !IsAssertFlyPages() ) @@ -1611,15 +1517,8 @@ void SwRootFrm::AssertFlyPages() } } -/************************************************************************* -|* -|* SwRootFrm::AssertPageFlys() -|* -|* Beschreibung Stellt sicher, dass ab der uebergebenen Seite -|* auf allen Seiten die Seitengebunden Objecte auf der richtigen -|* Seite (Seitennummer stehen). -|* -|*************************************************************************/ +/// Stellt sicher, dass ab der uebergebenen Seite auf allen Seiten die seitengebunden +/// Objecte auf der richtigen Seite (Seitennummer stehen). void SwRootFrm::AssertPageFlys( SwPageFrm *pPage ) { while ( pPage ) @@ -1664,11 +1563,6 @@ void SwRootFrm::AssertPageFlys( SwPageFrm *pPage ) } } -/************************************************************************* -|* -|* SwRootFrm::ChgSize() -|* -|*************************************************************************/ Size SwRootFrm::ChgSize( const Size& aNewSize ) { Frm().SSize() = aNewSize; @@ -1677,11 +1571,6 @@ Size SwRootFrm::ChgSize( const Size& aNewSize ) return Frm().SSize(); } -/************************************************************************* -|* -|* SwRootFrm::MakeAll() -|* -|*************************************************************************/ void SwRootFrm::MakeAll() { if ( !mbValidPos ) @@ -1700,11 +1589,6 @@ void SwRootFrm::MakeAll() mbValidSize = sal_True; } -/************************************************************************* -|* -|* SwRootFrm::ImplInvalidateBrowseWidth() -|* -|*************************************************************************/ void SwRootFrm::ImplInvalidateBrowseWidth() { bBrowseWidthValid = sal_False; @@ -1716,11 +1600,6 @@ void SwRootFrm::ImplInvalidateBrowseWidth() } } -/************************************************************************* -|* -|* SwRootFrm::ImplCalcBrowseWidth() -|* -|*************************************************************************/ void SwRootFrm::ImplCalcBrowseWidth() { OSL_ENSURE( GetCurrShell() && GetCurrShell()->GetViewOptions()->getBrowseMode(), @@ -1847,12 +1726,6 @@ void SwRootFrm::ImplCalcBrowseWidth() } while ( pFrm ); } -/************************************************************************* -|* -|* SwRootFrm::StartAllAction() -|* -|*************************************************************************/ - void SwRootFrm::StartAllAction() { SwViewShell *pSh = GetCurrShell(); diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx index a10ffcd57701..7c473277b198 100644 --- a/sw/source/core/layout/pagedesc.cxx +++ b/sw/source/core/layout/pagedesc.cxx @@ -34,17 +34,8 @@ #include <poolfmt.hxx> #include <switerator.hxx> - using namespace ::com::sun::star; -/************************************************************************* -|* -|* SwPageDesc::SwPageDesc() -|* -|*************************************************************************/ - - - SwPageDesc::SwPageDesc( const OUString& rName, SwFrmFmt *pFmt, SwDoc *pDc ) : SwModify( 0 ), aDescName( rName ), @@ -107,17 +98,8 @@ SwPageDesc::~SwPageDesc() { } -/************************************************************************* -|* -|* SwPageDesc::Mirror() -|* -|* Description Only the margin is mirrored. -|* Attributes like borders and so on are copied 1:1. -|* -|*************************************************************************/ - - - +/// Only the margin is mirrored. +/// Attributes like borders and so on are copied 1:1. void SwPageDesc::Mirror() { //Only the margins are mirrored, all other values are just copied. @@ -149,14 +131,6 @@ void SwPageDesc::ResetAllAttr( sal_Bool bLeft ) rFmt.SetFmtAttr( SvxFrameDirectionItem(FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR) ); } -/************************************************************************* -|* -|* SwPageDesc::GetInfo() -|* -|* Description retrieves information -|* -*************************************************************************/ - // gets information from Modify bool SwPageDesc::GetInfo( SfxPoolItem & rInfo ) const { @@ -169,15 +143,7 @@ bool SwPageDesc::GetInfo( SfxPoolItem & rInfo ) const return m_FirstLeft.GetInfo( rInfo ); } -/************************************************************************* -|* -|* SwPageDesc::SetRegisterFmtColl() -|* -|* Description sets the style for the grid alignment -|* -*************************************************************************/ - - +/// set the style for the grid alignment void SwPageDesc::SetRegisterFmtColl( const SwTxtFmtColl* pFmt ) { if( pFmt != GetRegisterFmtColl() ) @@ -191,30 +157,14 @@ void SwPageDesc::SetRegisterFmtColl( const SwTxtFmtColl* pFmt ) } } -/************************************************************************* -|* -|* SwPageDesc::GetRegisterFmtColl() -|* -|* Description retrieves the style for the grid alignment -|* -*************************************************************************/ - - +/// retrieve the style for the grid alignment const SwTxtFmtColl* SwPageDesc::GetRegisterFmtColl() const { const SwModify* pReg = aDepend.GetRegisteredIn(); return (SwTxtFmtColl*)pReg; } -/************************************************************************* -|* -|* SwPageDesc::RegisterChange() -|* -|* Description notifies all affected page frames -|* -*************************************************************************/ - - +/// notifie all affected page frames void SwPageDesc::RegisterChange() { // #117072# - During destruction of the document <SwDoc> @@ -267,15 +217,7 @@ void SwPageDesc::RegisterChange() } } -/************************************************************************* -|* -|* SwPageDesc::Modify() -|* -|* special handling if the style of the grid alignment changes -|* -*************************************************************************/ - - +/// special handling if the style of the grid alignment changes void SwPageDesc::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) { const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0; @@ -412,15 +354,6 @@ SwPageDesc* SwPageDesc::GetByName(SwDoc& rDoc, const OUString& rName) return 0; } - -/************************************************************************* -|* -|* SwPageFtnInfo::SwPageFtnInfo() -|* -|*************************************************************************/ - - - SwPageFtnInfo::SwPageFtnInfo() : nMaxHeight( 0 ), nLineWidth(10), @@ -434,8 +367,6 @@ SwPageFtnInfo::SwPageFtnInfo() : FTNADJ_LEFT; } - - SwPageFtnInfo::SwPageFtnInfo( const SwPageFtnInfo &rCpy ) : nMaxHeight( rCpy.GetHeight() ), nLineWidth(rCpy.nLineWidth), @@ -448,14 +379,6 @@ SwPageFtnInfo::SwPageFtnInfo( const SwPageFtnInfo &rCpy ) : { } -/************************************************************************* -|* -|* SwPageFtnInfo::operator= -|* -|*************************************************************************/ - - - SwPageFtnInfo &SwPageFtnInfo::operator=( const SwPageFtnInfo& rCpy ) { nMaxHeight = rCpy.GetHeight(); @@ -468,13 +391,6 @@ SwPageFtnInfo &SwPageFtnInfo::operator=( const SwPageFtnInfo& rCpy ) nBottomDist = rCpy.GetBottomDist(); return *this; } -/************************************************************************* -|* -|* SwPageFtnInfo::operator== -|* -|*************************************************************************/ - - sal_Bool SwPageFtnInfo::operator==( const SwPageFtnInfo& rCmp ) const { diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index f2d6effc2b2b..e622f7b05cc3 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -65,7 +65,6 @@ #include <bodyfrm.hxx> #include <hffrm.hxx> #include <colfrm.hxx> -// <-- // --> OD #i76669# #include <svx/sdr/contact/viewobjectcontactredirector.hxx> #include <svx/sdr/contact/viewobjectcontact.hxx> @@ -1183,7 +1182,6 @@ void SwSubsRects::PaintSubsidiary( OutputDevice *pOut, } } -//------------------------------------------------------------------------- // Various functions that are use in this file. // Note: function <SwAlignRect(..)> also used outside this file. @@ -2263,9 +2261,7 @@ static void lcl_AdjustRectToPixelSize( SwRect& io_aSwRect, const OutputDevice &a #endif } -// // FUNCTIONS USED FOR COLLAPSING TABLE BORDER LINES START -// struct SwLineEntry { @@ -2915,9 +2911,7 @@ void SwTabFrmPainter::Insert( SwLineEntry& rNew, bool bHori ) pLineSet->insert( rNew ); } -// // FUNCTIONS USED FOR COLLAPSING TABLE BORDER LINES END -// // --> OD #i76669# namespace @@ -2959,21 +2953,15 @@ namespace } // end of anonymous namespace // <-- -/************************************************************************* -|* -|* SwRootFrm::Paint() +/** Paint once for every visible page which is touched by Rect. |* -|* Description -|* Paint once for every visible page which is touched by Rect. |* 1. Paint borders and backgrounds. |* 2. Paint the draw layer (frames and drawing objects) that is |* below the document (hell). |* 3. Paint the document content (text) |* 4. Paint the draw layer that is above the document. -|*************************************************************************/ - -void -SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const +|*/ +void SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const { OSL_ENSURE( Lower() && Lower()->IsPageFrm(), "Lower of root is no page." ); @@ -3326,12 +3314,6 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const ((SwRootFrm*)this)->SetCallbackActionEnabled( bOldAction ); } -/************************************************************************* -|* -|* SwLayoutFrm::Paint() -|* -|*************************************************************************/ - static void lcl_EmergencyFormatFtnCont( SwFtnContFrm *pCont ) { //It's possible that the Cont will get destroyed. @@ -3825,12 +3807,6 @@ bool SwFlyFrm::IsShadowTransparent() const return GetFmt()->IsShadowTransparent(); }; -/************************************************************************* -|* -|* SwFlyFrm::IsPaint() -|* -|*************************************************************************/ - sal_Bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) { SdrObjUserCall *pUserCall; @@ -3925,21 +3901,12 @@ sal_Bool SwFlyFrm::IsPaint( SdrObject *pObj, const SwViewShell *pSh ) return bPaint; } -/************************************************************************* -|* SwCellFrm::Paint( const SwRect& ) const -|*************************************************************************/ void SwCellFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { if ( GetLayoutRowSpan() >= 1 ) SwLayoutFrm::Paint( rRect ); } -/************************************************************************* -|* -|* SwFlyFrm::Paint() -|* -|*************************************************************************/ - struct BorderLinesGuard { explicit BorderLinesGuard() : m_pBorderLines(g_pBorderLines) @@ -4193,11 +4160,6 @@ void SwFlyFrm::Paint(SwRect const& rRect, SwPrintData const*const) const if ( pProgress && pNoTxt ) pProgress->Reschedule(); } -/************************************************************************* -|* -|* SwTabFrm::Paint() -|* -|*************************************************************************/ void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const { @@ -4221,7 +4183,6 @@ void SwTabFrm::Paint(SwRect const& rRect, SwPrintData const*const) const SwTabFrmPainter aHelper( *this ); aHelper.PaintLines( *pGlobalShell->GetOut(), rRect ); } - // <-- collapsing SwLayoutFrm::Paint( rRect ); } @@ -4461,18 +4422,14 @@ static void lcl_PaintShadow( const SwRect& rRect, SwRect& rOutRect, } } -/************************************************************************* +/** Paints a shadow if the format requests so. |* -|* SwFrm::PaintShadow() -|* -|* Description Paints a shadow if the format requests so. |* The shadow is always painted on the outer edge of the OutRect. |* If needed, the OutRect is shrunk so the painting of the border can be |* done on it. |* -|*************************************************************************/ -/// OD 23.08.2002 #99657# -/// draw full shadow rectangle for frames with transparent drawn backgrounds. +|* @note: draw full shadow rectangle for frames with transparent drawn backgrounds (OD 23.08.2002 #99657#) +*/ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect, const SwBorderAttrs &rAttrs ) const { @@ -4511,12 +4468,6 @@ void SwFrm::PaintShadow( const SwRect& rRect, SwRect& rOutRect, lcl_PaintShadow(rRect, rOutRect, rShadow, bDrawFullShadowRectangle, bTop, bBottom, true, true); } -/************************************************************************* -|* -|* SwFrm::PaintBorderLine() -|* -|*************************************************************************/ - void SwFrm::PaintBorderLine( const SwRect& rRect, const SwRect& rOutRect, const SwPageFrm *pPage, @@ -4550,14 +4501,7 @@ void SwFrm::PaintBorderLine( const SwRect& rRect, pLines->AddLineRect( aOut, pColor, nStyle, pTab, nSubCol ); } -/************************************************************************* -|* -|* SwFrm::PaintBorderLines() -|* -|* Descrtiption Only all lines once or all lines twice! -|* -|*************************************************************************/ - +/// @note Only all lines once or all lines twice! // OD 29.04.2003 #107169# - method called for left and right border rectangles. // For a printer output device perform adjustment for non-overlapping top and // bottom border rectangles. Thus, add parameter <_bPrtOutputDev> to indicate @@ -5023,14 +4967,7 @@ void PaintCharacterBorder( } } -/************************************************************************* -|* -|* const SwFrm* lcl_HasNextCell( const SwFrm& rFrm ) -|* -|* No comment. #i15844# -|* -|*************************************************************************/ - +// #i15844# static const SwFrm* lcl_HasNextCell( const SwFrm& rFrm ) { OSL_ENSURE( rFrm.IsCellFrm(), @@ -5049,14 +4986,6 @@ static const SwFrm* lcl_HasNextCell( const SwFrm& rFrm ) return 0; } -/************************************************************************* -|* -|* SwFrm::PaintBorder() -|* -|* Description Paints shadows and borders -|* -|*************************************************************************/ - /** local method to determine cell frame, from which the border attributes for paint of top/bottom border has to be used. @@ -5248,6 +5177,7 @@ void SwFrm::ProcessPrimitives( const drawinglayer::primitive2d::Primitive2DSeque } } +/// Paints shadows and borders void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage, const SwBorderAttrs &rAttrs ) const { @@ -5383,15 +5313,10 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage, rAttrs.SetGetCacheLine( sal_False ); } } -/************************************************************************* -|* -|* SwFtnContFrm::PaintBorder() -|* -|* Description Special implementation because of the footnote line. +/* Special implementation because of the footnote line. |* Currently only the top frame needs to be taken into account. |* Other lines and shadows are set aside. -|*************************************************************************/ - +|*/ void SwFtnContFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage, const SwBorderAttrs & ) const { @@ -5402,14 +5327,8 @@ void SwFtnContFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage, if ( !aRect.IsInside( rRect ) ) PaintLine( rRect, pPage ); } -/************************************************************************* -|* -|* SwFtnContFrm::PaintLine() -|* -|* Description Paint footnote lines. -|* -|*************************************************************************/ +/// Paint footnote lines. void SwFtnContFrm::PaintLine( const SwRect& rRect, const SwPageFrm *pPage ) const { @@ -5449,14 +5368,7 @@ void SwFtnContFrm::PaintLine( const SwRect& rRect, rInf.GetLineStyle() ); } -/************************************************************************* -|* -|* SwLayoutFrm::PaintColLines() -|* -|* Description Paints the separator line for inside columns -|* -|*************************************************************************/ - +/// Paints the separator line for inside columns void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFmtCol &rFmtCol, const SwPageFrm *pPage ) const { @@ -6282,12 +6194,6 @@ SwRect SwPageFrm::GetBoundRect() const return nRet; } -/************************************************************************* -|* -|* SwFrm::PaintBaBo() -|* -|*************************************************************************/ - void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage, const sal_Bool bLowerBorder, const bool bOnlyTxtBackground ) const { @@ -6332,11 +6238,6 @@ void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage, pOut->Pop(); } -/************************************************************************* -|* -|* SwFrm::PaintBackground() -|* -|*************************************************************************/ /// OD 05.09.2002 #102912# /// Do not paint background for fly frames without a background brush by /// calling <PaintBaBo> at the page or at the fly frame its anchored @@ -6530,14 +6431,7 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage, } } -/************************************************************************* -|* -|* SwPageFrm::RefreshSubsidiary() -|* -|* Description Refreshes all subsidiary lines of a page. -|* -|*************************************************************************/ - +/// Refreshes all subsidiary lines of a page. void SwPageFrm::RefreshSubsidiary( const SwRect &rRect ) const { if ( IS_SUBS || IS_SUBS_TABLE || IS_SUBS_SECTION || IS_SUBS_FLYS ) @@ -6575,11 +6469,6 @@ void SwPageFrm::RefreshSubsidiary( const SwRect &rRect ) const } } -/************************************************************************* -|* -|* SwLayoutFrm::RefreshLaySubsidiary() -|* -|*************************************************************************/ void SwLayoutFrm::RefreshLaySubsidiary( const SwPageFrm *pPage, const SwRect &rRect ) const { @@ -6623,16 +6512,9 @@ void SwLayoutFrm::RefreshLaySubsidiary( const SwPageFrm *pPage, } } -/************************************************************************* -|* -|* SwLayoutFrm::PaintSubsidiaryLines() -|* -|* Description Subsidiary lines to paint the PrtAreas -|* Only the LayoutFrms which directly contain Cntnt. -|* -|*************************************************************************/ - -//Paints the desired line and pays attention to not overpaint any flys. +/// Subsidiary lines to paint the PrtAreas. +/// Only the LayoutFrms which directly contain Cntnt. +/// Paints the desired line and pays attention to not overpaint any flys. // OD 18.11.2002 #99672# - new parameter <_pSubsLines> static void lcl_RefreshLine( const SwLayoutFrm *pLay, const SwPageFrm *pPage, @@ -7069,16 +6951,8 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage, } } -/************************************************************************* -|* -|* SwPageFrm::RefreshExtraData(), SwLayoutFrm::RefreshExtraData() -|* -|* Description Refreshes all extra data (line breaks a.s.o) of the -|* page. Basically only those objects are considered which -|* horizontally overlap the Rect. -|* -|*************************************************************************/ - +/// Refreshes all extra data (line breaks a.s.o) of the page. Basically only those objects +/// are considered which horizontally overlap the Rect. void SwPageFrm::RefreshExtraData( const SwRect &rRect ) const { const SwLineNumberInfo &rInfo = GetFmt()->GetDoc()->GetLineNumberInfo(); @@ -7193,14 +7067,7 @@ const Color& SwPageFrm::GetDrawBackgrdColor() const return aGlobalRetoucheColor; } -/************************************************************************* -|* -|* SwPageFrm::GetEmptyPageFont() -|* -|* create/return font used to paint the "empty page" string -|* -|*************************************************************************/ - +/// create/return font used to paint the "empty page" string const Font& SwPageFrm::GetEmptyPageFont() { static Font* pEmptyPgFont = 0; @@ -7219,16 +7086,12 @@ const Font& SwPageFrm::GetEmptyPageFont() return *pEmptyPgFont; } -/************************************************************************* -|* -|* SwFrm::Retouche +/** Retouch for a section. |* -|* Description Retouch for a section. |* Retouch will only be done, if the Frm is the last one in his chain. |* The whole area of the upper which is located below the Frm will be |* cleared using PaintBackground. -|*************************************************************************/ - +|*/ void SwFrm::Retouche( const SwPageFrm * pPage, const SwRect &rRect ) const { if ( bFlyMetafile ) @@ -7438,12 +7301,6 @@ sal_Bool SwFrm::GetBackgroundBrush( const SvxBrushItem* & rpBrush, return sal_False; } -/************************************************************************* -|* -|* SwFrmFmt::GetGraphic() -|* -|*************************************************************************/ - void SetOutDevAndWin( SwViewShell *pSh, OutputDevice *pO, Window *pW, sal_uInt16 nZoom ) { diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index a3f41057c443..c4f20ea1c932 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <svl/smplhint.hxx> #include <svl/itemiter.hxx> #include <hints.hxx> @@ -55,11 +54,6 @@ #include <flyfrms.hxx> #include <sortedobjs.hxx> -/************************************************************************* -|* -|* SwSectionFrm::SwSectionFrm(), ~SwSectionFrm() -|* -|*************************************************************************/ SwSectionFrm::SwSectionFrm( SwSection &rSect, SwFrm* pSib ) : SwLayoutFrm( rSect.GetFmt(), pSib ) , SwFlowFrm( static_cast<SwFrm&>(*this) ) @@ -166,12 +160,6 @@ SwSectionFrm::~SwSectionFrm() } } - -/************************************************************************* -|* -|* SwSectionFrm::DelEmpty() -|* -|*************************************************************************/ void SwSectionFrm::DelEmpty( sal_Bool bRemove ) { if( IsColLocked() ) @@ -229,11 +217,6 @@ void SwSectionFrm::DelEmpty( sal_Bool bRemove ) } } -/************************************************************************* -|* -|* SwSectionFrm::Cut() -|* -|*************************************************************************/ void SwSectionFrm::Cut() { _Cut( sal_True ); @@ -315,12 +298,6 @@ void SwSectionFrm::_Cut( sal_Bool bRemove ) } } -/************************************************************************* -|* -|* SwSectionFrm::Paste() -|* -|*************************************************************************/ - void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) { OSL_ENSURE( pParent, "Kein Parent fuer Paste." ); @@ -421,18 +398,12 @@ void SwSectionFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) } } - -/************************************************************************* -|* -|* SwSectionFrm::HasToBreak() -|* +/** |* Here it's decided whether the this-SectionFrm should break up |* the passed (Section)frm (or not). |* Initiall, all superior sections are broken up. Later on that could |* be made configurable. -|* -|*************************************************************************/ - +|*/ sal_Bool SwSectionFrm::HasToBreak( const SwFrm* pFrm ) const { if( !pFrm->IsSctFrm() ) @@ -453,16 +424,11 @@ sal_Bool SwSectionFrm::HasToBreak( const SwFrm* pFrm ) const } while( true ); // ( pTmp->GetSect().GetValue() ); } -/************************************************************************* -|* -|* SwSectionFrm::MergeNext() -|* +/** |* Merges two SectionFrms, in case it's about the same section. |* This can be necessary when a (sub)section is deleted that had |* divided another part into two. -|* -|*************************************************************************/ - +|*/ void SwSectionFrm::MergeNext( SwSectionFrm* pNxt ) { if( !pNxt->IsJoinLocked() && GetSection() == pNxt->GetSection() ) @@ -497,17 +463,12 @@ void SwSectionFrm::MergeNext( SwSectionFrm* pNxt ) } } -/************************************************************************* -|* -|* SwSectionFrm::SplitSect() -|* +/** |* Divides a SectionFrm into two parts. The second one starts with the |* passed frame. |* This is required when inserting an inner section, because the MoveFwd |* cannot have the desired effect within a frame or a table cell. -|* -|*************************************************************************/ - +|*/ sal_Bool SwSectionFrm::SplitSect( SwFrm* pFrm, sal_Bool bApres ) { OSL_ENSURE( pFrm, "SplitSect: Why?" ); @@ -549,20 +510,15 @@ sal_Bool SwSectionFrm::SplitSect( SwFrm* pFrm, sal_Bool bApres ) return sal_False; } -/************************************************************************* -|* -|* SwSectionFrm::MoveCntntAndDelete() -|* +/** |* MoveCntnt is called for destroying a SectionFrms, due to |* the cancellation or hiding of a section, to handle the content. |* If the SectionFrm hasn't broken up another one, then the content |* is moved to the Upper. Otherwise the content is moved to another |* SectionFrm, which has to be potentially merged. -|* -|*************************************************************************/ +|*/ // If a multi-column section is cancelled, the ContentFrms have to be // invalidated - static void lcl_InvalidateInfFlags( SwFrm* pFrm, bool bInva ) { while ( pFrm ) @@ -580,10 +536,7 @@ static void lcl_InvalidateInfFlags( SwFrm* pFrm, bool bInva ) } } - -// // Works like SwCntntFrm::ImplGetNextCntntFrm, but starts with a LayoutFrm -// static SwCntntFrm* lcl_GetNextCntntFrm( const SwLayoutFrm* pLay, bool bFwd ) { if ( bFwd ) @@ -898,17 +851,12 @@ sal_Bool SwSectionFrm::CalcMinDiff( SwTwips& rMinDiff ) const return sal_False; } -/************************************************************************* - * - * SwSectionFrm::CollectEndnotes( ) - * +/** * CollectEndnotes looks for endnotes in the sectionfrm and his follows, * the endnotes will cut off the layout and put into the array. * If the first endnote is not a master-SwFtnFrm, the whole sectionfrm * contains only endnotes and it is not necessary to collect them. - * - *************************************************************************/ - + */ static SwFtnFrm* lcl_FindEndnote( SwSectionFrm* &rpSect, bool &rbEmpty, SwLayouter *pLayouter ) { @@ -1005,21 +953,16 @@ void SwSectionFrm::CollectEndnotes( SwLayouter* pLayouter ) lcl_ColumnRefresh( this, true ); } -/************************************************************************* -|* -|* SwSectionFrm::_CheckClipping( sal_Bool bGrow, sal_Bool bMaximize ) +/** Fits the size to the surroundings. |* -|* Description: Fits the size to the surroundings. |* Those that have a Follow or foot notes, have to extend until |* the lower edge of a upper (bMaximize) |* They must not extend above the Upper, as the case may be one can |* try to grow its upper (bGrow) |* If the size had to be changed, the content is calculated. |* -|*************************************************************************/ - -/// OD 18.09.2002 #100522# -/// perform calculation of content, only if height has changed. +|* @note: perform calculation of content, only if height has changed (OD 18.09.2002 #100522#) +|*/ void SwSectionFrm::_CheckClipping( sal_Bool bGrow, sal_Bool bMaximize ) { SWRECTFN( this ) @@ -1120,7 +1063,6 @@ void SwSectionFrm::SimpleFormat() SWRECTFN( this ) if( GetPrev() || GetUpper() ) { - // // assure notifications on position changes. const SwLayNotify aNotify( this ); (this->*fnRect->fnMakePos)( GetUpper(), GetPrev(), sal_False ); @@ -1277,14 +1219,7 @@ class ExtraFormatToPositionObjs } }; -/************************************************************************* -|* -|* SwSectionFrm::Format() -|* -|* Description: "formats" the frame; Frm and PrtArea -|* -|*************************************************************************/ - +/// "formats" the frame; Frm and PrtArea void SwSectionFrm::Format( const SwBorderAttrs *pAttr ) { if( !pSection ) // via DelEmpty @@ -1500,17 +1435,8 @@ void SwSectionFrm::Format( const SwBorderAttrs *pAttr ) } } -/************************************************************************* -|* -|* SwFrm::GetNextSctLeaf() -|* -|* Description: Returns the next layout sheet where the frame -|* can be moved in. -|* New pages are created only if the parameter sal_True is set -|* -|*************************************************************************/ - - +/// Returns the next layout sheet where the frame can be moved in. +/// New pages are created only if the parameter sal_True is set. SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage ) { // Attention: Nested sections are currently not supported @@ -1734,16 +1660,7 @@ SwLayoutFrm *SwFrm::GetNextSctLeaf( MakePageType eMakePage ) return pLayLeaf; } -/************************************************************************* -|* -|* SwFrm::GetPrevSctLeaf() -|* -|* Description Returns the preceding layout sheet where the frame -|* can be moved into -|* -|*************************************************************************/ - - +/// Returns the preceding layout sheet where the frame can be moved into SwLayoutFrm *SwFrm::GetPrevSctLeaf( MakePageType ) { PROTOCOL_ENTER( this, PROT_LEAF, ACT_PREV_SECT, GetUpper()->FindSctFrm() ) @@ -1964,12 +1881,6 @@ sal_Bool SwSectionFrm::Growable() const return ( GetUpper() && ((SwFrm*)GetUpper())->Grow( LONG_MAX, sal_True ) ); } -/************************************************************************* -|* -|* SwSectionFrm::_Grow(), _Shrink() -|* -|*************************************************************************/ - SwTwips SwSectionFrm::_Grow( SwTwips nDist, sal_Bool bTst ) { if ( !IsColLocked() && !HasFixSize() ) @@ -2170,10 +2081,7 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, sal_Bool bTst ) return 0L; } -/************************************************************************* -|* -|* SwSectionFrm::MoveAllowed() -|* +/* |* When are Frms within a SectionFrms moveable? |* If they are not in the last column of a SectionFrms yet, |* if there is no Follow, @@ -2182,11 +2090,10 @@ SwTwips SwSectionFrm::_Shrink( SwTwips nDist, sal_Bool bTst ) |* layout sheet. In (column based/chained) Flys this is checked via |* GetNextLayout, in tables and headers/footers there is none, however in the |* DocBody and in foot notes there is always one. +|* |* This routine is used in the TxtFormatter to decided whether it's allowed to |* create a (paragraph-)Follow or whether the paragraph has to stick together -|* -|*************************************************************************/ - +|*/ sal_Bool SwSectionFrm::MoveAllowed( const SwFrm* pFrm) const { // Is there a Follow or is the Frame not in the last column? @@ -2367,12 +2274,6 @@ void SwSectionFrm::CalcEndAtEndFlag() } } -/************************************************************************* -|* -|* SwSectionFrm::Modify() -|* -|*************************************************************************/ - void SwSectionFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { sal_uInt8 nInvFlags = 0; @@ -2532,11 +2433,7 @@ void SwSectionFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew } } -/*-------------------------------------------------- - * SwSectionFrm::ToMaximize(..): A follow or a ftncontainer at the end of the - * page causes a maximal Size of the sectionframe. - * --------------------------------------------------*/ - +/// A follow or a ftncontainer at the end of the page causes a maximal Size of the sectionframe. sal_Bool SwSectionFrm::ToMaximize( sal_Bool bCheckFollow ) const { if( HasFollow() ) @@ -2565,11 +2462,7 @@ sal_Bool SwSectionFrm::ToMaximize( sal_Bool bCheckFollow ) const return bRet; } -/*-------------------------------------------------- - * sal_Bool SwSectionFrm::ContainsFtnCont() - * checks every Column for FtnContFrms. - * --------------------------------------------------*/ - +/// Check every Column for FtnContFrms. SwFtnContFrm* SwSectionFrm::ContainsFtnCont( const SwFtnContFrm* pCont ) const { SwFtnContFrm* pRet = NULL; @@ -2610,13 +2503,11 @@ void SwSectionFrm::InvalidateFtnPos() } } -/*-------------------------------------------------- - * SwSectionFrm::Undersize() returns the value that the section - * would like to be greater if it has undersized TxtFrms in it, - * otherwise Null.. +/** Returns the value that the section would like to be + * greater if it has undersized TxtFrms in it, + * otherwise Null. * If necessary the undersized-flag is corrected. - * --------------------------------------------------*/ - + */ long SwSectionFrm::Undersize( sal_Bool bOverSize ) { m_bUndersized = sal_False; @@ -2664,7 +2555,8 @@ void SwSectionFrm::CalcFtnCntnt() } } } -/* -------------------------------------------------- + +/* * If a SectionFrm gets empty, e.g. because its content changes the page/column, * it is not destroyed immediately (there could be a pointer left to it on the * stack), instead it puts itself in a list at the RootFrm, which is processed @@ -2675,8 +2567,7 @@ void SwSectionFrm::CalcFtnCntnt() * With InsertEmptySct the RootFrm stores a SectionFrm in the list, * with RemoveFromList it can be removed from the list (Dtor), * with DeleteEmptySct the list is processed and the SectionFrms are destroyed. - * --------------------------------------------------*/ - + */ void SwRootFrm::InsertEmptySct( SwSectionFrm* pDel ) { if( !pDestroy ) diff --git a/sw/source/core/layout/softpagebreak.cxx b/sw/source/core/layout/softpagebreak.cxx index 754edcc26020..71224526f2d9 100644 --- a/sw/source/core/layout/softpagebreak.cxx +++ b/sw/source/core/layout/softpagebreak.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "ndtxt.hxx" #include "txtfrm.hxx" #include "pagefrm.hxx" diff --git a/sw/source/core/layout/sortedobjs.cxx b/sw/source/core/layout/sortedobjs.cxx index 234a7b68dae0..fb31df781752 100644 --- a/sw/source/core/layout/sortedobjs.cxx +++ b/sw/source/core/layout/sortedobjs.cxx @@ -29,10 +29,8 @@ #include <svx/svdobj.hxx> #include <IDocumentDrawModelAccess.hxx> - using namespace ::com::sun::star; - SwSortedObjs::SwSortedObjs() { } diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index 1169bd384a47..ee41215eb8c6 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <ftnfrm.hxx> #include <pagefrm.hxx> #include <rootfrm.hxx> @@ -205,12 +204,7 @@ void SwFrm::SetRightLeftMargins( long nRight, long nLeft) const sal_uInt16 nMinVertCellHeight = 1135; -/*-------------------------------------------------- - * SwFrm::CheckDirChange(..) - * checks the layout direction and - * invalidates the lower frames rekursivly, if necessary. - * --------------------------------------------------*/ - +/// checks the layout direction and invalidates the lower frames rekursivly, if necessary. void SwFrm::CheckDirChange() { bool bOldVert = GetVerticalFlag(); @@ -305,10 +299,7 @@ void SwFrm::CheckDirChange() } } -/*-------------------------------------------------- - * SwFrm::GetFrmAnchorPos(..) - * returns the position for anchors based on frame direction - * --------------------------------------------------*/ +/// returns the position for anchors based on frame direction // OD 2004-03-10 #i11860# - consider lower space and line spacing of // previous frame according to new option 'Use former object positioning' Point SwFrm::GetFrmAnchorPos( sal_Bool bIgnoreFlysAnchoredAtThisFrame ) const @@ -346,13 +337,6 @@ Point SwFrm::GetFrmAnchorPos( sal_Bool bIgnoreFlysAnchoredAtThisFrame ) const return aAnchor; } - -/************************************************************************* -|* -|* SwFrm::~SwFrm() -|* -|*************************************************************************/ - void SwFrm::Destroy() { // accessible objects for fly and cell frames have been already disposed @@ -409,8 +393,6 @@ SwFrm::~SwFrm() #endif } -/*************************************************************************/ - const SwFrmFmt * SwLayoutFrm::GetFmt() const { return static_cast< const SwFlyFrmFmt * >( GetDep() ); @@ -421,14 +403,6 @@ SwFrmFmt * SwLayoutFrm::GetFmt() return static_cast< SwFlyFrmFmt * >( GetDep() ); } - -/************************************************************************* -|* -|* SwLayoutFrm::SetFrmFmt() -|* -|*************************************************************************/ - - void SwLayoutFrm::SetFrmFmt( SwFrmFmt *pNew ) { if ( pNew != GetFmt() ) @@ -440,18 +414,12 @@ void SwLayoutFrm::SetFrmFmt( SwFrmFmt *pNew ) } } -/************************************************************************* -|* SwCntntFrm::SwCntntFrm() -|*************************************************************************/ SwCntntFrm::SwCntntFrm( SwCntntNode * const pCntnt, SwFrm* pSib ) : SwFrm( pCntnt, pSib ), SwFlowFrm( (SwFrm&)*this ) { } -/************************************************************************* -|* SwCntntFrm::~SwCntntFrm() -|*************************************************************************/ SwCntntFrm::~SwCntntFrm() { SwCntntNode* pCNd; @@ -549,12 +517,6 @@ void SwCntntFrm::DelFrms( const SwCntntNode& rNode ) } } -/************************************************************************* -|* -|* SwLayoutFrm::~SwLayoutFrm -|* -|*************************************************************************/ - void SwLayoutFrm::Destroy() { while (!aVertPosOrientFrmsFor.empty()) @@ -653,16 +615,11 @@ SwLayoutFrm::~SwLayoutFrm() } } -/************************************************************************* -|* -|* SwFrm::PaintArea() -|* +/** |* The paintarea is the area, in which the content of a frame is allowed |* to be displayed. This region could be larger than the printarea (Prt()) |* of the upper, it includes e.g. often the margin of the page. -|* -|*************************************************************************/ - +|*/ const SwRect SwFrm::PaintArea() const { // NEW TABLES @@ -754,15 +711,10 @@ const SwRect SwFrm::PaintArea() const return aRect; } -/************************************************************************* -|* -|* SwFrm::UnionFrm() -|* +/** |* The unionframe is the framearea (Frm()) of a frame expanded by the |* printarea, if there's a negative margin at the left or right side. -|* -|*************************************************************************/ - +|*/ const SwRect SwFrm::UnionFrm( sal_Bool bBorder ) const { sal_Bool bVert = IsVertical(); @@ -814,7 +766,4 @@ const SwRect SwFrm::UnionFrm( sal_Bool bBorder ) const return aRet; } - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/swselectionlist.cxx b/sw/source/core/layout/swselectionlist.cxx index 52cf047d1bf9..dac1cd40d14f 100644 --- a/sw/source/core/layout/swselectionlist.cxx +++ b/sw/source/core/layout/swselectionlist.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <swselectionlist.hxx> #include <layfrm.hxx> #include <flyfrm.hxx> diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 3971506c13ad..8e5dfa87d272 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -70,12 +70,6 @@ extern void AppendObjs( const SwFrmFmts *pTbl, sal_uLong nIndex, using namespace ::com::sun::star; - -/************************************************************************* -|* -|* SwTabFrm::SwTabFrm(), ~SwTabFrm() -|* -|*************************************************************************/ SwTabFrm::SwTabFrm( SwTable &rTab, SwFrm* pSib ): SwLayoutFrm( rTab.GetFrmFmt(), pSib ), SwFlowFrm( (SwFrm&)*this ), @@ -171,11 +165,6 @@ SwTabFrm::~SwTabFrm() } } -/************************************************************************* -|* -|* SwTabFrm::JoinAndDelFollows() -|* -|*************************************************************************/ void SwTabFrm::JoinAndDelFollows() { SwTabFrm *pFoll = GetFollow(); @@ -186,11 +175,6 @@ void SwTabFrm::JoinAndDelFollows() delete pFoll; } -/************************************************************************* -|* -|* SwTabFrm::RegistFlys() -|* -|*************************************************************************/ void SwTabFrm::RegistFlys() { OSL_ENSURE( Lower() && Lower()->IsRowFrm(), "No rows." ); @@ -255,9 +239,7 @@ static SwTwips lcl_GetHeightOfRows( const SwFrm* pStart, long nCount ) |* START: local helper functions for splitting row frames |*************************************************************************/ -// // Local helper function to insert a new follow flow line -// static SwRowFrm* lcl_InsertNewFollowFlowLine( SwTabFrm& rTab, const SwFrm& rTmpRow, bool bRowSpanLine ) { OSL_ENSURE( rTmpRow.IsRowFrm(), "No row frame to copy for FollowFlowLine" ); @@ -350,9 +332,8 @@ static void lcl_InvalidateLowerObjs( SwLayoutFrm& _rLayoutFrm, pLowerFrm = pLowerFrm->GetNext(); } } -// + // Local helper function to shrink all lowers of rRow to 0 height -// static void lcl_ShrinkCellsAndAllContent( SwRowFrm& rRow ) { SwCellFrm* pCurrMasterCell = static_cast<SwCellFrm*>(rRow.Lower()); @@ -415,11 +396,9 @@ static void lcl_ShrinkCellsAndAllContent( SwRowFrm& rRow ) } } -// // Local helper function to move the content from rSourceLine to rDestLine // The content is inserted behind the last content in the corresponding // cell in rDestLine. -// static void lcl_MoveRowContent( SwRowFrm& rSourceLine, SwRowFrm& rDestLine ) { SwCellFrm* pCurrDestCell = (SwCellFrm*)rDestLine.Lower(); @@ -482,10 +461,8 @@ static void lcl_MoveRowContent( SwRowFrm& rSourceLine, SwRowFrm& rDestLine ) } } -// // Local helper function to move all footnotes in rRowFrm from // the footnote boss of rSource to the footnote boss of rDest. -// static void lcl_MoveFootnotes( SwTabFrm& rSource, SwTabFrm& rDest, SwLayoutFrm& rRowFrm ) { if ( !rSource.GetFmt()->GetDoc()->GetFtnIdxs().empty() ) @@ -496,9 +473,7 @@ static void lcl_MoveFootnotes( SwTabFrm& rSource, SwTabFrm& rDest, SwLayoutFrm& } } -// // Local helper function to handle nested table cells before the split process -// static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine, SwRowFrm& rFollowFlowLine, SwTwips nRemain ) { @@ -507,9 +482,7 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine, SWRECTFN( pCurrLastLineCell ) - // // Move content of follow cells into master cells - // while ( pCurrLastLineCell ) { if ( pCurrLastLineCell->Lower() && pCurrLastLineCell->Lower()->IsRowFrm() ) @@ -531,25 +504,19 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine, rTab.IsConsiderObjsForMinCellHeight() ); } - // // pTmpLastLineRow does not fit to the line or it is the last line - // if ( pTmpLastLineRow ) { - // // Check if we can move pTmpLastLineRow to the follow table, // or if we have to split the line: - // SwFrm* pCell = pTmpLastLineRow->Lower(); bool bTableLayoutToComplex = false; long nMinHeight = 0; - // // We have to take into account: // 1. The fixed height of the row // 2. The borders of the cells inside the row // 3. The minimum height of the row - // if ( pTmpLastLineRow->HasFixSize() ) nMinHeight = (pTmpLastLineRow->Frm().*fnRect->fnGetHeight)(); else @@ -574,7 +541,6 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine, nMinHeight = std::max( nMinHeight, rSz.GetHeight() ); } - // // 1. Case: // The line completely fits into the master table. // Nevertheless, we build a follow (otherwise painting problems @@ -583,7 +549,6 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine, // 2. Case: // The line has to be split, the minimum height still fits into // the master table, and the table structure is not to complex. - // if ( nTmpCut > nCurrentHeight || ( pTmpLastLineRow->IsRowSplitAllowed() && !bTableLayoutToComplex && nMinHeight < nTmpCut ) ) @@ -597,9 +562,7 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine, pTmpLastLineRow = (SwRowFrm*)pTmpLastLineRow->GetNext(); } - // // The following lines have to be moved: - // while ( pTmpLastLineRow ) { SwRowFrm* pTmp = (SwRowFrm*)pTmpLastLineRow->GetNext(); @@ -618,9 +581,7 @@ static void lcl_PreprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine, } } -// // Local helper function to handle nested table cells after the split process -// static void lcl_PostprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine ) { SwCellFrm* pCurrMasterCell = (SwCellFrm*)rLastLine.Lower(); @@ -652,9 +613,7 @@ static void lcl_PostprocessRowsInCells( SwTabFrm& rTab, SwRowFrm& rLastLine ) } } -// // Local helper function to re-calculate the split line. -// inline void TableSplitRecalcLock( SwFlowFrm *pTab ) { pTab->LockJoin(); } inline void TableSplitRecalcUnlock( SwFlowFrm *pTab ) { pTab->UnlockJoin(); } @@ -665,15 +624,11 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine, SwTabFrm& rTab = (SwTabFrm&)*rLastLine.GetUpper(); - // // If there are nested cells in rLastLine, the recalculation of the last // line needs some preprocessing. - // lcl_PreprocessRowsInCells( rTab, rLastLine, rFollowLine, nRemainingSpaceForLastRow ); - // // Here the recalculation process starts: - // rTab.SetRebuildLastLine( sal_True ); // #i26945# rTab.SetDoesObjsFit( sal_True ); @@ -682,23 +637,19 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine, // #i26945# - invalidate and move floating screen // objects 'out of range' ::lcl_InvalidateLowerObjs( rLastLine, true ); - // + // manipulate row and cell sizes - // + // #i26945# - Do *not* consider floating screen objects // for the minimal cell height. rTab.SetConsiderObjsForMinCellHeight( sal_False ); ::lcl_ShrinkCellsAndAllContent( rLastLine ); rTab.SetConsiderObjsForMinCellHeight( sal_True ); - // // invalidate last line - // ::SwInvalidateAll( &rLastLine, LONG_MAX ); - // // Lock this tab frame and its follow - // bool bUnlockMaster = false; bool bUnlockFollow = false; SwTabFrm* pMaster = rTab.IsFollow() ? (SwTabFrm*)rTab.FindMaster() : 0; @@ -713,51 +664,39 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine, ::TableSplitRecalcLock( rTab.GetFollow() ); } - // // Do the recalculation - // lcl_RecalcRow( rLastLine, LONG_MAX ); // #115759# - force a format of the last line in order to // get the correct height. rLastLine.InvalidateSize(); rLastLine.Calc(); - // // Unlock this tab frame and its follow - // if ( bUnlockFollow ) ::TableSplitRecalcUnlock( rTab.GetFollow() ); if ( bUnlockMaster ) ::TableSplitRecalcUnlock( pMaster ); - // // If there are nested cells in rLastLine, the recalculation of the last // line needs some postprocessing. - // lcl_PostprocessRowsInCells( rTab, rLastLine ); - // // Do a couple of checks on the current situation. // // If we are not happy with the current situation we return false. // This will start a new try to split the table, this time we do not // try to split the table rows. - // - // // 1. Check if table fits to its upper. // #i26945# - include check, if objects fit - // const SwTwips nDistanceToUpperPrtBottom = (rTab.Frm().*fnRect->fnBottomDist)( (rTab.GetUpper()->*fnRect->fnGetPrtBottom)()); if ( nDistanceToUpperPrtBottom < 0 || !rTab.DoesObjsFit() ) bRet = false; - // // 2. Check if each cell in the last line has at least one content frame. // // Note: a FollowFlowRow may contains empty cells! - // if ( bRet ) { if ( !rLastLine.IsInFollowFlowRow() ) @@ -775,9 +714,7 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine, } } - // // 3. Check if last line does not contain any content: - // if ( bRet ) { if ( !rLastLine.ContainsCntnt() ) @@ -786,10 +723,7 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine, } } - - // // 4. Check if follow flow line does not contain content: - // if ( bRet ) { if ( !rFollowLine.IsRowSpanLine() && !rFollowLine.ContainsCntnt() ) @@ -800,19 +734,15 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine, if ( bRet ) { - // // Everything looks fine. Splitting seems to be successful. We invalidate // rFollowLine to force a new formatting. - // ::SwInvalidateAll( &rFollowLine, LONG_MAX ); } else { - // // Splitting the table row gave us an unexpected result. // Everything has to be prepared for a second try to split // the table, this time without splitting the row. - // ::SwInvalidateAll( &rLastLine, LONG_MAX ); } @@ -823,9 +753,7 @@ static bool lcl_RecalcSplitLine( SwRowFrm& rLastLine, SwRowFrm& rFollowLine, return bRet; } -// // Sets the correct height for all spanned cells -// static void lcl_AdjustRowSpanCells( SwRowFrm* pRow ) { SWRECTFN( pRow ) @@ -846,7 +774,6 @@ static void lcl_AdjustRowSpanCells( SwRowFrm* pRow ) } } -// // Returns the maximum layout row span of the row // Looking for the next row that contains no covered cells: static long lcl_GetMaximumLayoutRowSpan( const SwRowFrm& rRow ) @@ -882,11 +809,9 @@ static long lcl_GetMaximumLayoutRowSpan( const SwRowFrm& rRow ) |* END: local helper functions for splitting row frames |*************************************************************************/ -// // Function to remove the FollowFlowLine of rTab. // The content of the FollowFlowLine is moved to the associated line in the // master table. -// bool SwTabFrm::RemoveFollowFlowLine() { // find FollowFlowLine @@ -990,11 +915,6 @@ static bool lcl_FindSectionsInRow( const SwRowFrm& rRow ) return bRet; } -/************************************************************************* -|* -|* SwTabFrm::Split(), Join() -|* -|*************************************************************************/ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKeep ) { bool bRet = true; @@ -1023,9 +943,7 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee (*fnRect->fnYDiff)( nCutPos, (Frm().*fnRect->fnGetTop)() ); nRemainingSpaceForLastRow -= (this->*fnRect->fnGetTopMargin)(); - // // Make pRow point to the line that does not fit anymore: - // while( pRow->GetNext() && nRemainingSpaceForLastRow >= ( (pRow->Frm().*fnRect->fnGetHeight)() + (IsCollapsingBorders() ? @@ -1039,7 +957,6 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee pRow = static_cast<SwRowFrm*>(pRow->GetNext()); } - // // bSplitRowAllowed: Row may be split according to its attributes. // bTryToSplit: Row will never be split if bTryToSplit = false. // This can either be passed as a parameter, indicating @@ -1047,7 +964,6 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee // table, or it will be set to falseunder certain // conditions that are not suitable for splitting // the row. - // bool bSplitRowAllowed = pRow->IsRowSplitAllowed(); // #i29438# @@ -1055,7 +971,6 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee // a splitting of the table row. // Special DoNotSplit case 1: // Search for sections inside pRow: - // if ( lcl_FindSectionsInRow( *pRow ) ) { bTryToSplit = false; @@ -1068,21 +983,17 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee bool bKeepNextRow = false; if ( nRowCount < nRepeat ) { - // // First case: One of the repeated headline does not fit to the page anymore. // At least one more non-heading row has to stay in this table in // order to avoid loops: - // OSL_ENSURE( !GetIndPrev(), "Table is supposed to be at beginning" ); bKeepNextRow = true; } else if ( !GetIndPrev() && nRepeat == nRowCount ) { - // // Second case: The first non-headline row does not fit to the page. // If it is not allowed to be split, or it contains a sub-row that // is not allowed to be split, we keep the row in this table: - // if ( bTryToSplit && bSplitRowAllowed ) { // Check if there are (first) rows inside this row, @@ -1108,9 +1019,7 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee bKeepNextRow = true; } - // // Better keep the next row in this table: - // if ( bKeepNextRow ) { pRow = GetFirstNonHeadlineRow(); @@ -1123,18 +1032,14 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee } } - // // No more row to split or to move to follow table: - // if ( !pRow ) return bRet; - // // We try to split the row if // - the attributes of the row are set accordingly and // - we are allowed to do so // - the it should not keep with the next row - // bSplitRowAllowed = bSplitRowAllowed && bTryToSplit && ( !bTableRowKeep || !pRow->ShouldRowKeepWithNext() ); @@ -1159,11 +1064,9 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee } } - // // If we do not indent to split pRow, we check if we are // allowed to move pRow to a follow. Otherwise we return // false, indicating an error - // if ( !bSplitRowAllowed ) { SwRowFrm* pFirstNonHeadlineRow = GetFirstNonHeadlineRow(); @@ -1183,9 +1086,7 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee } } - // // Build follow table if not already done: - // bool bNewFollow; SwTabFrm *pFoll; if ( GetFollow() ) @@ -1198,21 +1099,15 @@ bool SwTabFrm::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKee bNewFollow = true; pFoll = new SwTabFrm( *this ); - // // We give the follow table an initial width. - // (pFoll->Frm().*fnRect->fnAddWidth)( (Frm().*fnRect->fnGetWidth)() ); (pFoll->Prt().*fnRect->fnAddWidth)( (Prt().*fnRect->fnGetWidth)() ); (pFoll->Frm().*fnRect->fnSetLeft)( (Frm().*fnRect->fnGetLeft)() ); - // // Insert the new follow table - // pFoll->InsertBehind( GetUpper(), this ); - // // Repeat the headlines. - // for ( nRowCount = 0; nRowCount < nRepeat; ++nRowCount ) { // Insert new headlines: @@ -1388,11 +1283,6 @@ bool SwTabFrm::Join() return true; } -/************************************************************************* -|* -|* SwTabFrm::MakeAll() -|* -|*************************************************************************/ void SwInvalidatePositions( SwFrm *pFrm, long nBottom ) { // LONG_MAX == nBottom means we have to calculate all @@ -1476,7 +1366,6 @@ static void lcl_InvalidateAllLowersPrt( SwLayoutFrm* pLayFrm ) pFrm = pFrm->GetNext(); } } -// <-- collapsing bool SwCntntFrm::CalcLowers( SwLayoutFrm* pLay, const SwLayoutFrm* pDontLeave, long nBottom, bool bSkipRowSpanCells ) @@ -2158,9 +2047,7 @@ void SwTabFrm::MakeAll() nDeadLine += pTmp->Grow( LONG_MAX, sal_True ); if( (Frm().*fnRect->fnBottomDist)( nDeadLine ) > 0 ) { - // // First, we remove an existing follow flow line. - // if ( HasFollowFlowLine() ) { SwFrm* pLastLine = const_cast<SwFrm*>(GetLastLower()); @@ -2183,10 +2070,8 @@ void SwTabFrm::MakeAll() continue; } - // // If there is no follow flow line, we move the first // row in the follow table to the master table. - // SwRowFrm *pRow = GetFollow()->GetFirstNonHeadlineRow(); //The follow becomes empty and invalid for this reason. @@ -2339,12 +2224,10 @@ void SwTabFrm::MakeAll() continue; } - // // First try to split the table. Condition: // 1. We have at least one non headline row // 2. If this row wants to keep, we need an additional row // 3. The table is allowed to split or we do not have an pIndPrev: - // SwFrm* pIndPrev = GetIndPrev(); const SwRowFrm* pFirstNonHeadlineRow = GetFirstNonHeadlineRow(); // #i120016# if this row wants to keep, allow split in case that all rows want to keep with next, @@ -2439,9 +2322,7 @@ void SwTabFrm::MakeAll() aNotify.SetLowersComplete( sal_False ); bSplit = true; - // // An existing follow flow line has to be removed. - // if ( HasFollowFlowLine() ) { RemoveFollowFlowLine(); @@ -2468,7 +2349,6 @@ void SwTabFrm::MakeAll() if ( GetFollow() && !GetFollow()->GetFirstNonHeadlineRow() ) Join(); - // We want to restore the situation before the failed // split operation as good as possible. Therefore we // do some more calculations. Note: Restricting this @@ -2653,13 +2533,7 @@ void SwTabFrm::MakeAll() aNotify.SetInvaKeep(); } -/************************************************************************* -|* -|* SwTabFrm::CalcFlyOffsets() -|* -|* Description: Calculate the offsets arising because of FlyFrames -|* -|*************************************************************************/ +/// Calculate the offsets arising because of FlyFrames sal_Bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper, long& rLeftOffset, long& rRightOffset ) const @@ -2792,14 +2666,8 @@ sal_Bool SwTabFrm::CalcFlyOffsets( SwTwips& rUpper, return bInvalidatePrtArea; } -/************************************************************************* -|* -|* SwTabFrm::Format() -|* -|* Description: "Formats" the frame; Frm and PrtArea -|* The fixed size is not adjusted here. -|* -|*************************************************************************/ +/// "Formats" the frame; Frm and PrtArea. +/// The fixed size is not adjusted here. void SwTabFrm::Format( const SwBorderAttrs *pAttrs ) { OSL_ENSURE( pAttrs, "TabFrm::Format, pAttrs ist 0." ); @@ -2833,7 +2701,6 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs ) // #i29550# if ( IsCollapsingBorders() ) nLower += GetBottomLineSize(); - // <-- collapsing if ( !mbValidPrtArea ) { mbValidPrtArea = sal_True; @@ -3058,11 +2925,7 @@ void SwTabFrm::Format( const SwBorderAttrs *pAttrs ) Grow( -nDiff ); } } -/************************************************************************* -|* -|* SwTabFrm::GrowFrm() -|* -|*************************************************************************/ + SwTwips SwTabFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { SWRECTFN( this ) @@ -3140,11 +3003,7 @@ SwTwips SwTabFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) return nDist; } -/************************************************************************* -|* -|* SwTabFrm::Modify() -|* -|*************************************************************************/ + void SwTabFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { sal_uInt8 nInvFlags = 0; @@ -3297,11 +3156,6 @@ void SwTabFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew, } } -/************************************************************************* -|* -|* SwTabFrm::GetInfo() -|* -|*************************************************************************/ bool SwTabFrm::GetInfo( SfxPoolItem &rHnt ) const { if ( RES_VIRTPAGENUM_INFO == rHnt.Which() && IsInDocBody() && !IsFollow() ) @@ -3328,11 +3182,6 @@ bool SwTabFrm::GetInfo( SfxPoolItem &rHnt ) const return true; } -/************************************************************************* -|* -|* SwTabFrm::FindLastCntnt() -|* -|*************************************************************************/ SwCntntFrm *SwTabFrm::FindLastCntnt() { SwFrm *pRet = pLower; @@ -3403,13 +3252,7 @@ SwCntntFrm *SwTabFrm::FindLastCntnt() return (SwCntntFrm*)pRet; } -/************************************************************************* -|* -|* SwTabFrm::ShouldBwdMoved() -|* -|* Description Return value defines if the frm needs to be relocated -|* -|*************************************************************************/ +/// Return value defines if the frm needs to be relocated sal_Bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool &rReformat ) { rReformat = sal_False; @@ -3506,11 +3349,6 @@ sal_Bool SwTabFrm::ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool, sal_Bool &r return sal_False; } -/************************************************************************* -|* -|* SwTabFrm::Cut() -|* -|*************************************************************************/ void SwTabFrm::Cut() { OSL_ENSURE( GetUpper(), "Cut ohne Upper()." ); @@ -3597,11 +3435,6 @@ void SwTabFrm::Cut() ((SwRootFrm*)pPage->GetUpper())->InvalidateBrowseWidth(); } -/************************************************************************* -|* -|* SwTabFrm::Paste() -|* -|*************************************************************************/ void SwTabFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) { OSL_ENSURE( pParent, "No parent for pasting." ); @@ -3663,22 +3496,12 @@ void SwTabFrm::Paste( SwFrm* pParent, SwFrm* pSibling ) } } -/************************************************************************* -|* -|* SwTabFrm::Prepare() -|* -|*************************************************************************/ void SwTabFrm::Prepare( const PrepareHint eHint, const void *, sal_Bool ) { if( PREP_BOSS_CHGD == eHint ) CheckDirChange(); } -/************************************************************************* -|* -|* SwRowFrm::SwRowFrm(), ~SwRowFrm() -|* -|*************************************************************************/ SwRowFrm::SwRowFrm( const SwTableLine &rLine, SwFrm* pSib, bool bInsertContent ): SwLayoutFrm( rLine.GetFrmFmt(), pSib ), pTabLine( &rLine ), @@ -3687,7 +3510,6 @@ SwRowFrm::SwRowFrm( const SwTableLine &rLine, SwFrm* pSib, bool bInsertContent ) mnTopMarginForLowers( 0 ), mnBottomMarginForLowers( 0 ), mnBottomLineSize( 0 ), - // <-- collapsing // --> split table rows bIsFollowFlowRow( false ), // <-- split table rows @@ -3718,21 +3540,11 @@ SwRowFrm::~SwRowFrm() } } -/************************************************************************* -|* -|* SwRowFrm::RegistFlys() -|* -|*************************************************************************/ void SwRowFrm::RegistFlys( SwPageFrm *pPage ) { ::RegistFlys( pPage ? pPage : FindPageFrm(), this ); } -/************************************************************************* -|* -|* SwRowFrm::Modify() -|* -|*************************************************************************/ void SwRowFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which(); @@ -3769,13 +3581,6 @@ void SwRowFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) SwLayoutFrm::Modify( pOld, pNew ); } - - -/************************************************************************* -|* -|* SwRowFrm::MakeAll() -|* -|*************************************************************************/ void SwRowFrm::MakeAll() { if ( !GetNext() ) @@ -3783,11 +3588,6 @@ void SwRowFrm::MakeAll() SwLayoutFrm::MakeAll(); } -/************************************************************************* -|* -|* SwRowFrm::Format() -|* -|*************************************************************************/ long CalcHeightWidthFlys( const SwFrm *pFrm ) { SWRECTFN( pFrm ) @@ -3902,7 +3702,6 @@ static SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrm& rCell, const SwBor nTopSpace = ((SwRowFrm*)rCell.GetUpper())->GetTopMarginForLowers(); nBottomSpace = ((SwRowFrm*)rCell.GetUpper())->GetBottomMarginForLowers(); } - // <-- collapsing else { if ( pTab->IsVertical() != rCell.IsVertical() ) @@ -3920,7 +3719,6 @@ static SwTwips lcl_CalcTopAndBottomMargin( const SwLayoutFrm& rCell, const SwBor return nTopSpace + nBottomSpace; } - // #i26945# - add parameter <_bConsiderObjs> in order to // control, if floating screen objects have to be considered for the minimal // cell height. @@ -4129,8 +3927,6 @@ static sal_uInt16 lcl_GetBottomLineDist( const SwRowFrm& rRow ) return nBottomLineDist; } -// <-- collapsing - void SwRowFrm::Format( const SwBorderAttrs *pAttrs ) { SWRECTFN( this ) @@ -4158,7 +3954,6 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs ) const sal_uInt16 nBottomLineSize = lcl_GetBottomLineSize( *this ); const sal_uInt16 nBottomLineDist = lcl_GetBottomLineDist( *this ); - const SwRowFrm* pPreviousRow = 0; // #i32456# @@ -4247,7 +4042,6 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs ) SetTopMarginForLowers( nTopPrtMargin ); // 5. } -// <-- collapsing } while ( !mbValidSize ) @@ -4298,11 +4092,6 @@ void SwRowFrm::Format( const SwBorderAttrs *pAttrs ) } } -/************************************************************************* -|* -|* SwRowFrm::AdjustCells() -|* -|*************************************************************************/ void SwRowFrm::AdjustCells( const SwTwips nHeight, const sal_Bool bHeight ) { SwFrm *pFrm = Lower(); @@ -4399,11 +4188,6 @@ void SwRowFrm::AdjustCells( const SwTwips nHeight, const sal_Bool bHeight ) InvalidatePage(); } -/************************************************************************* -|* -|* SwRowFrm::Cut() -|* -|*************************************************************************/ void SwRowFrm::Cut() { SwTabFrm *pTab = FindTabFrm(); @@ -4437,13 +4221,6 @@ void SwRowFrm::Cut() SwLayoutFrm::Cut(); } -/************************************************************************* -|* -|* SwRowFrm::GrowFrm() -|* -|*************************************************************************/ - - SwTwips SwRowFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { SwTwips nReal = 0; @@ -4466,9 +4243,7 @@ SwTwips SwRowFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) OSL_ENSURE( !bRestrictTableGrowth || !GetNext(), "GetFollowRow for row frame that has a Next" ); - // // There may still be some space left in my direct upper: - // const SwTwips nAdditionalSpace = (Frm().*fnRect->fnBottomDist)( (GetUpper()->GetUpper()->*fnRect->fnGetPrtBottom)() ); if ( bRestrictTableGrowth && nAdditionalSpace > 0 ) @@ -4510,11 +4285,6 @@ SwTwips SwRowFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) return nReal; } -/************************************************************************* -|* -|* SwRowFrm::ShrinkFrm() -|* -|*************************************************************************/ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { SWRECTFN( this ) @@ -4608,11 +4378,6 @@ SwTwips SwRowFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) return nReal; } -/************************************************************************* -|* -|* SwRowFrm::IsRowSplitAllowed() -|* -|*************************************************************************/ bool SwRowFrm::IsRowSplitAllowed() const { // Fixed size rows are never allowed to split: @@ -4633,11 +4398,6 @@ bool SwRowFrm::IsRowSplitAllowed() const return rLP.GetValue(); } -/************************************************************************* -|* -|* SwRowFrm::ShouldRowKeepWithNext() -|* -|*************************************************************************/ bool SwRowFrm::ShouldRowKeepWithNext() const { bool bRet = false; @@ -4652,11 +4412,6 @@ bool SwRowFrm::ShouldRowKeepWithNext() const return bRet; } -/************************************************************************* -|* -|* SwCellFrm::SwCellFrm(), ~SwCellFrm() -|* -|*************************************************************************/ SwCellFrm::SwCellFrm( const SwTableBox &rBox, SwFrm* pSib, bool bInsertContent ) : SwLayoutFrm( rBox.GetFrmFmt(), pSib ), pTabBox( &rBox ) @@ -4706,11 +4461,6 @@ SwCellFrm::~SwCellFrm() } } -/************************************************************************* -|* -|* SwCellFrm::Format() -|* -|*************************************************************************/ static bool lcl_ArrangeLowers( SwLayoutFrm *pLay, long lYStart, bool bInva ) { bool bRet = false; @@ -4957,7 +4707,6 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs ) } else { - // <-- collapsing // OD 23.01.2003 #106895# - add 1st param to <SwBorderAttrs::CalcRight(..)> nLeftSpace = pAttrs->CalcLeft( this ); nRightSpace = pAttrs->CalcRight( this ); @@ -5185,12 +4934,6 @@ void SwCellFrm::Format( const SwBorderAttrs *pAttrs ) } } -/************************************************************************* -|* -|* SwCellFrm::Modify() -|* -|*************************************************************************/ - void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { bool bAttrSetChg = pNew && RES_ATTRSET_CHG == pNew->Which(); @@ -5255,15 +4998,10 @@ void SwCellFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) pTabFrm->InvalidatePrt(); } } - // <-- collapsing SwLayoutFrm::Modify( pOld, pNew ); } -/************************************************************************* -|* SwCellFrm::GetLayoutRowSpan() const -|*************************************************************************/ - long SwCellFrm::GetLayoutRowSpan() const { long nRet = GetTabBox()->getRowSpan(); @@ -5297,13 +5035,8 @@ void SwCellFrm::Cut() SwLayoutFrm::Cut(); } -// // Helper functions for repeated headlines: -// -/* - * SwTabFrm::IsInHeadline( const SwFrm& rFrm ) - */ bool SwTabFrm::IsInHeadline( const SwFrm& rFrm ) const { OSL_ENSURE( IsAnLower( &rFrm ) && rFrm.IsInTab(), @@ -5317,8 +5050,6 @@ bool SwTabFrm::IsInHeadline( const SwFrm& rFrm ) const } /* - * SwTabFrm::GetFirstNonHeadlineRow() - * * If this is a master table, we can may assume, that there are at least * nRepeat lines in the table. * If this is a follow table, there are intermediate states for the table @@ -5349,9 +5080,6 @@ SwRowFrm* SwTabFrm::GetFirstNonHeadlineRow() const return (SwRowFrm*)pRet; } -/* - * SwTable::IsHeadline() - */ bool SwTable::IsHeadline( const SwTableLine& rLine ) const { for ( sal_uInt16 i = 0; i < GetRowsToRepeat(); ++i ) @@ -5388,12 +5116,7 @@ bool SwTabFrm::IsCollapsingBorders() const return ((SfxBoolItem&)GetFmt()->GetAttrSet().Get( RES_COLLAPSING_BORDERS )).GetValue(); } -// <-- collapsing - - -// -// Local helper function to calculate height of first text row -// +/// Local helper function to calculate height of first text row static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrm& rSourceLine ) { // Find corresponding split line in master table @@ -5401,7 +5124,6 @@ static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrm& rSourceLine ) SWRECTFN( pTab ) const SwCellFrm* pCurrSourceCell = (SwCellFrm*)rSourceLine.Lower(); - // // 1. Case: rSourceLine is a follow flow line. // In this case we have to return the minimum of the heights // of the first lines in rSourceLine. @@ -5409,7 +5131,6 @@ static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrm& rSourceLine ) // 2. Case: rSourceLine is not a follow flow line. // In this case we have to return the maximum of the heights // of the first lines in rSourceLine. - // bool bIsInFollowFlowLine = rSourceLine.IsInFollowFlowRow(); SwTwips nHeight = bIsInFollowFlowLine ? LONG_MAX : 0; @@ -5534,9 +5255,7 @@ static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrm& rSourceLine ) return ( LONG_MAX == nHeight ) ? 0 : nHeight; } -// -// Function to calculate height of first text row -// +/// Function to calculate height of first text row SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const { SWRECTFN( this ) @@ -5654,10 +5373,8 @@ SwTwips SwTabFrm::CalcHeightOfFirstContentLine() const return nTmpHeight; } -// // Some more functions for covered/covering cells. This way inclusion of // SwCellFrm can be avoided -// bool SwFrm::IsLeaveUpperAllowed() const { diff --git a/sw/source/core/layout/unusedf.cxx b/sw/source/core/layout/unusedf.cxx index e98901747900..57f6864e96bb 100644 --- a/sw/source/core/layout/unusedf.cxx +++ b/sw/source/core/layout/unusedf.cxx @@ -17,12 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "rootfrm.hxx" #include "cntfrm.hxx" #include "flyfrm.hxx" - void SwFrm::Format( const SwBorderAttrs * ) { OSL_FAIL( "Format() of the base class called." ); @@ -77,5 +75,4 @@ sal_Bool SwFrm::GetCharRect( SwRect&, const SwPosition&, return sal_False; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/virtoutp.cxx b/sw/source/core/layout/virtoutp.cxx index c0aa493683f6..2c4c90da6e7e 100644 --- a/sw/source/core/layout/virtoutp.cxx +++ b/sw/source/core/layout/virtoutp.cxx @@ -29,10 +29,6 @@ #if OSL_DEBUG_LEVEL > 1 -/************************************************************************* - * class DbgRect - *************************************************************************/ - class DbgRect { OutputDevice *pOut; @@ -120,11 +116,6 @@ void SetMappingForVirtDev( const Point& _rNewOrigin, _pVirDev->SetPixelOffset( Size( -aPixelOffset.X(), -aPixelOffset.Y() ) ); } - -/************************************************************************* - * SwVOut::DoesFit() - *************************************************************************/ - // rSize must be pixel coordinates! sal_Bool SwLayVout::DoesFit( const Size &rNew ) { @@ -159,9 +150,6 @@ sal_Bool SwLayVout::DoesFit( const Size &rNew ) return sal_True; } -/************************************************************************* - * SwLayVout::Enter - *************************************************************************/ /// OD 27.09.2002 #103636# - change 2nd parameter <rRect> - no longer <const> /// in order to return value of class member variable <aRect>, if virtual /// output is used. @@ -227,10 +215,6 @@ void SwLayVout::Enter( SwViewShell *pShell, SwRect &rRect, sal_Bool bOn ) } } -/************************************************************************* - * SwLayVout::Flush() - *************************************************************************/ - void SwLayVout::_Flush() { OSL_ENSURE( pVirDev, "SwLayVout::DrawOut: nothing left Toulouse" ); @@ -240,5 +224,4 @@ void SwLayVout::_Flush() pOut = NULL; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/virtoutp.hxx b/sw/source/core/layout/virtoutp.hxx index bec49d21250e..1a754dfa4df0 100644 --- a/sw/source/core/layout/virtoutp.hxx +++ b/sw/source/core/layout/virtoutp.hxx @@ -27,10 +27,6 @@ class SwViewShell; #define VIRTUALHEIGHT 64 -/************************************************************************* - * class SwTxtVout - *************************************************************************/ - class SwLayVout { friend void _FrmFinit(); //deletes Vout @@ -61,8 +57,6 @@ public: void Flush() { if( pOut ) _Flush(); } }; - - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 42c60de81dc6..6d16cfd2b903 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <hintids.hxx> #include <hints.hxx> #include <vcl/outdev.hxx> @@ -65,16 +64,8 @@ // OD 2004-05-24 #i28701# #include <sortedobjs.hxx> - using namespace ::com::sun::star; - -/************************************************************************* -|* -|* SwFrm::SwFrm() -|* -|*************************************************************************/ - SwFrm::SwFrm( SwModify *pMod, SwFrm* pSib ) : SwClient( pMod ), mbIfAccTableShouldDisposing( false ), //A member to identify if the acc table should dispose @@ -240,7 +231,6 @@ void SwTxtFrm::CheckDirection( sal_Bool bVert ) sal_True, bBrowseMode ); } -/*************************************************************************/ void SwFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { sal_uInt8 nInvFlags = 0; @@ -352,11 +342,6 @@ void SwFrm::_UpdateAttrFrm( const SfxPoolItem *pOld, const SfxPoolItem *pNew, } } -/************************************************************************* -|* -|* SwFrm::Prepare() -|* -|*************************************************************************/ void SwFrm::Prepare( const PrepareHint, const void *, sal_Bool ) { /* Do nothing */ @@ -472,11 +457,6 @@ void SwFrm::InvalidatePage( const SwPageFrm *pPage ) const } } -/************************************************************************* -|* -|* SwFrm::ChgSize() -|* -|*************************************************************************/ Size SwFrm::ChgSize( const Size& aNewSize ) { mbFixSize = sal_True; @@ -727,11 +707,6 @@ void SwFrm::InsertGroupBefore( SwFrm* pParent, SwFrm* pBehind, SwFrm* pSct ) } } -/************************************************************************* -|* -|* SwFrm::Remove() -|* -|*************************************************************************/ void SwFrm::Remove() { OSL_ENSURE( mpUpper, "Remove without upper?" ); @@ -751,11 +726,7 @@ void SwFrm::Remove() mpNext = mpPrev = 0; mpUpper = 0; } -/************************************************************************* -|* -|* SwCntntFrm::Paste() -|* -|*************************************************************************/ + void SwCntntFrm::Paste( SwFrm* pParent, SwFrm* pSibling) { OSL_ENSURE( pParent, "No parent for pasting." ); @@ -858,11 +829,6 @@ void SwCntntFrm::Paste( SwFrm* pParent, SwFrm* pSibling) } } -/************************************************************************* -|* -|* SwCntntFrm::Cut() -|* -|*************************************************************************/ void SwCntntFrm::Cut() { OSL_ENSURE( GetUpper(), "Cut without Upper()." ); @@ -1040,11 +1006,6 @@ void SwCntntFrm::Cut() } } -/************************************************************************* -|* -|* SwLayoutFrm::Paste() -|* -|*************************************************************************/ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling) { OSL_ENSURE( pParent, "No parent for pasting." ); @@ -1145,11 +1106,6 @@ void SwLayoutFrm::Paste( SwFrm* pParent, SwFrm* pSibling) } } -/************************************************************************* -|* -|* SwLayoutFrm::Cut() -|* -|*************************************************************************/ void SwLayoutFrm::Cut() { if ( GetNext() ) @@ -1207,11 +1163,6 @@ void SwLayoutFrm::Cut() } } -/************************************************************************* -|* -|* SwFrm::Grow() -|* -|*************************************************************************/ SwTwips SwFrm::Grow( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { OSL_ENSURE( nDist >= 0, "Negative growth?" ); @@ -1256,11 +1207,6 @@ SwTwips SwFrm::Grow( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) return 0L; } -/************************************************************************* -|* -|* SwFrm::Shrink() -|* -|*************************************************************************/ SwTwips SwFrm::Shrink( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { OSL_ENSURE( nDist >= 0, "Negative reduction?" ); @@ -1690,11 +1636,6 @@ void SwFrm::ImplInvalidateLineNum() } } -/************************************************************************* -|* -|* SwFrm::ReinitializeFrmSizeAttrFlags -|* -|*************************************************************************/ void SwFrm::ReinitializeFrmSizeAttrFlags() { const SwFmtFrmSize &rFmtSize = GetAttrSet()->GetFrmSize(); @@ -1734,11 +1675,6 @@ void SwFrm::ReinitializeFrmSizeAttrFlags() } } -/************************************************************************* -|* SwFrm::ValidateThisAndAllLowers() - * - * FME 2007-08-30 #i81146# new loop control -|*************************************************************************/ void SwFrm::ValidateThisAndAllLowers( const sal_uInt16 nStage ) { // Stage 0: Only validate frames. Do not process any objects. @@ -1783,11 +1719,6 @@ void SwFrm::ValidateThisAndAllLowers( const sal_uInt16 nStage ) } } -/************************************************************************* -|* -|* SwCntntFrm::GrowFrm() -|* -|*************************************************************************/ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { SWRECTFN( this ) @@ -1893,11 +1824,6 @@ SwTwips SwCntntFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) return nReal; } -/************************************************************************* -|* -|* SwCntntFrm::ShrinkFrm() -|* -|*************************************************************************/ SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { SWRECTFN( this ) @@ -2012,11 +1938,6 @@ SwTwips SwCntntFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) return nReal; } -/************************************************************************* -|* -|* SwCntntFrm::Modify() -|* -|*************************************************************************/ void SwCntntFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew ) { sal_uInt8 nInvFlags = 0; @@ -2219,7 +2140,6 @@ void SwCntntFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew, rInvFlags |= 0x01; break; - case RES_FRM_SIZE: rInvFlags |= 0x01; /* no break here */ @@ -2241,11 +2161,6 @@ void SwCntntFrm::_UpdateAttr( const SfxPoolItem* pOld, const SfxPoolItem* pNew, } } -/************************************************************************* -|* -|* SwLayoutFrm::SwLayoutFrm() -|* -|*************************************************************************/ SwLayoutFrm::SwLayoutFrm( SwFrmFmt* pFmt, SwFrm* pSib ): SwFrm( pFmt, pSib ), pLower( 0 ) @@ -2257,9 +2172,6 @@ SwLayoutFrm::SwLayoutFrm( SwFrmFmt* pFmt, SwFrm* pSib ): // #i28701# TYPEINIT1(SwLayoutFrm,SwFrm); -/*-------------------------------------------------- - * SwLayoutFrm::InnerHeight() - * --------------------------------------------------*/ SwTwips SwLayoutFrm::InnerHeight() const { @@ -2299,11 +2211,6 @@ SwTwips SwLayoutFrm::InnerHeight() const return nRet; } -/************************************************************************* -|* -|* SwLayoutFrm::GrowFrm() -|* -|*************************************************************************/ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { const SwViewShell *pSh = getRootFrm()->GetCurrShell(); @@ -2465,11 +2372,6 @@ SwTwips SwLayoutFrm::GrowFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) return nReal; } -/************************************************************************* -|* -|* SwLayoutFrm::ShrinkFrm() -|* -|*************************************************************************/ SwTwips SwLayoutFrm::ShrinkFrm( SwTwips nDist, sal_Bool bTst, sal_Bool bInfo ) { const SwViewShell *pSh = getRootFrm()->GetCurrShell(); @@ -2795,7 +2697,6 @@ void SwLayoutFrm::ChgLowersProp( const Size& rOldSize ) return; } // end of { special case } - // Invalidate page for content only once. bool bInvaPageForCntnt = true; @@ -3130,11 +3031,6 @@ void SwLayoutFrm::Format( const SwBorderAttrs *pAttrs ) } } -/************************************************************************* -|* -|* SwLayoutFrm::InvalidatePercentLowers() -|* -|*************************************************************************/ static void InvaPercentFlys( SwFrm *pFrm, SwTwips nDiff ) { OSL_ENSURE( pFrm->GetDrawObjs(), "Can't find any Objects" ); @@ -3200,11 +3096,6 @@ void SwLayoutFrm::InvaPercentLowers( SwTwips nDiff ) } while ( pFrm && IsAnLower( pFrm ) ) ; } -/************************************************************************* -|* -|* SwLayoutFrm::CalcRel() -|* -|*************************************************************************/ long SwLayoutFrm::CalcRel( const SwFmtFrmSize &rSz, sal_Bool ) const { long nRet = rSz.GetWidth(), @@ -3290,9 +3181,6 @@ static bool lcl_IsFlyHeightClipped( SwLayoutFrm *pLay ) return false; } -/************************************************************************* -|* SwLayoutFrm::FormatWidthCols() -|*************************************************************************/ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, const SwTwips nBorder, const SwTwips nMinHeight ) { @@ -3650,13 +3538,6 @@ void SwLayoutFrm::FormatWidthCols( const SwBorderAttrs &rAttrs, } } - -/************************************************************************* -|* -|* SwRootFrm::InvalidateAllCntnt() -|* -|*************************************************************************/ - static SwCntntFrm* lcl_InvalidateSection( SwFrm *pCnt, sal_uInt8 nInv ) { SwSectionFrm* pSect = pCnt->FindSctFrm(); @@ -3858,5 +3739,4 @@ void SwRootFrm::InvalidateAllObjPos() } } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |