diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index a81d61c..76aa99e 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -63,7 +63,7 @@ #include #include #include -#include // fuer den Attribut Stack +#include // For the attribute stack #include #include // --> OD 2005-01-27 #i33818# @@ -137,7 +137,7 @@ struct WW8TabBandDesc //bool bWWMergedVer6[MAX_COL]; - bool bExist[MAX_COL]; // Existiert diese Zelle ? + bool bExist[MAX_COL]; // Does this cell exist ? UINT8 nTransCell[MAX_COL + 2]; // UEbersetzung WW-Index -> SW-Index WW8TabBandDesc(); @@ -185,7 +185,7 @@ class WW8TabDesc SwPosition* pTmpPos; - SwTableNode* pTblNd; // Tabellen-Node + SwTableNode* pTblNd; // Table Node const SwTableLines* pTabLines; // Zeilen-Array davon SwTableLine* pTabLine; // akt. Zeile SwTableBoxes* pTabBoxes; // Boxen-Array in akt. Zeile @@ -209,7 +209,7 @@ class WW8TabDesc bool bClaimLineFmt; sal_Int16 eOri; bool bIsBiDi; - // 2. allgemeine Verwaltungsinfo + // 2. General Administrative Information short nAktRow; short nAktBandRow; // SW: in dieser Zeile des akt. Bandes bin ich // 3. Verwaltungsinfo fuer Writer @@ -338,12 +338,12 @@ sal_uInt32 wwSectionManager::GetTextAreaWidth() const return !maSegments.empty() ? maSegments.back().GetTextAreaWidth() : 0; } -// --> OD 2007-07-03 #148498# + sal_uInt32 wwSectionManager::GetWWPageTopMargin() const { return !maSegments.empty() ? maSegments.back().maSep.dyaTop : 0; } -// <-- + sal_uInt16 SwWW8ImplReader::End_Ftn() { @@ -597,7 +597,6 @@ ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd, } else { - // --> OD 2005-02-01 #i39468# // If current cell isn't valid, the test is allowed. // The cell isn't valid, if e.g. there is a new row // nAktRow> >= pTabLines->Count()> @@ -670,7 +669,7 @@ static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, BYTE nSwLevel ) { String sP( rNum.GetSuffix() ); sP.Insert( '.', 0 ); - rNum.SetSuffix( sP ); // Ordinalzahlen + rNum.SetSuffix( sP ); // Ordinals } } @@ -799,7 +798,6 @@ SwNumRule* SwWW8ImplReader::GetStyRule() const String aBaseName(CREATE_CONST_ASC( "WW8StyleNum" )); const String aName( rDoc.GetUniqueNumRuleName( &aBaseName, false) ); - // --> OD 2008-06-04 #i86652# // USHORT nRul = rDoc.MakeNumRule( aName ); USHORT nRul = rDoc.MakeNumRule( aName, 0, FALSE, SvxNumberFormat::LABEL_ALIGNMENT ); @@ -878,11 +876,11 @@ void SwWW8ImplReader::Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen ) pAktColl->SetFmtAttr( SwNumRuleItem() ); String aName(CREATE_CONST_ASC( "Outline" )); - // --> OD 2008-02-11 #newlistlevelattrs# + SwNumRule aNR( rDoc.GetUniqueNumRuleName( &aName ), SvxNumberFormat::LABEL_WIDTH_AND_POSITION, OUTLINE_RULE ); - // <-- + aNR = *rDoc.GetOutlineNumRule(); SetAnld(&aNR, (WW8_ANLD*)pData, nSwNumLevel, true); @@ -1025,12 +1023,9 @@ void SwWW8ImplReader::StartAnl(const BYTE* pSprm13) { if (!pNumRule) { - // --> OD 2008-06-04 #i86652# -// pNumRule = rDoc.GetNumRuleTbl()[rDoc.MakeNumRule(sNumRule)]; pNumRule = rDoc.GetNumRuleTbl()[ rDoc.MakeNumRule( sNumRule, 0, FALSE, SvxNumberFormat::LABEL_ALIGNMENT ) ]; - // <-- } if (pTableDesc) { @@ -2701,7 +2696,6 @@ void WW8TabDesc::MergeCells() // 2. aktuelle Merge-Gruppe anlegen pActMGroup = new WW8SelBoxInfo( nX1, nWidth ); - // --> OD 2005-02-04 #118544# - determine size of new // merge group before inserted the new merge group. // Needed to correctly locked previously created merge groups. // Gesamtbreite ermitteln und zuweisen @@ -2715,9 +2709,7 @@ void WW8TabDesc::MergeCells() else break; pActMGroup->nGroupWidth = nSizCell; - // <-- - // --> OD 2005-02-03 #118544# - locked previously // created merge groups, after determining the size // for the new merge group. // 1. ggfs. alte Mergegruppe(n) schliessen, die @@ -2729,7 +2721,6 @@ void WW8TabDesc::MergeCells() { (*pMergeGroups)[ nMGrIdx ]->bGroupLocked = true; } - // <-- // 3. und in Gruppen-Array eintragen pMergeGroups->Insert(pActMGroup, pMergeGroups->Count()); @@ -2858,7 +2849,6 @@ bool WW8TabDesc::FindMergeGroup(short nX1, short nWidth, bool bExact, short nGrX1; short nGrX2; - // --> OD 2005-02-04 #118544# - improvement: search backwards //for ( USHORT iGr = 0; iGr < pMergeGroups->Count(); iGr++ ) for ( short iGr = pMergeGroups->Count() - 1; iGr >= 0; --iGr ) { @@ -3390,7 +3380,7 @@ SwTableBox* WW8TabDesc::UpdateTableMergeGroup( WW8_TCell& rCell, SwTableBox* pResult = 0; // pruefen, ob die Box zu mergen ist - // --> OD 2005-02-04 #118544# - If cell is the first one to be merged, + // a new merge group has to be provided. // E.g., it could be that a cell is the first one to be merged, but no // new merge group is provided, because the potential other cell to be merged @@ -3472,11 +3462,11 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp) if (pTableDesc) maTableStack.push(pTableDesc); - // --> OD 2005-01-27 #i33818# - determine absolute position object attributes, + // determine absolute position object attributes, // if possible. It's needed for nested tables. WW8FlyPara* pTableWFlyPara( 0L ); WW8SwFlyPara* pTableSFlyPara( 0L ); - // --> OD 2005-03-21 #i45301# - anchor nested table inside Writer fly frame + // anchor nested table inside Writer fly frame // only at-character, if absolute position object attributes are available. // Thus, default anchor type is as-character anchored. RndStdIds eAnchor( FLY_AS_CHAR ); @@ -3501,22 +3491,21 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp) pTableWFlyPara = ConstructApo( aApo, pNestedTabPos ); if ( pTableWFlyPara ) { - // --> OD 2007-07-03 #148498# // constructor has changed - new 4th parameter // containing WW8 page top margin. pTableSFlyPara = new WW8SwFlyPara(*pPaM, *this, *pTableWFlyPara, maSectionManager.GetWWPageTopMargin(), maSectionManager.GetPageLeft(), maSectionManager.GetTextAreaWidth(), nIniFlyDx, nIniFlyDy); - // <-- - // --> OD 2005-03-21 #i45301# - anchor nested table Writer fly + + // nchor nested table Writer fly // frame at-character eAnchor = FLY_AT_CHAR; - // <-- + } } } - // <-- + pTableDesc = new WW8TabDesc( this, nStartCp ); @@ -3537,7 +3526,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp) RES_FRMATR_BEGIN, RES_FRMATR_END-1); // --> OD 2005-01-26 #i33818# - anchor the Writer fly frame for // the nested table at-character. - // --> OD 2005-03-21 #i45301# + SwFmtAnchor aAnchor( eAnchor ); aAnchor.SetAnchor( pTableDesc->pParentPos ); aItemSet.Put( aAnchor ); @@ -3545,14 +3534,14 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp) pTableDesc->pParentPos, &aItemSet); ASSERT( pTableDesc->pFlyFmt->GetAnchor().GetAnchorId() == eAnchor, "Not the anchor type requested!" ); - // <-- + MoveInsideFly(pTableDesc->pFlyFmt); } pTableDesc->CreateSwTable(); if (pTableDesc->pFlyFmt) { pTableDesc->SetSizePosition(pTableDesc->pFlyFmt); - // --> OD 2005-01-26 #i33818# - Use absolute position object + // Use absolute position object // attributes, if existing, and apply them to the created Writer fly // frame. if ( pTableWFlyPara && pTableSFlyPara ) @@ -3570,11 +3559,10 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp) pTableDesc->pFlyFmt->SetFmtAttr(aHori); pTableDesc->pFlyFmt->SetFmtAttr( SwFmtSurround( SURROUND_NONE ) ); } - // <-- - // --> OD 2005-01-27 #i33818# - The nested table doesn't have to leave + // The nested table doesn't have to leave // the table cell. Thus, the Writer fly frame has to follow the text flow. pTableDesc->pFlyFmt->SetFmtAttr( SwFmtFollowTextFlow( TRUE ) ); - // <-- + } else pTableDesc->SetSizePosition(0); @@ -3583,10 +3571,8 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp) else PopTableDesc(); - // --> OD 2005-01-28 #i33818# delete pTableWFlyPara; delete pTableSFlyPara; - // <-- bool bSuccess = (0 != pTableDesc); if (bSuccess) @@ -3697,7 +3683,6 @@ void SwWW8ImplReader::StopTable() } bReadTable = true; - // --> OD 2009-04-16 #i101116# // Keep PaM on table end only for nested tables if ( nInTable > 1 ) {