diff options
author | Kayo Hamid <revol.code@yahoo.com> | 2010-11-19 12:33:24 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2010-11-19 12:33:24 +0100 |
commit | 22a4f583949d7105c6675d8c4399cc0e85f665c0 (patch) | |
tree | 2d506cd4ffb119927afbf78a69fe8c02dec83b77 /sw | |
parent | 29f764a2cda4811eeb1d7752cd204a778e0e30e3 (diff) |
More clean code at writer
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/docnode/finalthreadmanager.cxx | 7 | ||||
-rw-r--r-- | sw/source/core/docnode/ndcopy.cxx | 15 | ||||
-rw-r--r-- | sw/source/core/docnode/ndnum.cxx | 77 | ||||
-rw-r--r-- | sw/source/core/docnode/ndsect.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 84 | ||||
-rw-r--r-- | sw/source/core/docnode/node.cxx | 25 | ||||
-rw-r--r-- | sw/source/core/docnode/nodes.cxx | 57 | ||||
-rw-r--r-- | sw/source/core/docnode/section.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/docnode/swbaslnk.cxx | 31 | ||||
-rw-r--r-- | sw/source/core/draw/dcontact.cxx | 30 | ||||
-rw-r--r-- | sw/source/core/draw/dview.cxx | 11 | ||||
-rw-r--r-- | sw/source/core/edit/acorrect.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/edit/autofmt.cxx | 55 | ||||
-rw-r--r-- | sw/source/core/edit/edatmisc.cxx | 18 | ||||
-rw-r--r-- | sw/source/core/edit/edattr.cxx | 17 | ||||
-rw-r--r-- | sw/source/core/edit/edfld.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/edit/editsh.cxx | 24 | ||||
-rw-r--r-- | sw/source/core/edit/edlingu.cxx | 16 | ||||
-rw-r--r-- | sw/source/core/edit/ednumber.cxx | 13 | ||||
-rw-r--r-- | sw/source/core/edit/edsect.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/edit/edtox.cxx | 4 |
21 files changed, 25 insertions, 477 deletions
diff --git a/sw/source/core/docnode/finalthreadmanager.cxx b/sw/source/core/docnode/finalthreadmanager.cxx index feb8d9b327..bfd9fa6bd4 100644 --- a/sw/source/core/docnode/finalthreadmanager.cxx +++ b/sw/source/core/docnode/finalthreadmanager.cxx @@ -396,8 +396,6 @@ void SAL_CALL FinalThreadManager::cancelAllJobs() throw (css::uno::RuntimeExcept mpCancelJobsThread = new CancelJobsThread( aThreads );; if ( !mpCancelJobsThread->create() ) { - // error handling - // ASSERT( false, "<FinalThreadManager::cancelAllJobs()> - thread to cancel jobs can't be setup --> synchron cancellation of jobs" ); delete mpCancelJobsThread; mpCancelJobsThread = 0; while ( !aThreads.empty() ) @@ -450,7 +448,6 @@ void SAL_CALL FinalThreadManager::queryTermination( const css::lang::EventObject m_xContext ); if ( !mpTerminateOfficeThread->create() ) { - // ASSERT( false, "FinalThreadManager::queryTermination(..) - thread to terminate office can't be started!" ); delete mpTerminateOfficeThread; mpTerminateOfficeThread = 0; } @@ -480,7 +477,6 @@ void SAL_CALL FinalThreadManager::notifyTermination( const css::lang::EventObjec { if ( mpTerminateOfficeThread->isRunning() ) { - // ASSERT( false, "<FinalThreadManager::notifyTermination()> - office termination thread still running!" ); mpTerminateOfficeThread->StopOfficeTermination(); // thread kills itself. } else @@ -492,7 +488,6 @@ void SAL_CALL FinalThreadManager::notifyTermination( const css::lang::EventObjec if ( !maThreads.empty() ) { - // ASSERT( false, "<FinalThreadManager::notifyTermination()> - still registered jobs are existing" ); cancelAllJobs(); } @@ -500,7 +495,7 @@ void SAL_CALL FinalThreadManager::notifyTermination( const css::lang::EventObjec { if ( !mpCancelJobsThread->allJobsCancelled() ) { - // ASSERT( false, "<FinalThreadManager::notifyTermination()> - cancellation of registered jobs not yet finished -> wait for its finish" ); + } mpCancelJobsThread->stopWhenAllJobsCancelled(); diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index 78d9d22b64..c9704913d0 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -420,17 +420,6 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const SwNodes& rNds = (SwNodes&)GetNodes(); { - // nicht in Fussnoten kopieren !! -/* -!! Mal ohne Frames - SwCntntNode* pCNd = pDoc->GetNodes()[ rIdx ]->GetCntntNode(); - SwFrm* pFrm; - if( (pCNd && 0 != ( pFrm = pCNd->GetFrm())) - ? pFrm->FindFtnFrm() - : rIdx < pDoc->GetNodes().EndOfInserts && - pDoc->GetNodes()[pDoc->GetNodes().EndOfInserts]->StartOfSection() - < rIdx ) -*/ if( rIdx < pDoc->GetNodes().GetEndOfInserts().GetIndex() && rIdx >= pDoc->GetNodes().GetEndOfInserts().StartOfSectionIndex() ) return 0; @@ -1298,9 +1287,7 @@ bool SwDoc::CopyImpl( SwPaM& rPam, SwPosition& rPos, if ( pNumRuleToPropagate ) { - // --> OD 2009-08-25 #i86492# - // use <SwDoc::SetNumRule(..)>, because it also handles the <ListId> -// pDoc->ReplaceNumRule(aCpyPam, *pNumRuleToPropagate); + // #i86492# - use <SwDoc::SetNumRule(..)>, because it also handles the <ListId> pDoc->SetNumRule( aCpyPam, *pNumRuleToPropagate, false, aListIdToPropagate, sal_True, true ); } diff --git a/sw/source/core/docnode/ndnum.cxx b/sw/source/core/docnode/ndnum.cxx index ade8161b8a..c88a5fdfa3 100644 --- a/sw/source/core/docnode/ndnum.cxx +++ b/sw/source/core/docnode/ndnum.cxx @@ -125,83 +125,6 @@ void SwNodes::UpdateOutlineNode(SwNode & rNd) } } -//void SwNodes::UpdateOutlineNode( const SwNode& rNd, BYTE nOldLevel, //#outline level,removed by zhaojianwei -// BYTE nNewLevel ) -//{ -// const SwNodePtr pSrch = (SwNodePtr)&rNd; -// USHORT nSttPos; -// BOOL bSeekIdx = pOutlineNds->Seek_Entry( pSrch, &nSttPos ); -// -// //if( NO_NUMBERING == nOldLevel ) //#outline level,zhaojianwei -// if( 0 == nOldLevel ) //<-end, zhaojianwei -// { -// // nicht vorhanden, also einfuegen -// //ASSERT( !bSeekIdx, "Der Node ist schon als OutlineNode vorhanden" ); -// -// //JP 12.03.99: 63293 - Nodes vom RedlineBereich NIE aufnehmen -// ULONG nNd = rNd.GetIndex(); -// if( nNd < GetEndOfRedlines().GetIndex() && -// nNd > GetEndOfRedlines().StartOfSectionNode()->GetIndex() ) -// return ; -// -// // jetzt noch alle nachfolgende Outline-Nodes updaten -// if (! bSeekIdx) -// { -// // --> OD 2005-11-03 #125329# -// // assure that node <pSrch> is in the correct nodes array -// if ( &(pSrch->GetNodes()) == this ) -// { -// pOutlineNds->Insert( pSrch ); -// } -// else -// { -// ASSERT( false, -// "<SwNodes::UpdateOutlineNode(..)> - node <pSrch> isn't in correct nodes array. This is a serious defect -> inform OD" ); -// } -// // <-- -// } -// -// } -// //else if( NO_NUMBERING == nNewLevel ) //#outline level,removed by zhaojianwei -// else if( 0 == nNewLevel ) //<-end,added by zhaojianwei // Level entfernen -// { -// if( !bSeekIdx ) -// return; -// -// // jetzt noch alle nachfolgende Outline-Nodes updaten -// pOutlineNds->Remove( nSttPos ); -// } -// else if( !bSeekIdx ) // Update und Index nicht gefunden ?? -// return ; -// -// { -// SwTxtNode & rTxtNd = (SwTxtNode &) rNd; -// SwPaM aPam(rTxtNd); // #115901# -// -// //if (nNewLevel != NO_NUMBERING) //#outline level,zhaojianwei // #115901# -// if (nNewLevel != 0) //<-end,zhaojianwei // #115901# -// { -// //rTxtNd.SetLevel(rTxtNd.GetTxtColl()->GetOutlineLevel()); //#outline level,zhaojianwei -// //rTxtNd.NumRuleChgd(); -// if(rTxtNd.GetTxtColl()->IsAssignedToListLevelOfOutlineStyle()) -// { -// rTxtNd.SetLevel(rTxtNd.GetTxtColl()->GetAssignedOutlineStyleLevel()); -// rTxtNd.NumRuleChgd(); -// }//<-end,zhaojianwei -// -// //GetDoc()->SetNumRule(aPam, *GetDoc()->GetOutlineNumRule()); -// } -// else -// { -// GetDoc()->DelNumRules(aPam); -// } -// } -// -// // die Gliederungs-Felder Updaten -// GetDoc()->GetSysFldType( RES_CHAPTERFLD )->UpdateFlds(); -// GetDoc()->ChkCondColls(); -//}//<-end,zhaojianwei - void SwNodes::UpdtOutlineIdx( const SwNode& rNd ) { if( !pOutlineNds->Count() ) // keine OutlineNodes vorhanden ? diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index b648ff33f6..dc3c3c013f 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -464,7 +464,6 @@ USHORT SwDoc::IsInsRegionAvailable( const SwPaM& rRange, aIdx++; } while( aIdx.GetNode().IsEndNode() && 0 != aIdx.GetNode().FindSectionNode() ); -// if( !aIdx.GetNode().IsEndNode() ) { nRet = 2; if( ppSttNd ) @@ -1264,8 +1263,6 @@ void SwSectionNode::DelFrms() ULONG nStt = GetIndex()+1, nEnd = EndOfSectionIndex(); if( nStt >= nEnd ) { - // unser Flag muessen wir noch aktualisieren - // pSection->bHiddenFlag = TRUE; return ; } diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 590cd3df48..4936b20aad 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -342,7 +342,6 @@ BOOL SwNodes::InsBoxen( SwTableNode* pTblNd, rTabBoxes.C40_INSERT( SwTableBox, pPrvBox, nRealInsPos ); - //if( NO_NUMBERING == pTxtColl->GetOutlineLevel()//#outline level,zhaojianwei if( ! pTxtColl->IsAssignedToListLevelOfOutlineStyle()//<-end,zhaojianwei //FEATURE::CONDCOLL && RES_CONDTXTFMTCOLL != pTxtColl->Which() @@ -516,10 +515,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts, for( USHORT i = 0; i < nBoxArrLen; ++i ) aBoxFmtArr.Insert( (void*)0, i ); } - // --> OD 2008-02-25 #refactorlists# -// SfxItemSet aCharSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_END-1 ); SfxItemSet aCharSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1 ); - // <-- SwNodeIndex aNdIdx( *pTblNd, 1 ); // auf den ersten Box-StartNode SwTableLines& rLines = pNdTbl->GetTabLines(); @@ -805,10 +801,8 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts, aBoxFmtArr.Insert( (void*)0, i ); } - // --> OD 2008-02-25 #refactorlists# -// SfxItemSet aCharSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_END-1 ); SfxItemSet aCharSet( GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1 ); - // <-- + SwHistory* pHistory = pUndo ? &pUndo->GetHistory() : 0; SwTableBoxFmt *pBoxF = 0; @@ -972,8 +966,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh, } } - aPosArr.Insert( /*aFInfo.GetFrm()->Frm().Left() +*/ - static_cast<USHORT>(aFInfo.GetFrm()->IsVertical() ? + aPosArr.Insert( static_cast<USHORT>(aFInfo.GetFrm()->IsVertical() ? aFInfo.GetFrm()->Prt().Bottom() : aFInfo.GetFrm()->Prt().Right()), aPosArr.Count() ); @@ -987,9 +980,6 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh, const SfxItemSet* pSet = pTxtNd->GetpSwAttrSet(); if( pSet ) { -// das entfernen der PageBreaks erst nach dem erzeugen der Tabelle -// erfolgen, denn sonst stehen sie falsch in der History !!! -// SwRegHistory aRegH( pTxtNd, *pTxtNd, pHistory ); const SfxPoolItem* pItem; if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE, &pItem ) ) { @@ -1147,10 +1137,6 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> > SwUndoTxtToTbl* pUndo = 0; if( DoesUndo() ) { -// StartUndo( UNDO_TEXTTOTABLE ); -// pUndo = new SwUndoTxtToTbl( aOriginal, rInsTblOpts, cCh, eAdjust, pTAFmt ); -// AppendUndo( pUndo ); - // das Splitten vom TextNode nicht in die Undohistory aufnehmen DoUndo( FALSE ); } @@ -1202,8 +1188,6 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> > pLineFmt->SetFmtAttr( SwFmtFillOrder( ATT_LEFT_TO_RIGHT )); // die Tabelle bekommt USHRT_MAX als default SSize pTableFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, USHRT_MAX )); -// if( !(rInsTblOpts.mnInsMode & tabopts::SPLIT_LAYOUT) ) -// pTableFmt->SetAttr( SwFmtLayoutSplit( FALSE )); /* #106283# If the first node in the selection is a context node and if it has an item FRAMEDIR set (no default) propagate the item to the @@ -1228,12 +1212,6 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> > ASSERT( pNdTbl, "kein Tabellen-Node angelegt." ) pTableFmt->Add( pNdTbl ); // das Frame-Format setzen -// const USHORT nRowsToRepeat = -// tabopts::HEADLINE == (rInsTblOpts.mnInsMode & tabopts::HEADLINE) ? -// rInsTblOpts.mnRowsToRepeat : -// 0; -// pNdTbl->SetRowsToRepeat( nRowsToRepeat ); - BOOL bUseBoxFmt = FALSE; if( !pBoxFmt->GetDepends() ) { @@ -1242,28 +1220,11 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> > bUseBoxFmt = TRUE; pTableFmt->SetFmtAttr( pBoxFmt->GetFrmSize() ); delete pBoxFmt; -// eAdjust = HORI_NONE; } - //Orientation am Fmt der Table setzen -// pTableFmt->SetAttr( SwFmtHoriOrient( 0, eAdjust ) ); -// pTableFmt->Add( pNdTbl ); // das Frame-Format setzen - - ULONG nIdx = pTblNd->GetIndex(); aNode2Layout.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 ); - { -// SwPaM& rTmp = (SwPaM&)rRange; // Point immer an den Anfang -// rTmp.DeleteMark(); -// rTmp.GetPoint()->nNode = *pTblNd; -// SwCntntNode* pCNd = GetNodes().GoNext( &rTmp.GetPoint()->nNode ); -// rTmp.GetPoint()->nContent.Assign( pCNd, 0 ); - } - -// if( pUndo ) -// EndUndo( UNDO_TEXTTOTABLE ); - SetModified(); SetFieldsDirty( true, NULL, 0 ); return pNdTbl; @@ -1365,9 +1326,6 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes, SwTableBox* pBox; USHORT nBoxes, nLines, nMaxBoxes = 0; -// SwHistory* pHistory = pUndo ? &pUndo->GetHistory() : 0; - - SwNodeIndex aNodeIndex = rTableNodes.begin()->begin()->aStart; // delete frames of all contained content nodes for( nLines = 0; aNodeIndex <= rTableNodes.rbegin()->rbegin()->aEnd; ++aNodeIndex,++nLines ) @@ -1381,15 +1339,11 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes, SwTxtNode& rTxtNode = static_cast<SwTxtNode&>(rNode); // setze den bei allen TextNode in der Tabelle den TableNode // als StartNode -// FIXME: this is setting wrong node StartOfSections in nested tables. -// rTxtNode.pStartOfSection = pTblNd; + // remove PageBreaks/PageDesc/ColBreak const SwAttrSet* pSet = rTxtNode.GetpSwAttrSet(); if( pSet ) { - // das entfernen der PageBreaks erst nach dem erzeugen der Tabelle - // erfolgen, denn sonst stehen sie falsch in der History !!! - // SwRegHistory aRegH( pTxtNd, *pTxtNd, pHistory ); const SfxPoolItem* pItem; if( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE, &pItem ) ) { @@ -1412,38 +1366,19 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes, } } -// SwNodeIndex aSttIdx( *pTblNd, 1 ); -// SwNodeIndex aEndIdx( rlNodes.rbegin()->aEnd, -1 ); std::vector<std::vector < SwNodeRange > >::const_iterator aRowIter = rTableNodes.begin(); for( nLines = 0, nBoxes = 0; aRowIter != rTableNodes.end(); - ++aRowIter, /*aSttIdx += 2, */nLines++, nBoxes = 0 ) + ++aRowIter, nLines++, nBoxes = 0 ) { -// SwTxtNode* pTxtNd = aSttIdx.GetNode().GetTxtNode(); -// ASSERT( pTxtNd, "nur TextNodes in der Tabelle aufnehmen" ); pLine = new SwTableLine( pLineFmt, 1, 0 ); pTable->GetTabLines().C40_INSERT( SwTableLine, pLine, nLines ); -// SwStartNode* pSttNd; -// SwPosition aCntPos( aSttIdx, SwIndex( pTxtNd )); - std::vector< SwNodeRange >::const_iterator aCellIter = aRowIter->begin(); -// SvULongs aBkmkArr( 15, 15 ); -// _SaveCntntIdx( pDoc, aCellIter->aStart.GetIndex(), pTxtNd->GetTxt().Len(), aBkmkArr ); -// const sal_Unicode* pTxt = pTxtNd->GetTxt().GetBuffer(); for( ; aCellIter != aRowIter->end(); ++aCellIter ) { -// aCellIter->aStart aCellIter->aEnd -// aCntPos.nContent = nChPos; -// SwCntntNode* pNewNd = pTxtNd->SplitNode( aCntPos ); - -// auch f?rs undo? -// if( aBkmkArr.Count() ) -// _RestoreCntntIdx( aBkmkArr, *pNewNd, nChPos, -// nChPos + 1 ); - const SwNodeIndex aTmpIdx( aCellIter->aStart, 0 ); SwNodeIndex aCellEndIdx(aCellIter->aEnd); @@ -2131,11 +2066,6 @@ BOOL SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn ) SwCntntNode* pNextNd = GetNodes()[ nNextNd ]->GetCntntNode(); if( pNextNd ) { -//JP 24.08.98: will man wirklich den PageDesc/Break vom -// nachfolgen Absatz ueberbuegeln? -// const SwAttrSet& rAttrSet = pNextNd->GetSwAttrSet(); -// if( SFX_ITEM_SET != rAttrSet.GetItemState( RES_PAGEDESC ) && -// SFX_ITEM_SET != rAttrSet.GetItemState( RES_BREAK )) { SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt(); const SfxPoolItem *pItem; @@ -3271,9 +3201,6 @@ BOOL SwDoc::SplitTable( const SwPosition& rPos, USHORT eHdlnMode, aFndBox.SetTableLines( rTbl ); aFndBox.DelFrms( rTbl ); - // TL_CHART2: need to inform chart of probably changed cell names - //pDoc->UpdateCharts( rTbl.GetFrmFmt()->GetName() ); - SwTableNode* pNew = GetNodes().SplitTable( rPos.nNode, FALSE, bCalcNewSize ); if( pNew ) @@ -4202,9 +4129,6 @@ void SwDoc::ChkBoxNumFmt( SwTableBox& rBox, BOOL bCallUpdate ) // alle Zahlenformate entfernen USHORT nWhich1 = RES_BOXATR_FORMULA; if( !bIsEmptyTxtNd ) - //JP 15.01.99: dieser Teil wurde doch schon oben abgeprueft! - /* && pFmtItem && !GetNumberFormatter()-> - IsTextFormat( ((SwTblBoxNumFormat*)pFmtItem)->GetValue() ) )*/ { nWhich1 = RES_BOXATR_FORMAT; diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 7b3576ea58..1b394ffc00 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -878,7 +878,6 @@ const SwTxtNode* SwNode::FindOutlineNodeOfLevel( BYTE nLvl ) const // oder ans Feld und von dort holen !! while( nPos && nLvl < ( pRet = rONds[nPos]->GetTxtNode() ) - //->GetTxtColl()->GetOutlineLevel() )//#outline level,zhaojianwei ->GetAttrOutlineLevel() - 1 ) //<-end,zhaojianwei --nPos; @@ -916,9 +915,7 @@ BYTE SwNode::HasPrevNextLayNode() const // <-- if( IsValidNextPrevNd( aIdx.GetNode() )) nRet |= ND_HAS_PREV_LAYNODE; - // --> OD 2007-06-04 #i77805# - // skip section start and end nodes -// aIdx += 2; + // #i77805# - skip section start and end nodes aIdx = SwNodeIndex( *this, +1 ); while ( aIdx.GetNode().IsSectionNode() || ( aIdx.GetNode().IsEndNode() && @@ -926,7 +923,6 @@ BYTE SwNode::HasPrevNextLayNode() const { ++aIdx; } - // <-- if( IsValidNextPrevNd( aIdx.GetNode() )) nRet |= ND_HAS_NEXT_LAYNODE; } @@ -1484,25 +1480,6 @@ BOOL SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const return FALSE; } break; - // --> OD 2008-02-19 #refactorlists# -// case RES_GETNUMNODES: -// // #111955# only numbered nodes in rInfo -// if( IsTxtNode()) -// { -// SwTxtNode * pTxtNode = (SwTxtNode*)this; -// pItem = (SwNumRuleItem*)GetNoCondAttr(RES_PARATR_NUMRULE, TRUE ); - -// if (0 != pItem && -// pItem->GetValue().Len() && -// pItem->GetValue() == ((SwNumRuleInfo&)rInfo).GetName() && -// GetNodes().IsDocNodes()) -// { -// ((SwNumRuleInfo&)rInfo).AddNode( *pTxtNode ); -// } -// } - -// return TRUE; - // <-- case RES_FINDNEARESTNODE: if( ((SwFmtPageDesc&)GetAttr( RES_PAGEDESC )).GetPageDesc() ) diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 7260f1865d..ad438cc611 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -183,12 +183,9 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz, if ( rNd.IsTxtNode() ) { SwTxtNode* pTxtNode = rNd.GetTxtNode(); - // --> OD 2008-03-13 #refactorlists# -// pTxtNode->UnregisterNumber(); + pTxtNode->RemoveFromList(); - // <-- - //if ( pTxtNode->GetTxtColl()->GetOutlineLevel() != NO_NUMBERING )//#outline level,zhaojianwei if ( pTxtNode->GetAttrOutlineLevel() != 0 )//<-end,zhaojianwei { const SwNodePtr pSrch = (SwNodePtr)&rNd; @@ -202,13 +199,10 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz, if( rNd.IsTxtNode() ) { SwTxtNode& rTxtNd = (SwTxtNode&)rNd; - // --> OD 2008-03-13 #refactorlists# -// rTxtNd.SyncNumberAndNumRule(); + rTxtNd.AddToList(); - // <-- if( bInsOutlineIdx && - //NO_NUMBERING != rTxtNd.GetTxtColl()->GetOutlineLevel() )//#outline level,zhaojianwei 0 != rTxtNd.GetAttrOutlineLevel() )//<-end,zhaojianwei { const SwNodePtr pSrch = (SwNodePtr)&rNd; @@ -250,7 +244,6 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz, SwTxtNode* pTxtNd = (SwTxtNode*)pNd; // loesche die Gliederungs-Indizies aus dem alten Nodes-Array - //if( NO_NUMBERING != pTxtNd->GetTxtColl()->GetOutlineLevel() )//#outline level,zhaojianwei if( 0 != pTxtNd->GetAttrOutlineLevel() )//<-end,zhaojianwei pOutlineNds->Remove( pNd ); @@ -289,19 +282,14 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz, if( pTxtNd ) { SwpHints * const pHts = pTxtNd->GetpSwpHints(); - // setze die OultineNodes im neuen Nodes-Array - //if( bInsOutlineIdx && NO_NUMBERING != //#outline level,removed by zhaojianwei - // pTxtNd->GetTxtColl()->GetOutlineLevel() ) + // OultineNodes set the new nodes in the array if( bInsOutlineIdx && 0 != pTxtNd->GetAttrOutlineLevel() ) //#outline level,added by zhaojianwei { rNds.pOutlineNds->Insert( pTxtNd ); } - // --> OD 2008-03-13 #refactorlists# -// pTxtNd->SyncNumberAndNumRule(); pTxtNd->AddToList(); - // <-- // Sonderbehandlung fuer die Felder! if( pHts && pHts->Count() ) @@ -506,14 +494,10 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, // setze den Start-Index SwNodeIndex aIdx( aIndex ); -/* - --- JP 17.11.94: sollte ueberholt sein, wird im ChgNode schon erledigt! - BOOL bCorrNum = pSect && pSect->aStart.GetIndex() == aIdx.GetIndex(); -*/ SwStartNode* pStartNode = aIdx.GetNode().pStartOfSection; aSttNdStack.C40_INSERT( SwStartNode, pStartNode, 0 ); -// aSttNdStack.Insert( rNodes[ aIdx ]->pStartOfSection, 0 ); + SwNodeRange aOrigInsPos( aIdx, -1, aIdx ); // Originale Insert Pos //JP 16.01.98: SectionNodes: DelFrms/MakeFrms beim obersten SectionNode! @@ -571,22 +555,16 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, if( pTmpNd->IsTxtNode() ) ((SwTxtNode*)pTmpNd)->RemoveFromList(); -// if( bNewFrms ) -// pCNd->DelFrms(); - // setze bei Start/EndNodes die richtigen Indizies // loesche die Gliederungs-Indizies aus // dem alten Nodes-Array - //if( pCNd->IsTxtNode() && NO_NUMBERING != //#outline level,zhaojianwei - // ((SwTxtNode*)pCNd)->GetTxtColl()->GetOutlineLevel() ) if( pCNd->IsTxtNode() && 0 != ((SwTxtNode*)pCNd)->GetAttrOutlineLevel() )//<-end,by zhaojianwei pOutlineNds->Remove( pCNd ); else pCNd = 0; } -// else if( bNewFrms && pTmpNd->IsSectionNode() ) -// ((SwSectionNode*)pTmpNd)->DelFrms(); + BigPtrArray::Move( aMvIdx.GetIndex(), aIdx.GetIndex() ); if( bInsOutlineIdx && pCNd ) @@ -610,16 +588,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, for( ULONG n = 0; n < nInsPos; ++n ) { SwNode* pNd = &aMvIdx.GetNode(); -/* if( bNewFrms ) - { - if( pNd->IsCntntNode() ) - ((SwCntntNode*)pNd)->DelFrms(); - else if( pNd->IsSectionNode() ) - ((SwSectionNode*)pNd)->DelFrms(); - } -*/ - //BOOL bOutlNd = pNd->IsTxtNode() && NO_NUMBERING !=//#outline level,zhaojianwei - // ((SwTxtNode*)pNd)->GetTxtColl()->GetOutlineLevel(); + const bool bOutlNd = pNd->IsTxtNode() && 0 != ((SwTxtNode*)pNd)->GetAttrOutlineLevel();//<-end,zhaojianwei // loesche die Gliederungs-Indizies aus @@ -848,7 +817,6 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, nInsPos = 0; // loesche nur noch den Pointer aus dem Nodes-Array. -// RemoveNode( aRg.aEnd.GetIndex(), 1, FALSE ); RemoveNode( aRg.aEnd.GetIndex(), 1, TRUE ); aRg.aEnd--; @@ -872,7 +840,6 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes, DelNodes( aRg.aEnd, 2 ); aRg.aEnd--; } -// aRg.aEnd--; } break; @@ -1307,8 +1274,6 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, ULONG nNodes) if( pNd->IsTxtNode() ) { - //if( NO_NUMBERING != //#outline level,zhaojianwei - // ((SwTxtNode*)pNd)->GetTxtColl()->GetOutlineLevel() && if( 0 != ((SwTxtNode*)pNd)->GetAttrOutlineLevel() &&//<-end,zhaojianwei pOutlineNds->Seek_Entry( pNd, &nIdxPos )) { @@ -1697,7 +1662,6 @@ void SwNodes::DelNodes( const SwNodeIndex & rStart, ULONG nCnt ) SwNode* pNd = (*this)[ n ]; if( pNd->IsTxtNode() && - //NO_NUMBERING != ((SwTxtNode*)pNd)->GetTxtColl()->GetOutlineLevel() )//#outline level,zhaojianwei 0 != ((SwTxtNode*)pNd)->GetAttrOutlineLevel() ) //<-end,zhaojianwei { // loesche die Gliederungs-Indizies. USHORT nIdxPos; @@ -2576,10 +2540,7 @@ void SwNodes::RemoveNode( ULONG nDelPos, ULONG nSz, BOOL bDel ) if (pTxtNd) { - // --> OD 2008-03-13 #refactorlists# -// pTxtNd->UnregisterNumber(); pTxtNd->RemoveFromList(); - // <-- } } } @@ -2688,12 +2649,6 @@ SwNode * SwNodes::DocumentSectionEndNode(SwNode * pNode) const return DocumentSectionStartNode(pNode)->EndOfSectionNode(); } -//SwNode * SwNodes::operator[](int n) const -//{ -// return operator[]((ULONG) n); -//} -// <-#112139# - sal_Bool SwNodes::IsDocNodes() const { return this == &pMyDoc->GetNodes(); diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 687aa103b7..d94cac2612 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -76,7 +76,6 @@ using namespace ::com::sun::star; SV_IMPL_REF( SwServerObject ) -//static const char __FAR_DATA sSectionFmtNm[] = "Section"; #define sSectionFmtNm aEmptyStr class SwIntrnlSectRefLink : public SwBaseLink @@ -291,8 +290,6 @@ void SwSection::SetSectionData(SwSectionData const& rData) { bool const bOldHidden( m_Data.IsHidden() ); m_Data = rData; - // now update format and reflink with new data -// SetLinkFileName(m_Data.GetLinkFileName()); // old code did not do this? // next 2 may actually overwrite m_Data.m_b{Protect,EditInReadonly}Flag // in Modify, which should result in same flag value as the old code! SetProtect(m_Data.IsProtectFlag()); diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index d0d2b89d2b..caf312f37a 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -408,30 +408,10 @@ BOOL SwBaseLink::SwapIn( BOOL bWaitForData, BOOL bNativFormat ) } #endif - // --> OD 2005-04-11 #i46300# - deactivate fix for issues i9861 and i33293 -// TestBalloonInputStream* pTBIS = 0; -// if(!m_xInputStreamToLoadFrom.is()) { -// if ( !pCntntNode->IsGrfNode() || -// static_cast<SwGrfNode*>(pCntntNode)->GetGrfObj().GetType() -// != GRAPHIC_DEFAULT ) -// { -// pTBIS = new TestBalloonInputStream(); -// m_xInputStreamToLoadFrom = pTBIS; -// } -// } - // <-- - if( GetObj() ) { - // --> OD 2005-04-11 #i46300# - deactivate fix for issues i9861 and i33293 -// GetObj()->setStreamToLoadFrom(m_xInputStreamToLoadFrom,m_bIsReadOnly); - // <-- String aMimeType( SotExchange::GetFormatMimeType( GetContentType() )); -//!! ??? what have we here to do ???? -//!! if( bNativFormat ) -//!! aData.SetAspect( aData.GetAspect() | ASPECT_ICON ); - uno::Any aValue; GetObj()->GetData( aValue, aMimeType, !IsSynchron() && bWaitForData ); @@ -460,17 +440,6 @@ BOOL SwBaseLink::SwapIn( BOOL bWaitForData, BOOL bNativFormat ) bSwapIn = FALSE; - // --> OD 2005-04-11 #i46300# - deactivate fix for issues i9861 and i33293 -// if ( pTBIS && pTBIS->isTouched() ) -// { -// // --> OD 2005-04-11 #i46300# - determine correct URL for the graphic -// String sGrfNm; -// GetLinkManager()->GetDisplayNames( this, 0, &sGrfNm, 0, 0 ); -// (m_pReReadThread = new ReReadThread( -// this, sGrfNm, bWaitForData, bNativFormat))->create(); -// // <-- -// } - // <-- return bRes; } diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 591f55cb96..a3adae57d9 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -121,12 +121,6 @@ SwFrmFmt *FindFrmFmt( SdrObject *pObj ) pRetval = pContact->GetFmt(); } } -/* SJ: after prior consultation with OD we decided to remove this Assertion -#if OSL_DEBUG_LEVEL > 1 - ASSERT( pRetval, - "<::FindFrmFmt(..)> - no frame format found for given object. Please inform OD." ); -#endif -*/ return pRetval; } @@ -1565,22 +1559,6 @@ void SwDrawContact::_Changed( const SdrObject& rObj, // <-- } } - // --> OD 2006-01-18 #129959# - // It reveals that the following code causes several defects - - // on copying or on ungrouping a group shape containing edge objects. - // Testing fix for #i53320# also reveal that the following code - // isn't necessary. -// // --> OD 2005-08-15 #i53320# - reset positioning attributes, -// // if anchored drawing object isn't yet positioned. -// else if ( pAnchoredDrawObj->NotYetPositioned() && -// static_cast<const SwDrawFrmFmt&>(pAnchoredDrawObj->GetFrmFmt()).IsPosAttrSet() ) -// { -// const_cast<SwDrawFrmFmt&>( -// static_cast<const SwDrawFrmFmt&>(pAnchoredDrawObj->GetFrmFmt())) -// .ResetPosAttr(); -// } -// // <-- - // <-- } break; case SDRUSERCALL_CHGATTR: @@ -2092,8 +2070,6 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch ) } pFrm->AppendDrawObj( *(pDrawVirtObj->AnchoredObj()) ); - // for repaint, use new ActionChanged() - // pDrawVirtObj->SendRepaintBroadcast(); pDrawVirtObj->ActionChanged(); } @@ -2605,8 +2581,6 @@ void SwDrawVirtObj::RecalcBoundRect() // OD 2004-04-05 #i26791# - switch order of calling <GetOffset()> and // <ReferencedObj().GetCurrentBoundRect()>, because <GetOffset()> calculates // its value by the 'BoundRect' of the referenced object. - //aOutRect = rRefObj.GetCurrentBoundRect(); - //aOutRect += GetOffset(); const Point aOffset(GetOffset()); aOutRect = ReferencedObj().GetCurrentBoundRect() + aOffset; @@ -2677,10 +2651,6 @@ void SwDrawVirtObj::NbcShear(const Point& rRef, long nWink, double tn, bool bVSh void SwDrawVirtObj::Move(const Size& rSiz) { SdrObject::Move( rSiz ); -// Rectangle aBoundRect0; if(pUserCall) aBoundRect0 = GetLastBoundRect(); -// rRefObj.Move( rSiz ); -// SetRectsDirty(); -// SendUserCall(SDRUSERCALL_RESIZE, aBoundRect0); } void SwDrawVirtObj::Resize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index 63f525e5af..ef8e7d027a 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx @@ -889,7 +889,6 @@ void SwDrawView::ShowDragAnchor() { CalcAnchor(); pHdl->SetPos(aAnchorPoint); - //OLMRefreshAllIAOManagers(); } } @@ -1097,16 +1096,6 @@ void SwDrawView::DeleteMarked() pDoc->GetRootFrm()->EndAllAction(); } -/******** -JP 02.10.98: sollte als Fix fuer 57153 gelten, hatte aber Nebenwirkungen, - wie Bug 57475 -const SdrMarkList& SwDrawView::GetMarkedObjectList() const -{ - FlushComeBackTimer(); - return FmFormView::GetMarkedObjectList(); -} -*************/ - diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index 4cc50287d9..27beea64fd 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -184,10 +184,6 @@ BOOL SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt ) { SwDoc* pDoc = rEditSh.GetDoc(); -// if( !pDoc->IsAutoFmtRedline() && -// pPam != &rCrsr ) // nur an akt. Position das Redline sichern -// pDoc->SetRedlineMode_intern( eOld | REDLINE_IGNORE ); - if( pDoc->IsAutoFmtRedline() ) { if( nPos == pNd->GetTxt().Len() ) // am Ende erfolgt ein Insert @@ -287,7 +283,6 @@ const String* SwAutoCorrDoc::GetPrevPara( BOOL bAtNormalPos ) (*pIdx)--; pTNd = pIdx->GetNode().GetTxtNode(); } - //if( pTNd && NO_NUMBERING == pTNd->GetTxtColl()->GetOutlineLevel() ) if( pTNd && 0 == pTNd->GetAttrOutlineLevel() )//#outline level,zhaojianwei pStr = &pTNd->GetTxt(); diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index ccca7af1a2..595685c1a7 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -565,12 +565,9 @@ BOOL SwAutoFormat::DoUnderline() xub_StrLen nCnt = 0; while( *pStr ) { -//JP 29.03.96: Spaces unterbrechen die Umrandung! -// if( !IsSpace( *pStr ) ) + int eTmp = 0; + switch( *pStr ) { - int eTmp = 0; - switch( *pStr ) - { case '-': eTmp = 1; break; case '_': eTmp = 2; break; case '=': eTmp = 3; break; @@ -579,13 +576,13 @@ BOOL SwAutoFormat::DoUnderline() case '#': eTmp = 6; break; default: return FALSE; - } - if( 0 == eState ) - eState = eTmp; - else if( eState != eTmp ) - return FALSE; - ++nCnt; } + if( 0 == eState ) + eState = eTmp; + else if( eState != eTmp ) + return FALSE; + ++nCnt; + ++pStr; } @@ -595,8 +592,6 @@ BOOL SwAutoFormat::DoUnderline() DelEmptyLine( FALSE ); aDelPam.SetMark(); aDelPam.GetMark()->nContent = 0; -//JP 19.03.96: kein Underline sondern eine Umrandung setzen! -// pDoc->Insert( aDelPam, SvxUnderlineItem( eState ) ); SvxBorderLine aLine; switch( eState ) @@ -857,7 +852,6 @@ USHORT SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos, // roemische Zeichen sind "mdclxvi". Da man aber eher mal eine // Numerierung mit c oder d anfangen will, werden diese erstmal // zu chars und spaeter ggfs. zu romischen Zeichen! -// if( strchr( "mdclxvi", cLow )) #ifdef WITH_ALPHANUM_AS_NUMFMT //detection of 'c' and 'd' a ROMAN numbering should not be done here if( 256 > cLow &&( (eScan & (LOWER_ROMAN|UPPER_ROMAN)) @@ -1084,8 +1078,6 @@ BOOL SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const SwTxtNode* pTxtNd = pPos->nNode.GetNode().GetTxtNode(); if( nBlnkPos && nBlnkPos-- < pTxtNd->GetTxt().Len() && ( ' ' == pTxtNd->GetTxt().GetChar( nBlnkPos ) )) -// JP 23.08.95: keine Tabs stehen lassen, diese in Blanks wandeln -// ( ' ' == ( cCh = pTxtNd->GetTxt()[ nBlnkPos ] ) || '\t' == cCh )) pPos->nContent--; else { @@ -1094,8 +1086,6 @@ BOOL SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const pTxtNd = pPos->nNode.GetNode().GetTxtNode(); if( nBlnkPos < pTxtNd->GetTxt().Len() && ( ' ' == pTxtNd->GetTxt().GetChar( nBlnkPos ))) -// JP 23.08.95: keine Tabs stehen lassen, diese in Blanks wandeln -// ( ' ' == ( cCh = pTxtNd->GetTxt()[ nBlnkPos ] ) || '\t' == cCh )) pPos->nContent++; else return FALSE; @@ -1470,7 +1460,6 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel ) IsBlanksInString( *pAktTxtNd ) || IsSentenceAtEnd( *pAktTxtNd ); sal_Bool bRTL = pEditShell->IsInRightToLeftText(); -// SetColl( RES_POOLCOLL_NUM_LEVEL1 + ( nLvl * 4 ) ); DeleteAktPara( TRUE, TRUE ); BOOL bChgBullet = FALSE, bChgEnum = FALSE; @@ -1491,7 +1480,6 @@ void SwAutoFormat::BuildEnum( USHORT nLvl, USHORT nDigitLevel ) const String& rStr = pAktTxtNd->GetTxt(); xub_StrLen nTxtStt = 0, nOrigTxtStt = 0; const sal_Unicode* pFndBulletChr; -// if( aFlags.bAFmtByInput ? aFlags.bSetNumRule : aFlags.bChgEnumNum && if( aFlags.bChgEnumNum && 2 < rStr.Len() && 0 != ( pFndBulletChr = StrChr( pBulletChar, rStr.GetChar( nTxtStt ) )) @@ -2086,12 +2074,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos ) case '?': if( aFlags.bCptlSttSntnc ) bFirstSent = TRUE; -//alle Wortrenner loesen die Autokorrektur aus! -// break; default: -//alle Wortrenner loesen die Autokorrektur aus! -// case ' ': -// case '\t': if( !( rAppCC.isLetterNumeric( *pTxt, nPos ) || '/' == cChar )) // '/' should not be a word seperator (e.g. '1/2' needs to be handled as one word for replacement) { @@ -2459,10 +2442,6 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags, if( !bNxtEmpty && HasBreakAttr( *pNxtNd ) ) bNxtEmpty = TRUE; - // fuer z.B. selbst definierte Einzuege oder - // rechts/zentierte Ausrichtung -// if( !nLevel && 0 != aFInfo.GetLineStart() ) -// nLevel = 1; } else { @@ -2501,13 +2480,6 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags, // nicht, dann teste auf Ueberschrift if( ':' == sEndClrStr.GetChar( nLen - 1 ) ) { -//--------------------------------------------------------------------------- -// Wie ist denn nun die Bedingung fuer die Ueberschrift auf Ebene 3 ?? -// Zur Zeit: generell wenn am Ende ein ':' ist. -// -// if( bNxtEmpty || bNxtAlpha ) -// !IsEnumericChar( *pNxtNd ) ) -//--------------------------------------------------------------------------- { BuildHeadLine( 2 ); eStat = READ_NEXT_PARA; @@ -2520,16 +2492,8 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags, if( bNxtEmpty || bNxtAlpha || ( pNxtNd && IsEnumericChar( *pNxtNd )) -//--------------------------------------------------------------------------- -// ist zum Verwechseln mit neg. Einzug !! - /*|| nLevel < nNxtLevel*/ -//--------------------------------------------------------------------------- - ) { - // wurde Level vom Text vorgegeben ? -// if( USHRT_MAX != nDigitLvl ) -// nLevel = nDigitLvl; // eine Ebene runter ? if( nLevel >= MAXLEVEL ) @@ -2571,9 +2535,6 @@ SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags, BuildEnum( nLevel, nDigitLvl ); eStat = READ_NEXT_PARA; } -//JP 25.03.96: Vorlagen fuer Einzug zulassen -// else if( aFlags.bAFmtByInput ) -// eStat = READ_NEXT_PARA; else if( bReplaceStyles ) eStat = nLevel ? TST_IDENT : TST_NEG_IDENT; else diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx index 8077547036..38d6ed0f99 100644 --- a/sw/source/core/edit/edatmisc.cxx +++ b/sw/source/core/edit/edatmisc.cxx @@ -53,7 +53,7 @@ void SwEditShell::ResetAttr( const SvUShortsSort* pAttrs ) GetDoc()->StartUndo(UNDO_RESETATTR, NULL); FOREACHPAM_START(this) - // if ( PCURCRSR->HasMark() ) + GetDoc()->ResetAttrs(*PCURCRSR, sal_True, pAttrs); FOREACHPAM_END() @@ -67,10 +67,6 @@ void SwEditShell::ResetAttr( const SvUShortsSort* pAttrs ) void SwEditShell::GCAttr() { -//JP 04.02.97: wozu eine Action-Klammerung - ein Formatierung sollte nicht -// ausgeloest werden, so dass es hier ueberfluessig ist. -// Sonst Probleme im MouseBut.DownHdl - Bug 35562 -// StartAllAction(); FOREACHPAM_START(this) SwTxtNode *pTxtNode; if ( !PCURCRSR->HasMark() ) @@ -92,7 +88,6 @@ void SwEditShell::GCAttr() aIdx <= rEnd ); } FOREACHPAM_END() -// EndAllAction(); } // Setze das Attribut als neues default Attribut im Dokument. @@ -106,17 +101,6 @@ void SwEditShell::SetDefault( const SfxPoolItem& rFmtHint ) EndAllAction(); } -/* - -void SwEditShell::SetDefault( const SfxItemSet& rSet ) -{ - // 7502: Action-Klammerung - StartAllAction(); - GetDoc()->SetDefault( rSet ); - EndAllAction(); -} -*/ - // Erfrage das Default Attribut in diesem Dokument. const SfxPoolItem& SwEditShell::GetDefault( USHORT nFmtHint ) const diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index a96e1df2ef..ef86b56487 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -258,21 +258,6 @@ bool SwEditShell::SetCurFtn( const SwFmtFtn& rFillFtn ) } - -/*USHORT SwEditShell::GetFtnCnt( BOOL bEndNotes = FALSE ) const -{ - const SwFtnIdxs &rIdxs = pDoc->GetFtnIdxs(); - USHORT nCnt = 0; - for ( USHORT i = 0; i < rIdxs.Count(); ++i ) - { - const SwFmtFtn &rFtn = rIdxs[i]->GetFtn(); - if ( bEndNotes == rFtn.IsEndNote() ) - nCnt++; - } - return nCnt; -} */ - - bool SwEditShell::HasFtns( bool bEndNotes ) const { const SwFtnIdxs &rIdxs = pDoc->GetFtnIdxs(); @@ -491,7 +476,7 @@ BOOL lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos, USHORT SwEditShell::GetScriptType() const { USHORT nRet = 0; - //if( pBreakIt->GetBreakIter().is() ) + { FOREACHPAM_START(this) diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx index 5dc18458a0..907f374606 100644 --- a/sw/source/core/edit/edfld.cxx +++ b/sw/source/core/edit/edfld.cxx @@ -376,11 +376,6 @@ void SwEditShell::UpdateFlds( SwField &rFld ) SwTxtFld *pTxtFld; SwFmtFld *pFmtFld; -// if( pCrsr->GetNext() == pCrsr && !pCrsr->HasMark() && -// ( 0 != ( pTxtFld = GetDocTxtFld( pCrsr->Start() ) ) || -// 0 != ( pTxtFld = lcl_FindInputFld( GetDoc(), rFld ) ) ) && -// ( pFmtFld = (SwFmtFld*)&pTxtFld->GetFld())->GetFld() -// ->GetTyp()->Which() == rFld.GetTyp()->Which() ) if ( pCrsr->GetNext() == pCrsr && !pCrsr->HasMark()) { pTxtFld = GetDocTxtFld(pCrsr->Start()); diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index ace60c8bf5..855e497ac4 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -383,30 +383,6 @@ void SwEditShell::GetGrfNms( String* pGrfName, String* pFltName, } -// alternativen Text abfragen/setzen -//const String& SwEditShell::GetAlternateText() const -//{ -// SwPaM* pCrsr = GetCrsr(); -// const SwNoTxtNode* pNd; -// if( !pCrsr->HasMark() && 0 != ( pNd = pCrsr->GetNode()->GetNoTxtNode()) ) -// return pNd->GetAlternateText(); - -// return aEmptyStr; -//} - - -//void SwEditShell::SetAlternateText( const String& rTxt ) -//{ -// SwPaM* pCrsr = GetCrsr(); -// SwNoTxtNode* pNd; -// if( !pCrsr->HasMark() && 0 != ( pNd = pCrsr->GetNode()->GetNoTxtNode()) ) -// { -// pNd->SetAlternateText( rTxt, sal_True ); -// GetDoc()->SetModified(); -// } -//} - - const PolyPolygon *SwEditShell::GetGraphicPolygon() const { SwNoTxtNode *pNd = GetCrsr()->GetNode()->GetNoTxtNode(); diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 31f2477899..724541f956 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -242,8 +242,6 @@ void SwLinguIter::_Start( SwEditShell *pShell, SwDocPositions eStart, SwPaM *pCrsr = pSh->GetCrsr(); - // pStk->SetCurCrsr(); -// if( pCrsr->HasMark() || pCrsr != pCrsr->GetNext() ) if( pShell->HasSelection() || pCrsr != pCrsr->GetNext() ) { bSetCurr = 0 != GetCurr(); @@ -358,8 +356,6 @@ uno::Any SwSpellIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) if( !pMySh ) return aSpellRet; -// const SwPosition *pEnd = GetEnd(); - ASSERT( GetEnd(), "SwEditShell::SpellContinue() ohne Start?"); uno::Reference< uno::XInterface > xSpellRet; @@ -434,8 +430,6 @@ uno::Any SwConvIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) if( !pMySh ) return aConvRet; -// const SwPosition *pEnd = GetEnd(); - ASSERT( GetEnd(), "SwConvIter::Continue() ohne Start?"); rtl::OUString aConvText; @@ -1166,12 +1160,6 @@ bool SwEditShell::GetGrammarCorrection( sal_Int32 nEndOfSentence = ModelToViewHelper::ConvertToViewPosition( pConversionMap, pWrong->getSentenceEnd( nBegin ) ); if( nEndOfSentence == STRING_LEN ) { -/* if( nStartOfSentence == 0 ) - { - nStartOfSentence = -1; - nEndOfSentence = -1; - } - else */ nEndOfSentence = aExpandText.getLength(); } @@ -1206,10 +1194,6 @@ bool SwEditShell::GetGrammarCorrection( xub_StrLen nLineEnd = GetCrsr()->GetPoint()->nContent.GetIndex(); Pop(FALSE); -#if OSL_DEBUG_LEVEL > 1 -// pNode->GetGrammarCheck()->Invalidate( 0, STRING_LEN ); -// pNode->SetGrammarCheckDirty( true ); -#endif // make sure the selection build later from the // data below does not include footnotes and other // "in word" character to the left and right in order diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index a9bb0aa914..f9564ed2b1 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -341,13 +341,9 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos) SwTxtNode * pTxtNode = aPaM.GetNode()->GetTxtNode(); // --> OD 2008-06-09 #i90078# -// int nLevel = -1; -// int nReferenceLevel = pTxtNode->GetActualListLevel(); -// if (! IsFirstOfNumRule(aPaM)) -// nLevel = nReferenceLevel; SwNumRule aRule(*pCurNumRule); -// aRule.ChangeIndent(nIndent, nLevel, nReferenceLevel, FALSE); + if ( IsFirstOfNumRule() ) { aRule.SetIndentOfFirstListLevelAndChangeOthers( nIndent ); @@ -559,12 +555,8 @@ BOOL SwEditShell::IsProtectedOutlinePara() const { SwNodePtr pTmpNd = rOutlNd[ nPos ]; - // --> OD 2008-04-02 #refactorlists# -// BYTE nTmpLvl = GetRealLevel( pTmpNd->GetTxtNode()-> -// GetTxtColl()->GetOutlineLevel() ); - // int nTmpLvl = pTmpNd->GetTxtNode()->GetOutlineLevel();//#outline level,zhaojianwei int nTmpLvl = pTmpNd->GetTxtNode()->GetAttrOutlineLevel(); - // ASSERT( nTmpLvl >= 0 && nTmpLvl < MAXLEVEL, + ASSERT( nTmpLvl >= 0 && nTmpLvl <= MAXLEVEL, //<-end,zhaojianwei "<SwEditShell::IsProtectedOutlinePara()>" ); // <-- @@ -658,7 +650,6 @@ BOOL SwEditShell::IsNoNum( BOOL bChkStart ) const BYTE SwEditShell::GetNumLevel() const { // gebe die akt. Ebene zurueck, auf der sich der Point vom Cursor befindet - //BYTE nLevel = NO_NUMBERING; //#outline level,zhaojianwei BYTE nLevel = MAXLEVEL; //end,zhaojianwei SwPaM* pCrsr = GetCrsr(); diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index 9a793ab7b8..5bf4ca1d0c 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -401,9 +401,7 @@ const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos) pReturn = pInnermostNode->EndOfSectionNode(); else if ( bStart ) pReturn = pInnermostNode; - // else pReturn = NULL; } - // else: pReturn = NULL DBG_ASSERT( ( pReturn == NULL ) || pReturn->IsStartNode() || diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index 84a10f7663..1995d00f55 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -345,8 +345,6 @@ void SwEditShell::ApplyAutoMark() // // SearchOptions to be used in loop below // - //SearchAlgorithms eSrchType = SearchAlgorithms_ABSOLUTE; - //OUString aSrchStr = rText; BOOL bCaseSensitive = TRUE; BOOL bWordOnly = FALSE; BOOL bSrchInSel = FALSE; @@ -407,13 +405,11 @@ void SwEditShell::ApplyAutoMark() // if (!bCaseSensitive) { - //nSrchFlags |= SearchFlags::ALL_IGNORE_CASE; aSearchOpt.transliterateFlags |= TransliterationModules_IGNORE_CASE; } else { - //aSearchOpt.searchFlag &= ~SearchFlags::ALL_IGNORE_CASE; aSearchOpt.transliterateFlags &= ~TransliterationModules_IGNORE_CASE; } |