[Libreoffice-commits] .: sw/source
David Tardon
dtardon at kemper.freedesktop.org
Wed Nov 17 23:25:30 PST 2010
sw/source/core/access/accnotextframe.cxx | 14 -
sw/source/core/access/accpara.cxx | 39 ----
sw/source/core/access/accportions.cxx | 4
sw/source/core/access/acctable.cxx | 22 --
sw/source/core/attr/cellatr.cxx | 3
sw/source/core/attr/hints.cxx | 11 -
sw/source/core/bastyp/SwSmartTagMgr.cxx | 10 -
sw/source/core/bastyp/breakit.cxx | 12 -
sw/source/core/bastyp/calc.cxx | 36 ----
sw/source/core/bastyp/init.cxx | 3
sw/source/core/bastyp/swcache.cxx | 14 -
sw/source/core/bastyp/swrect.cxx | 7
sw/source/core/crsr/bookmrk.cxx | 2
sw/source/core/crsr/crbm.cxx | 2
sw/source/core/crsr/crsrsh.cxx | 34 ----
sw/source/core/crsr/crstrvl.cxx | 19 --
sw/source/core/crsr/findattr.cxx | 41 -----
sw/source/core/crsr/findtxt.cxx | 4
sw/source/core/crsr/pam.cxx | 6
sw/source/core/crsr/swcrsr.cxx | 19 --
sw/source/core/crsr/unocrsr.cxx | 8 -
sw/source/core/doc/dbgoutsw.cxx | 1
sw/source/core/doc/doc.cxx | 6
sw/source/core/doc/docbasic.cxx | 12 -
sw/source/core/doc/docbm.cxx | 7
sw/source/core/doc/docdesc.cxx | 27 ---
sw/source/core/doc/docdraw.cxx | 13 -
sw/source/core/doc/docedt.cxx | 11 -
sw/source/core/doc/docfld.cxx | 31 ---
sw/source/core/doc/docfmt.cxx | 37 ----
sw/source/core/doc/docftn.cxx | 6
sw/source/core/doc/docglbl.cxx | 13 -
sw/source/core/doc/doclay.cxx | 42 -----
sw/source/core/doc/docnum.cxx | 248 -------------------------------
sw/source/core/doc/docredln.cxx | 5
sw/source/core/doc/docruby.cxx | 23 --
sw/source/core/doc/docsort.cxx | 2
sw/source/core/doc/doctxm.cxx | 17 --
sw/source/core/doc/fmtcol.cxx | 1
sw/source/core/doc/list.cxx | 13 -
sw/source/core/doc/number.cxx | 140 -----------------
sw/source/core/doc/poolfmt.cxx | 52 ------
sw/source/core/doc/swserv.cxx | 12 -
sw/source/core/doc/tblafmt.cxx | 4
sw/source/core/doc/tblcpy.cxx | 14 -
sw/source/core/doc/tblrwcl.cxx | 7
46 files changed, 27 insertions(+), 1027 deletions(-)
New commits:
commit 44ecc87d42d639f69edcc6cee23caf594763c7b8
Author: Kayo Hamid <revol.code at yahoo.com>
Date: Thu Nov 18 08:25:05 2010 +0100
remove dead code
diff --git a/sw/source/core/access/accnotextframe.cxx b/sw/source/core/access/accnotextframe.cxx
index fb5bc5b..2abd2e1 100644
--- a/sw/source/core/access/accnotextframe.cxx
+++ b/sw/source/core/access/accnotextframe.cxx
@@ -158,20 +158,6 @@ void SwAccessibleNoTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
}
}
break;
- // <--
- /*
- case RES_OBJECTDYING:
- if( aDepend.GetRegisteredIn() ==
- static_cast< SwModify *>( static_cast< SwPtrMsgPoolItem * >( pOld )->pObject ) )
- const_cast < SwModify *>( aDepend.GetRegisteredIn()->Remove( aDepend );
- break;
-
- case RES_FMT_CHG:
- if( static_cast< SwFmtChg * >(pNew)->pChangedFmt == GetRegisteredIn() &&
- static_cast< SwFmtChg * >(pOld)->pChangedFmt->IsFmtInDTOR() )
- pRegisteredIn->Remove( this );
- break;
- */
}
}
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 1da057e..33f68a7 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1256,37 +1256,6 @@ uno::Sequence<PropertyValue> SwAccessibleParagraph::getCharacterAttributes(
++i;
}
-// // create a (dummy) text portion for the sole purpose of calling
-// // getPropertyValues on it
-// Reference<XMultiPropertySet> xPortion = CreateUnoPortion( nIndex, nIndex + 1 );
-
-// // get values
-// Sequence<OUString> aNames = getAttributeNames();
-// sal_Int32 nLength = aNames.getLength();
-// Sequence<Any> aAnys( nLength );
-// aAnys = xPortion->getPropertyValues( aNames );
-
-// // copy names + anys into return sequence
-// Sequence<PropertyValue> aValues( aNames.getLength() );
-// const OUString* pNames = aNames.getConstArray();
-// const Any* pAnys = aAnys.getConstArray();
-// PropertyValue* pValues = aValues.getArray();
-// for( sal_Int32 i = 0; i < nLength; i++ )
-// {
-// PropertyValue& rValue = pValues[i];
-// rValue.Name = pNames[i];
-// rValue.Value = pAnys[i];
-// rValue.Handle = -1; // handle not supported
-// rValue.State = PropertyState_DIRECT_VALUE; // states not supported
-// }
-
-// // adjust background color if we're in a gray portion
-// DBG_ASSERT( pValues[CHAR_BACK_COLOR_POS].Name.
-// equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CharBackColor")),
-// "Please adjust CHAR_BACK_COLOR_POS constant." );
-// if( GetPortionData().IsInGrayPortion( nIndex ) )
-// pValues[CHAR_BACK_COLOR_POS].Value <<= SwViewOption::GetFieldShadingsColor().GetColor();
-
return aValues;
}
@@ -2384,9 +2353,7 @@ uno::Reference< XAccessibleHyperlink > SAL_CALL
uno::Reference< XAccessibleHyperlink > xRet;
- // --> OD 2007-06-27 #i77108# - provide hyperlinks also in editable documents.
-// if( !IsEditableState() )
- // <--
+ // #i77108#
{
const SwTxtFrm *pTxtFrm = static_cast<const SwTxtFrm*>( GetFrm() );
SwHyperlinkIter_Impl aHIter( pTxtFrm );
@@ -2445,9 +2412,7 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getHyperLinkIndex( sal_Int32 nCharInde
}
sal_Int32 nRet = -1;
- // --> OD 2007-06-27 #i77108# - provide hyperlinks also in editable documents.
-// if( !IsEditableState() )
- // <--
+ // #i77108#
{
const SwTxtFrm *pTxtFrm = static_cast<const SwTxtFrm*>( GetFrm() );
SwHyperlinkIter_Impl aHIter( pTxtFrm );
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index bf1d214..18a4df8 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -466,9 +466,7 @@ size_t SwAccessiblePortionData::FindLastBreak(
size_t nResult = FindBreak( rPositions, nValue );
// skip 'zero-length' portions
- // --> OD 2006-10-19 #i70538#
- // consider size of <rPosition> and ignore last entry
-// while( rPositions[nResult+1] <= nValue )
+ // #i70538# consider size of <rPosition> and ignore last entry
while ( nResult < rPositions.size() - 2 &&
rPositions[nResult+1] <= nValue )
{
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index 2a4bf50..cbbbccc 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -1478,14 +1478,6 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild(
const SwStartNode* pStartNode = pBox->GetSttNd();
if( pSelectedTable == NULL || !pCrsrShell->GetTblCrs() )
{
- // if we're in the wrong table, or there's no table selection
- // at all, then select the current table cell.
-// SwPaM* pPaM = pCrsrShell->GetCrsr();
-// pPaM->DeleteMark();
-// *(pPaM->GetPoint()) = SwPosition( *pStartNode );
-// pPaM->Move( fnMoveForward, fnGoNode );
-// // pCrsrShell->SelTblBox();
-
pCrsrShell->StartAction();
// Set cursor into current cell. This deletes any table cursor.
SwPaM aPaM( *pStartNode );
@@ -1515,20 +1507,6 @@ void SAL_CALL SwAccessibleTable::selectAccessibleChild(
*(aPaM.GetMark()) = *pPaM->GetMark();
Select( aPaM );
- // if only one box is selected, we select this one in
- // order to maintain our table selection
-// if( aPaM.GetPoint()->nNode.GetNode().FindTableBoxStartNode() ==
-// aPaM.GetMark()->nNode.GetNode().FindTableBoxStartNode() )
-// {
-// // pCrsrShell->SelTblBox();
-// }
-// else
-// {
- // finally; set the selection. This will call UpdateCursor
- // on the cursor shell, too.
-// pCrsrShell->KillPams();
- // pCrsrShell->SetSelection( aPaM );
-// }
}
}
diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx
index 064242d..2196b02 100644
--- a/sw/source/core/attr/cellatr.cxx
+++ b/sw/source/core/attr/cellatr.cxx
@@ -158,9 +158,6 @@ void SwTblBoxFormula::ChangeState( const SfxPoolItem* pItem )
// setze das Value-Flag zurueck
// JP 17.06.96: interne Darstellung auf alle Formeln
// (Referenzen auf andere Tabellen!!!)
-// if( VF_CMD & pFld->GetFormat() )
-// pFld->PtrToBoxNm( pUpdtFld->pTbl );
-// else
ChgValid( FALSE );
break;
case TBL_BOXNAME:
diff --git a/sw/source/core/attr/hints.cxx b/sw/source/core/attr/hints.cxx
index cb1b895..bd10237 100644
--- a/sw/source/core/attr/hints.cxx
+++ b/sw/source/core/attr/hints.cxx
@@ -206,17 +206,6 @@ SwVirtPageNumInfo::SwVirtPageNumInfo( const SwPageFrm *pPg ) :
{
}
-// --> OD 2008-02-19 #refactorlists#
-//SwNumRuleInfo::SwNumRuleInfo( const String& rRuleName )
-// : SwMsgPoolItem( RES_GETNUMNODES ), rName( rRuleName )
-//{
-//}
-
-//void SwNumRuleInfo::AddNode( SwTxtNode& rNd )
-//{
-// aList.Insert(rNd.GetIndex(), &rNd);
-//}
-
SwFindNearestNode::SwFindNearestNode( const SwNode& rNd )
: SwMsgPoolItem( RES_FINDNEARESTNODE ), pNd( &rNd ), pFnd( 0 )
diff --git a/sw/source/core/bastyp/SwSmartTagMgr.cxx b/sw/source/core/bastyp/SwSmartTagMgr.cxx
index 68e6308..0a851a8 100644
--- a/sw/source/core/bastyp/SwSmartTagMgr.cxx
+++ b/sw/source/core/bastyp/SwSmartTagMgr.cxx
@@ -82,14 +82,4 @@ void SwSmartTagMgr::changesOccurred( const util::ChangesEvent& rEvent ) throw( R
SmartTagMgr::changesOccurred( rEvent );
}
-/*
-SmartTagMgr& SwSmartTagMgr::Get()
-{
- if ( !pSmartTagMgr )
- pSmartTagMgr = new SmartTagMgr( SwDocShell::Factory().GetModuleName() );
-
- return *pSmartTagMgr;
-}
-*/
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/bastyp/breakit.cxx b/sw/source/core/bastyp/breakit.cxx
index b670b13..4c5ebde 100644
--- a/sw/source/core/bastyp/breakit.cxx
+++ b/sw/source/core/bastyp/breakit.cxx
@@ -68,18 +68,6 @@ SwBreakIt::SwBreakIt(
aForbiddenLang( LANGUAGE_DONTKNOW)
{
DBG_ASSERT( m_xMSF.is(), "SwBreakIt: no MultiServiceFactory" );
- //if ( m_xMSF.is() )
- //{
- // xBreak = uno::Reference< i18n::XBreakIterator >(
- // m_xMSF->createInstance(
- // rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator")) ),
- // uno::UNO_QUERY);
-
- // xCTLDetect = uno::Reference< i18n::XScriptTypeDetector >(
- // m_xMSF->createInstance(
- // rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.ScriptTypeDetector")) ),
- // uno::UNO_QUERY);
- // }
}
SwBreakIt::~SwBreakIt()
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 2782d8d..9b95a6b 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -398,11 +398,6 @@ static ULONG SwDocStat::* __READONLY_DATA aDocStat2[ 4 ] =
sTmpStr.AssignAscii( sNTypeTab[ 25 ] );
VarTable[ aHashValue[ 25 ] ]->pNext = new SwCalcExp( sTmpStr, nVal, 0 );
-// at time its better not to use "graph", because then the im-/export have
-// to change in all formulas this name.
-// nVal.PutLong( rDocStat.*aDocStat1[ 1 ] );
-// VarTable[ aHashValue[ 26 ] ]->pNext = new SwCalcExp(
-// sNTypeTab[ 26 ], nVal, 0 );
}
/******************************************************************************
@@ -1177,10 +1172,6 @@ SwSbxValue SwCalc::Term()
switch( eCurrOper )
{
-// wir haben kein Bitweises verodern, oder ?
-// case CALC_AND: eSbxOper = SbxAND; break;
-// case CALC_OR: eSbxOper = SbxOR; break;
-// case CALC_XOR: eSbxOper = SbxXOR; break;
case CALC_AND: {
GetToken();
BOOL bB = Prim().GetBool();
@@ -1308,33 +1299,8 @@ SwSbxValue SwCalc::Term()
}
break;
-/*
-// removed here because of #77448# (=2*3^2 != 18)
- case CALC_POW: {
- GetToken();
- double fraction, integer;
- double right = Prim().GetDouble(),
- dleft = left.GetDouble();
+//#77448# (=2*3^2 != 18)
- fraction = modf( right, &integer );
- if( ( dleft < 0.0 && 0.0 != fraction ) ||
- ( 0.0 == dleft && right < 0.0 ) )
- {
- eError = CALC_OVERFLOW;
- left.Clear();
- return left;
- }
- dleft = pow(dleft, right );
- if( dleft == HUGE_VAL )
- {
- eError = CALC_POWERR;
- left.Clear();
- return left;
- }
- left.PutDouble( dleft );
- }
- break;
-*/
default: return left;
}
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx
index 65560a5..b5b0065 100644
--- a/sw/source/core/bastyp/init.cxx
+++ b/sw/source/core/bastyp/init.cxx
@@ -732,9 +732,6 @@ void _InitCore()
SwBreakIt::_Create( xMSF );
pCheckIt = NULL;
- /*pAppCharClass = new CharClass(
- xMSF, SwBreakIt::Get()->GetLocale( (LanguageType)GetAppLanguage() ));*/
- //pCalendarWrapper = new SwCalendarWrapper( xMSF );
_FrmInit();
_TextInit();
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx
index 3ae1fbe..b9f068d 100644
--- a/sw/source/core/bastyp/swcache.cxx
+++ b/sw/source/core/bastyp/swcache.cxx
@@ -415,20 +415,6 @@ void SwCache::DeleteObj( SwCacheObj *pObj )
CHECK;
}
-/*
-
-
-void SwCache::Delete( const void *pOwner, const USHORT nIndex )
-{
- INCREMENT( nDelete );
- SwCacheObj *pObj;
- if ( 0 != (pObj = Get( pOwner, nIndex, FALSE )) )
- DeleteObj( pObj );
-}
-*/
-
-
-
void SwCache::Delete( const void *pOwner )
{
INCREMENT( nDelete );
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index 6f4c1ca..da4aa4e 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -69,13 +69,6 @@ Point SwRect::Center() const
{
return Point( Left() + Width() / 2,
Top() + Height() / 2 );
-
-/* Wer ruft schon ein Center auf ein "falsches" Rechteck?
- const long nRight = Right();
- const long nBottom= Bottom();
- return Point( min( Left(), nRight ) + long(abs( (nRight - Left())/2) ),
- min( Top(), nBottom) + long(abs( (nBottom - Top())/2)));
-*/
}
/*************************************************************************
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 32b2534..639e56e 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -125,13 +125,11 @@ namespace sw { namespace mark
void MarkBase::SetMarkPos(const SwPosition& rNewPos)
{
::boost::scoped_ptr<SwPosition>(new SwPosition(rNewPos)).swap(m_pPos1);
- //lcl_FixPosition(*m_pPos1);
}
void MarkBase::SetOtherMarkPos(const SwPosition& rNewPos)
{
::boost::scoped_ptr<SwPosition>(new SwPosition(rNewPos)).swap(m_pPos2);
- //lcl_FixPosition(*m_pPos2);
}
rtl::OUString MarkBase::ToString( ) const
diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx
index 39ee7c1..239c7b1 100644
--- a/sw/source/core/crsr/crbm.cxx
+++ b/sw/source/core/crsr/crbm.cxx
@@ -252,8 +252,6 @@ bool SwCrsrShell::GotoFieldmark(::sw::mark::IFieldmark const * const pMark)
// watch Crsr-Moves
CrsrStateHelper aCrsrSt(*this);
aCrsrSt.SetCrsrToMark(pMark);
- //aCrsrSt.m_pCrsr->GetPoint()->nContent--;
- //aCrsrSt.m_pCrsr->GetMark()->nContent++;
if(aCrsrSt.RollbackIfIllegal()) return false;
UpdateCrsr(SwCrsrShell::SCROLLWIN|SwCrsrShell::CHKRANGE|SwCrsrShell::READONLY);
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 85aa4ab..b341360 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -142,9 +142,7 @@ SwPaM * SwCrsrShell::CreateCrsr()
// hier den akt. Pam nur logisch Hiden, weil sonst die Invertierung
// vom kopierten Pam aufgehoben wird !!
- // #i75172# to be able to make a complete content swap, i moved this to a method
- // pNew->Insert( pCurCrsr, 0 );
- // pCurCrsr->Remove( 0, pCurCrsr->Count() );
+ // #i75172#
pNew->swapContent(*pCurCrsr);
pCurCrsr->DeleteMark();
@@ -226,16 +224,6 @@ void SwCrsrShell::StartAction()
void SwCrsrShell::EndAction( const BOOL bIdleEnd )
{
-/*
-//OS: Wird z.B. eine Basic-Action im Hintergrund ausgefuehrt, geht es so nicht
- if( !bHasFocus )
- {
- // hat die Shell nicht den Focus, dann nur das EndAction an
- // die ViewShell weitergeben.
- ViewShell::EndAction( bIdleEnd );
- return;
- }
-*/
BOOL bVis = bSVCrsrVis;
@@ -1220,12 +1208,6 @@ void SwCrsrShell::VisPortChgd( const SwRect & rRect )
//angezeigt werden, deshalb wird der Aufruf hier geklammert.
ViewShell::VisPortChgd( rRect ); // Bereich verschieben
-/*
- SwRect aRect( rRect );
- if( VisArea().IsOver( aRect ) )
- pCurCrsr->Invalidate( aRect );
-*/
-
if( bSVCrsrVis && bVis ) // auch SV-Cursor wieder anzeigen
pVisCrsr->Show();
@@ -1330,9 +1312,6 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
ClearUpCrsrs();
- // erfrage den Count fuer die Start-/End-Actions und ob die Shell
- // ueberhaupt den Focus hat
-// if( ActionPend() /*|| !bHasFocus*/ )
//JP 12.01.98: Bug #46496# - es muss innerhalb einer BasicAction der
// Cursor geupdatet werden; um z.B. den TabellenCursor zu
// erzeugen. Im EndAction wird jetzt das UpdateCrsr gerufen!
@@ -1472,7 +1451,6 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
ASSERT( !this, "GetCharRect failed." );
#endif
}
-// ALIGNRECT( aCharRect );
pVisCrsr->Hide(); // sichtbaren Cursor immer verstecken
// Curosr in den sichtbaren Bereich scrollen
@@ -1699,7 +1677,6 @@ void SwCrsrShell::UpdateCrsr( USHORT eFlags, BOOL bIdleEnd )
rPt = aCharRect.Center();
pFrm->GetCrsrOfst( pShellCrsr->GetPoint(), rPt, &aTmpState );
}
-// ALIGNRECT( aCharRect );
if( !pShellCrsr->HasMark() )
aCrsrHeight = aTmpState.aRealHeight;
@@ -2322,7 +2299,6 @@ BOOL SwCrsrShell::SetVisCrsr( const Point &rPt )
SwRect aTmp( aCharRect );
pFrm->GetCharRect( aCharRect, aPos, &aTmpState );
-// ALIGNRECT( aCharRect );
if( aTmp == aCharRect && // BUG 10137: bleibt der Cursor auf der
pVisCrsr->IsVisible() ) // Position nicht hidden & showen
@@ -2335,9 +2311,6 @@ BOOL SwCrsrShell::SetVisCrsr( const Point &rPt )
pCurCrsr->Show();
}
- // Bug 29584: bei Rahmenselektion ist der Cursor versteckt, aber den
- // D&D-Cursor will man trotzdem haben
-// if( bSVCrsrVis )
{
if( aTmpState.bRealHeight )
aCrsrHeight = aTmpState.aRealHeight;
@@ -2589,7 +2562,6 @@ SwCrsrShell::SwCrsrShell( SwCrsrShell& rShell, Window *pInitWin )
bCallChgLnk = bHasFocus = bSVCrsrVis = bAutoUpdateCells = TRUE;
bSetCrsrInReadOnly = TRUE;
pVisCrsr = new SwVisCrsr( this );
-// UpdateCrsr( 0 );
// OD 11.02.2003 #100556#
mbMacroExecAllowed = rShell.IsMacroExecAllowed();
}
@@ -2633,7 +2605,6 @@ SwCrsrShell::SwCrsrShell( SwDoc& rDoc, Window *pInitWin,
bSetCrsrInReadOnly = TRUE;
pVisCrsr = new SwVisCrsr( this );
-// UpdateCrsr( 0 );
// OD 11.02.2003 #100556#
mbMacroExecAllowed = true;
}
@@ -2907,7 +2878,6 @@ BOOL SwCrsrShell::FindValidCntntNode( BOOL bOnlyText )
if( bOk )
{
pCNd = rNdIdx.GetNode().GetCntntNode();
-// USHORT nCntnt = Min( pCNd->Len(), pCurCrsr->GetPoint()->nContent.GetIndex() );
xub_StrLen nCntnt = rNdIdx.GetIndex() < nNdIdx ? pCNd->Len() : 0;
pCurCrsr->GetPoint()->nContent.Assign( pCNd, nCntnt );
}
@@ -3100,8 +3070,6 @@ bool SwCrsrShell::SelectHiddenRange()
return bRet;
}
-/* */
-
// die Suchfunktionen
ULONG SwCrsrShell::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes,
SwDocPositions eStart, SwDocPositions eEnde,
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 3f75c21..0b283cb 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -315,9 +315,6 @@ BOOL SwCrsrShell::GotoNextTOXBase( const String* pName )
0 != ( pSectNd = pSect->GetFmt()->GetSectionNode() ) &&
pCurCrsr->GetPoint()->nNode < pSectNd->GetIndex() &&
( !pFnd || pFnd->GetIndex() > pSectNd->GetIndex() ) &&
-// JP 10.12.96: solange wir nur 3 Typen kennen und UI-seitig keine anderen
-// einstellbar sind, muss ueber den Titel gesucht werden!
-// ( !pName || *pName == ((SwTOXBaseSection*)pSect)->GetTypeName() ) &&
( !pName || *pName == ((SwTOXBaseSection*)pSect)->GetTOXName() )
)
{
@@ -365,9 +362,6 @@ BOOL SwCrsrShell::GotoPrevTOXBase( const String* pName )
0 != ( pSectNd = pSect->GetFmt()->GetSectionNode() ) &&
pCurCrsr->GetPoint()->nNode > pSectNd->EndOfSectionIndex() &&
( !pFnd || pFnd->GetIndex() < pSectNd->GetIndex() ) &&
-// JP 10.12.96: solange wir nur 3 Typen kennen und UI-seitig keine anderen
-// einstellbar sind, muss ueber den Titel gesucht werden!
-// ( !pName || *pName == ((SwTOXBaseSection*)pSect)->GetTypeName() ) &&
( !pName || *pName == ((SwTOXBaseSection*)pSect)->GetTOXName() )
)
{
@@ -903,7 +897,6 @@ USHORT SwCrsrShell::GetOutlinePos( BYTE nLevel )
{
pNd = rNds.GetOutLineNds()[ nPos ];
- //if( ((SwTxtNode*)pNd)->GetTxtColl()->GetOutlineLevel() <= nLevel )//#outline level,zhaojianwei
if( ((SwTxtNode*)pNd)->GetAttrOutlineLevel()-1 <= nLevel )//<-end,zhaojianwei
return nPos;
@@ -936,12 +929,10 @@ BOOL SwCrsrShell::MakeOutlineSel( USHORT nSttPos, USHORT nEndPos,
if( bWithChilds )
{
- //BYTE nLevel = pEndNd->GetTxtNode()->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
const int nLevel = pEndNd->GetTxtNode()->GetAttrOutlineLevel()-1;//<-end.zhaojianwei
for( ++nEndPos; nEndPos < rOutlNds.Count(); ++nEndPos )
{
pEndNd = rOutlNds[ nEndPos ];
- //BYTE nNxtLevel = pEndNd->GetTxtNode()->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
const int nNxtLevel = pEndNd->GetTxtNode()->GetAttrOutlineLevel()-1;//<-end,zhaojianwei
if( nNxtLevel <= nLevel )
break; // EndPos steht jetzt auf dem naechsten
@@ -1104,14 +1095,7 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
}
if( bRet )
{
-// rCntntAtPos.sStr = pTxtNd->GetExpandTxt(
-// *pTxtAttr->GetStart(),
-// *pTxtAttr->GetEnd() - *pTxtAttr->GetStart(),
-// FALSE );
-
-// rCntntAtPos.aFnd.pAttr = &pTxtAttr->GetAttr();
rCntntAtPos.eCntntAtPos = SwContentAtPos::SW_SMARTTAG;
-// rCntntAtPos.pFndTxtAttr = pTxtAttr;
if( pFldRect && 0 != ( pFrm = pTxtNd->GetFrm( &aPt ) ) )
pFrm->GetCharRect( *pFldRect, aPos, &aTmpState );
@@ -1784,9 +1768,6 @@ BOOL SwCrsrShell::SetShadowCrsrPos( const Point& rPt, SwFillMode eFillMode )
{
*pCurCrsr->GetPoint() = aPos;
GetDoc()->SetTxtFmtColl( *pCurCrsr, pNextFmt, false );
- //JP 04.11.97: erstmal keine Folgevorlage der
- // Folgevorlage beachten
- // pNextFmt = pNextFmt->GetNextTxtFmtColl();
}
if( n < aFPos.nColumnCnt )
{
diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx
index 521c9dd..17a094c 100644
--- a/sw/source/core/crsr/findattr.cxx
+++ b/sw/source/core/crsr/findattr.cxx
@@ -438,9 +438,6 @@ int SwAttrCheckArr::SetAttrFwd( const SwTxtAttr& rAttr )
ASSERT( !pStackArr[ nWhch - nArrStart ].nWhich,
"Stack-Platz ist noch belegt" );
- // ---------
- // JP 22.08.96: nur Ende manipulieren reicht nicht. Bug 30547
- // pCmp->nStt = aTmp.nEnd;
if( aTmp.nStt <= pCmp->nStt )
pCmp->nStt = aTmp.nEnd;
else
@@ -594,9 +591,6 @@ int SwAttrCheckArr::SetAttrBwd( const SwTxtAttr& rAttr )
ASSERT( !pStackArr[ nWhch - nArrStart ].nWhich,
"Stack-Platz ist noch belegt" );
-// ---------
-// JP 22.08.96: nur Ende manipulieren reicht nicht. Bug 30547
-// pCmp->nEnd = aTmp.nStt;
if( aTmp.nEnd <= pCmp->nEnd )
pCmp->nEnd = aTmp.nStt;
else
@@ -865,10 +859,7 @@ int lcl_Search( const SwCntntNode& rCNd, const SfxItemSet& rCmpSet, BOOL bNoColl
else
{
nWhich = pItem->Which();
-//JP 27.02.95: wenn nach defaults gesucht wird, dann muss man bis zum Pool
-// runter
-// if( SFX_ITEM_SET != rNdSet.GetItemState( nWhich, !bNoColls, &pNdItem )
-// || *pNdItem != *pItem )
+
if( !CmpAttr( rNdSet.Get( nWhich, !bNoColls ), *pItem ))
return FALSE;
}
@@ -1147,36 +1138,6 @@ int SwFindParaAttr::Find( SwPaM* pCrsr, SwMoveFn fnMove, const SwPaM* pRegion,
else if( !pSet->Count() )
return FIND_NOT_FOUND; // nur Text und nicht gefunden
-/* // --> FME 2007-4-12 #i74765 # Why should we move the position?
- Moving the position results in bugs when there are two adjacent
- portions which both have the requested attributes set. I suspect this
- should be only be an optimization. Therefore I boldly remove it now!
-
- // JP: und wieder neu aufsetzen, aber eine Position weiter
- //JP 04.11.97: Bug 44897 - aber den Mark wieder aufheben, damit
- // weiterbewegt werden kann!
- {
- BOOL bCheckRegion = TRUE;
- SwPosition* pPos = aSrchPam.GetPoint();
- if( !(*fnMove->fnNd)( &pPos->nNode.GetNode(),
- &pPos->nContent, CRSR_SKIP_CHARS ))
- {
- if( (*fnMove->fnNds)( &pPos->nNode, FALSE ))
- {
- SwCntntNode *pNd = pPos->nNode.GetNode().GetCntntNode();
- xub_StrLen nCPos;
- if( fnMove == fnMoveForward )
- nCPos = 0;
- else
- nCPos = pNd->Len();
- pPos->nContent.Assign( pNd, nCPos );
- }
- else
- bCheckRegion = FALSE;
- }
- if( !bCheckRegion || *aRegion.GetPoint() <= *pPos )
- return FIND_NOT_FOUND; // nicht gefunden
- }*/
*aRegion.GetMark() = *aSrchPam.GetPoint();
}
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 4a2d18f..3d5c243 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -585,10 +585,6 @@ int SwFindParaText::Find( SwPaM* pCrsr, SwMoveFn fnMove,
BOOL bFnd = (BOOL)pCrsr->Find( rSearchOpt, bSearchInNotes, aSTxt, fnMove, pRegion, bInReadOnly );
- /* #i80135# if we found something in a note, Mark and Point is the same
- if( bFnd && *pCrsr->GetMark() == *pCrsr->GetPoint() )
- return FIND_NOT_FOUND;
- */
if( bFnd && bReplace ) // String ersetzen ??
{
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 1bf513d..cc42054 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -930,12 +930,6 @@ SwCntntNode* GetNode( SwPaM & rPam, BOOL& rbFirst, SwMoveFn fnMove,
( !bInReadOnly && pFrm->IsProtected() ) ||
( pFrm->IsTxtFrm() &&
((SwTxtFrm*)pFrm)->IsHiddenNow() ) )
-
-// rNodes[ rNodes.EndOfAutotext ]->StartOfSection().GetIndex()
-// < aPos.nNode.GetIndex() && aPos.nNode.GetIndex()
-// < rNodes.EndOfAutotext.GetIndex() &&
-// 0 == ( pFrm = pNd->GetFrm()) &&
-// pFrm->IsProtected() )
{
pNd = 0;
continue; // suche weiter
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index d95d5df..2115984 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -2094,12 +2094,6 @@ BOOL SwCursor::MoveSection( SwWhichSection fnWhichSect,
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS );
}
-/*
- BOOL MoveTable( SwWhichTable, SwPosTable );
- BOOL MoveColumn( SwWhichColumn, SwPosColumn );
- BOOL MoveRegion( SwWhichRegion, SwPosRegion );
-*/
-
void SwCursor::RestoreSavePos() // Point auf die SavePos setzen
{
if( pSavePos )
@@ -2215,19 +2209,6 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
if( bDel )
{
SwPaM* pDel = (SwPaM*)pCur->GetPrev();
-/*
-JP 20.07.98: der alte Code geht mit dem UNO-TableCrsr nicht
- if( pDel == pAktCrsr )
- {
- if( pAktCrsr->GetNext() == pAktCrsr )
- {
- pAktCrsr->DeleteMark();
- break; // es gibt nichts mehr zu loeschen!
- }
- pAktCrsr = (SwCursor*)pDel->GetPrev();
- }
- delete pDel;
-*/
if( pDel == pAktCrsr )
pAktCrsr->DeleteMark();
diff --git a/sw/source/core/crsr/unocrsr.cxx b/sw/source/core/crsr/unocrsr.cxx
index 2edbb38..a8cbc61 100644
--- a/sw/source/core/crsr/unocrsr.cxx
+++ b/sw/source/core/crsr/unocrsr.cxx
@@ -227,14 +227,6 @@ SwUnoTableCrsr::~SwUnoTableCrsr()
delete aTblSel.GetNext(); // und loeschen
}
-
-/*
-SwCursor* SwUnoTableCrsr::Create( SwPaM* pRing ) const
-{
- return SwUnoCrsr::Create( pRing );
-}
-*/
-
BOOL SwUnoTableCrsr::IsSelOvr( int eFlags )
{
BOOL bRet = SwUnoCrsr::IsSelOvr( eFlags );
diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx
index 0ed6da0..17ae282 100644
--- a/sw/source/core/doc/dbgoutsw.cxx
+++ b/sw/source/core/doc/dbgoutsw.cxx
@@ -638,7 +638,6 @@ String lcl_dbg_out(const SwNode & rNode)
aTmpStr += String("(", RTL_TEXTENCODING_ASCII_US);
aTmpStr += String::CreateFromInt32
- //(static_cast<SwTxtFmtColl *>(pColl)->GetOutlineLevel());//#outline level,zhaojianwei
(static_cast<SwTxtFmtColl *>(pColl)->GetAssignedOutlineStyleLevel());//<-end,zhaojianwei
const SwNumRuleItem & rItem =
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index ea5e367..27689b5 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1341,7 +1341,6 @@ void SwDoc::CalculatePagesForPrinting(
OUString aPageRange;
if (bIsPDFExport)
{
- // ?? rOptions.getValue( C2U("Selection") );
aPageRange = rOptions.getStringValue( "PageRange", OUString() );
}
else
@@ -2157,8 +2156,7 @@ void SwDoc::Summary( SwDoc* pExtDoc, BYTE nLevel, BYTE nPara, BOOL bImpress )
{
::SetProgressState( i, GetDocShell() );
const ULONG nIndex = rOutNds[ i ]->GetIndex();
- //BYTE nLvl = ((SwTxtNode*)GetNodes()[ nIndex ])->GetTxtColl()//#outline level,zhaojianwei
- // ->GetOutlineLevel();
+
const int nLvl = ((SwTxtNode*)GetNodes()[ nIndex ])->GetAttrOutlineLevel()-1;//<-end,zhaojianwei
if( nLvl > nLevel )
continue;
@@ -2197,7 +2195,7 @@ void SwDoc::Summary( SwDoc* pExtDoc, BYTE nLevel, BYTE nPara, BOOL bImpress )
if( bImpress )
{
SwTxtFmtColl* pMyColl = pNd->GetTxtColl();
- //USHORT nHeadLine = static_cast<USHORT>(pMyColl->GetOutlineLevel()==NO_NUMBERING ?//#outlinelevel,zhaojianwei
+
const USHORT nHeadLine = static_cast<USHORT>(
!pMyColl->IsAssignedToListLevelOfOutlineStyle() //<-end,zhaojianwei
? RES_POOLCOLL_HEADLINE2
diff --git a/sw/source/core/doc/docbasic.cxx b/sw/source/core/doc/docbasic.cxx
index fd18605..1f3346a 100644
--- a/sw/source/core/doc/docbasic.cxx
+++ b/sw/source/core/doc/docbasic.cxx
@@ -134,12 +134,6 @@ BOOL SwDoc::ExecMacro( const SvxMacro& rMacro, String* pRet, SbxArray* pArgs )
eErr = pDocShell->CallXScript(
rMacro.GetMacName(), *pUnoArgs, aRet, aOutArgsIndex, aOutArgs);
- //*pRet = pRetValue->GetString();
- // use the AnyConverter to return a String if appropriate?
-
- // need to call something like lcl_translateUno2Basic
- // pArgs = lcl_translateUno2Basic( pUnoArgs );
-
delete pUnoArgs;
break;
}
@@ -254,12 +248,6 @@ USHORT SwDoc::CallEvent( USHORT nEvent, const SwCallMouseEvent& rCallEvent,
nRet += 0 == pDocShell->CallXScript(
rMacro.GetMacName(), *pUnoArgs,aRet, aOutArgsIndex, aOutArgs) ? 1 : 0;
- //*pRet = pRetValue->GetString();
- // use the AnyConverter to return a String if appropriate?
-
- // need to call something like lcl_translateUno2Basic
- // pArgs = lcl_translateUno2Basic( pUnoArgs );
-
delete pUnoArgs;
}
// JavaScript calls are ignored
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 9717586..402db3c 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -396,12 +396,10 @@ namespace sw { namespace mark
case IDocumentMarkAccess::BOOKMARK:
case IDocumentMarkAccess::CROSSREF_NUMITEM_BOOKMARK:
case IDocumentMarkAccess::CROSSREF_HEADING_BOOKMARK:
- // if(dynamic_cast<IBookmark*>)
lcl_InsertMarkSorted(m_vBookmarks, pMark);
break;
case IDocumentMarkAccess::TEXT_FIELDMARK:
case IDocumentMarkAccess::CHECKBOX_FIELDMARK:
- // if(dynamic_cast<IFieldmark*>
lcl_InsertMarkSorted(m_vFieldmarks, pMark);
break;
case IDocumentMarkAccess::NAVIGATOR_REMINDER:
@@ -706,7 +704,6 @@ namespace sw { namespace mark
}
case IDocumentMarkAccess::TEXT_FIELDMARK:
case IDocumentMarkAccess::CHECKBOX_FIELDMARK:
- // if(dynamic_cast<IFieldmark*>
{
IDocumentMarkAccess::iterator_t ppFieldmark = lcl_FindMark(m_vFieldmarks, *ppMark);
OSL_ENSURE(ppFieldmark != m_vFieldmarks.end(),
@@ -840,10 +837,6 @@ namespace sw { namespace mark
}} // namespace ::sw::mark
-// old implementation
-
-//SV_IMPL_OP_PTRARR_SORT(SwBookmarks, SwBookmarkPtr)
-
#define PCURCRSR (_pCurrCrsr)
#define FOREACHPAM_START(pSttCrsr) \
{\
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index 01312a5..120d17d 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -822,19 +822,6 @@ void SwDoc::PrtOLENotify( BOOL bAll )
//Wenn es keine Benachrichtigung wuenscht
if ( xObj.is() )
{
- //TODO/LATER: needs MiscStatus for ResizeOnPrinterChange
- /*
- if ( SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE & xRef->GetMiscStatus())
- {
- if ( pOLENd->GetFrm() )
- {
- xObj->OnDocumentPrinterChanged( pPrt );
- pShell->CalcAndSetScale( xObj );//Client erzeugen lassen.
- }
- else
- pOLENd->SetOLESizeInvalid( TRUE );
- }
- else */
pGlobalOLEExcludeList->Insert(
new SvGlobalName( aName ),
pGlobalOLEExcludeList->Count() );
@@ -885,20 +872,6 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, )
//Wenn es keine Benachrichtigung wuenscht
if( pOLENd->GetOLEObj().GetOleRef().is() ) //Kaputt?
{
- //TODO/LATER: needs MiscStatus for ResizeOnPrinterChange
- /*
- if( SVOBJ_MISCSTATUS_RESIZEONPRINTERCHANGE &
- xRef->GetMiscStatus() )
- {
- if( pOLENd->GetFrm() )
- {
- xRef->OnDocumentPrinterChanged( pPrt );
- pSh->CalcAndSetScale( xRef );//Client erzeugen lassen.
- }
- else
- pOLENd->SetOLESizeInvalid( TRUE );
- }*/
- // repaint it
pOLENd->Modify( &aMsgHint, &aMsgHint );
}
}
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index 8d18e64..415f905 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -365,19 +365,6 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
// --> OD 2004-10-25 #i36010# - set layout direction of the position
pFmt->SetPositionLayoutDir(
text::PositionLayoutDir::PositionInLayoutDirOfAnchor );
- // <--
- // --> OD 2006-11-01 #130889#
- // creation of <SwDrawContact> instances for the group
- // members and its connection to the Writer layout is
- // done after intrinsic ungrouping.
-// SwDrawContact* pContact = new SwDrawContact( pFmt, pSubObj );
-// // --> OD 2004-11-22 #i35635#
-// pContact->MoveObjToVisibleLayer( pSubObj );
-// // <--
-// pContact->ConnectToLayout();
-// // OD 2004-04-07 #i26791# - Adjust positioning and
-// // alignment attributes.
-// lcl_AdjustPositioningAttr( pFmt, *pSubObj );
pFmtsAndObjs[i].push_back( std::pair< SwDrawFrmFmt*, SdrObject* >( pFmt, pSubObj ) );
// <--
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 19406b4..3affa09 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -284,7 +284,6 @@ void _SaveFlyInRange( const SwPaM& rPam, const SwNodeIndex& rInsPos,
SwFmtAnchor aAnchor( *pAnchor );
aAnchor.SetAnchor( &aPos );
pFmt->SetFmtAttr( aAnchor );
-// ((SwFmtAnchor*)pAnchor)->SetAnchor( &aPos );
}
}
else if( ( rSttNdIdx.GetIndex() + nSttOff <= pAPos->nNode.GetIndex()
@@ -593,7 +592,6 @@ void lcl_SaveRedlines( const SwNodeRange& rRg, _SaveRedlines& rArr )
pTmpPos->nNode.GetNode().GetCntntNode(), 0 );
_SaveRedline* pSave = new _SaveRedline( pNewRedl, rRg.aStart );
-// rArr.Insert( pSave, rArr.Count() );
rArr.C40_INSERT( _SaveRedline, pSave, rArr.Count() );
pTmpPos = pTmp->End();
@@ -617,7 +615,6 @@ void lcl_SaveRedlines( const SwNodeRange& rRg, _SaveRedlines& rArr )
{
// gesamt verschieben
_SaveRedline* pSave = new _SaveRedline( pTmp, rRg.aStart );
-// rArr.Insert( pSave, rArr.Count() );
rArr.C40_INSERT( _SaveRedline, pSave, rArr.Count() );
}
else
@@ -630,7 +627,6 @@ void lcl_SaveRedlines( const SwNodeRange& rRg, _SaveRedlines& rArr )
pTmpPos->nNode.GetNode().GetCntntNode(), 0 );
_SaveRedline* pSave = new _SaveRedline( pNewRedl, rRg.aStart );
-// rArr.Insert( pSave, rArr.Count() );
rArr.C40_INSERT( _SaveRedline, pSave, rArr.Count() );
pTmpPos = pTmp->Start();
@@ -1046,7 +1042,6 @@ bool SwDoc::MoveRange( SwPaM& rPaM, SwPosition& rPos, SwMoveFlags eMvFlags )
}
bJoin = sal_False;
}
-// else if( !bCorrSavePam && !pSavePam->Move( fnMoveForward, fnGoCntnt ))
else if ( !aSavePam.Move( fnMoveForward, fnGoCntnt ) )
{
aSavePam.GetPoint()->nNode++;
@@ -2529,11 +2524,7 @@ bool SwDoc::DelFullPara( SwPaM& rPam )
if( pTblNd && pNd->IsCntntNode() )
{
SwFrmFmt* pTableFmt = pTblNd->GetTable().GetFrmFmt();
-//JP 24.08.98: will man wirklich den PageDesc/Break vom
-// nachfolgen Absatz ueberbuegeln?
-// const SwAttrSet& rAttrSet = pTableFmt->GetAttrSet();
-// if( SFX_ITEM_SET != rAttrSet.GetItemState( RES_PAGEDESC ) &&
-// SFX_ITEM_SET != rAttrSet.GetItemState( RES_BREAK ))
+
{
const SfxPoolItem *pItem;
const SfxItemSet* pSet = ((SwCntntNode*)pNd)->GetpSwAttrSet();
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index a910305..46cfd0a 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -1299,15 +1299,6 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
// aktuelle Datensatznummer schon vorher einstellen
SwNewDBMgr* pMgr = GetNewDBMgr();
pMgr->CloseAll(FALSE);
-/*
- if(pMgr && pMgr->OpenDB(DBMGR_STD, GetDBDesc(), FALSE))
- {
- if(!pMgr->IsInMerge() )
- pMgr->ToFirstSelectedRecord(DBMGR_STD);
-
- aCalc.VarChange( sDBNumNm, pMgr->GetCurSelectedRecordId(DBMGR_STD));
- }
-*/
String aNew;
const _SetGetExpFldPtr* ppSortLst = pUpdtFlds->GetSortLst()->GetData();
@@ -1316,9 +1307,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
SwSection* pSect = (SwSection*)(*ppSortLst)->GetSection();
if( pSect )
{
- //!SECTION
-// if( pGFld->IsInBodyTxt() )
SwSbxValue aValue = aCalc.Calculate(
pSect->GetCondition() );
if(!aValue.IsVoidValue())
@@ -2140,9 +2129,7 @@ bool SwDoc::SetFieldsDirty( bool b, const SwNode* pChk, ULONG nLen )
const SwTxtNode* pTNd = rNds[ nStt++ ]->GetTxtNode();
if( pTNd )
{
- if( //pTNd->GetFmtColl() && //#outline level,zhaojianwei
- // MAXLEVEL > pTNd->GetTxtColl()->GetOutlineLevel() )
- pTNd->GetAttrOutlineLevel() != 0 )//<-end,zhaojianwei
+ if( pTNd->GetAttrOutlineLevel() != 0 )
// Kapitelfelder aktualisieren
b = TRUE;
else if( pTNd->GetpSwpHints() && pTNd->GetSwpHints().Count() )
@@ -2338,18 +2325,6 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
break;
case RES_SETEXPFLD:
- /// OD 04.10.2002 #102894#
- /// fields of subtype <string> have also been add
- /// for calculation (eGetMode == GETFLD_CALC).
- /// Thus, add fields of subtype <string> in all modes
- /// (eGetMode == GETFLD_EXPAND||GETFLD_CALC||GETFLD_ALL)
- /// and fields of other subtypes only in the modes
- /// (eGetMode == GETFLD_CALC||GETFLD_ALL)
- /* "old" if construct - not deleted for history and code review
- if( ( nsSwGetSetExpType::GSE_STRING & pFld->GetSubType()
- ? GETFLD_EXPAND : GETFLD_CALC )
- & eGetMode )
- */
if ( !(eGetMode == GETFLD_EXPAND) ||
(nsSwGetSetExpType::GSE_STRING & pFld->GetSubType()) )
{
@@ -2662,10 +2637,6 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
pMsgHnt, bUpdateFlds));
}
- // Das gefundene Feld wird angepasst ...
- //pDstFld->ChangeFormat( rSrcFld.GetFormat() );
- //pDstFld->SetLanguage( rSrcFld.GetLanguage() );
-
SwField * pNewFld = rSrcFld.CopyField();
pDstFmtFld->SetFld(pNewFld);
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 4981dd4..f0d97bf 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -246,9 +246,7 @@ BOOL lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
// <--
const SfxPoolItem* pItem;
- // USHORT __READONLY_DATA aSavIds[ 3 ] = { RES_PAGEDESC, RES_BREAK, //#outline level,removed by zhaojianwei
- // RES_PARATR_NUMRULE };
- //for( USHORT n = 0; n < 3; ++n )
+
USHORT __READONLY_DATA aSavIds[ 4 ] = { RES_PAGEDESC, RES_BREAK, //->add by zhaojianwei
RES_PARATR_NUMRULE,
RES_PARATR_OUTLINELEVEL };
@@ -1928,9 +1926,6 @@ SwTxtFmtColl* SwDoc::CopyTxtColl( const SwTxtFmtColl& rColl )
// kopiere jetzt noch die Auto-Formate oder kopiere die Attribute
pNewColl->CopyAttrs( rColl, TRUE );
- // setze noch den Outline-Level
- //if( NO_NUMBERING != rColl.GetOutlineLevel() ) //#outline level,zhaojianwei
- // pNewColl->SetOutlineLevel( rColl.GetOutlineLevel() );
if(rColl.IsAssignedToListLevelOfOutlineStyle())
pNewColl->AssignToListLevelOfOutlineStyle(rColl.GetAssignedOutlineStyleLevel());//<-end,zhaojianwei
//<-end
@@ -2041,13 +2036,9 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
pDest = FindFmtByName( rDestArr, pSrc->GetName() );
pDest->SetAuto( FALSE );
-// pDest->ResetAllAttr();
-// pDest->CopyAttrs( *pSrc, TRUE ); // kopiere Attribute
+
//JP 19.02.96: ist so wohl optimaler - loest ggfs. kein Modify aus!
pDest->DelDiffs( *pSrc );
- // --> OD 2009-03-23 #i94285#
- // copy existing <SwFmtPageDesc> instance, before copying attributes
-// pDest->SetFmtAttr( pSrc->GetAttrSet() ); // kopiere Attribute
//JP 18.08.98: Bug 55115 - copy PageDescAttribute in this case
const SfxPoolItem* pItem;
if( &GetAttrPool() != pSrc->GetAttrSet().GetPool() &&
@@ -2063,7 +2054,6 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
pPageDesc = aPageDescs[ MakePageDesc( rNm ) ];
}
pPageDesc->Add( &aPageDesc );
-// pDest->SetFmtAttr( aPageDesc );
SwAttrSet aTmpAttrSet( pSrc->GetAttrSet() );
aTmpAttrSet.Put( aPageDesc );
pDest->SetFmtAttr( aTmpAttrSet );
@@ -2092,9 +2082,6 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
pDstColl->SetNextTxtFmtColl( *(SwTxtFmtColl*)FindFmtByName(
rDestArr, pSrcColl->GetNextTxtFmtColl().GetName() ) );
- // setze noch den Outline-Level
- //if( NO_NUMBERING != pSrcColl->GetOutlineLevel() ) //#outline level,zhaojianwei
- // pDstColl->SetOutlineLevel( pSrcColl->GetOutlineLevel() );
if(pSrcColl->IsAssignedToListLevelOfOutlineStyle())
pDstColl->AssignToListLevelOfOutlineStyle(pSrcColl->GetAssignedOutlineStyleLevel());//<-end,zhaojianwei
//<-end
@@ -2442,10 +2429,8 @@ void SwDoc::_CreateNumberFormatter()
ASSERT( !pNumberFormatter, "ist doch schon vorhanden" );
- LanguageType eLang = LANGUAGE_SYSTEM; //System::GetLanguage();
-/* ((const SvxLanguageItem&)GetAttrPool().
- GetDefaultItem( RES_CHRATR_LANGUAGE )).GetLanguage();
-*/
+ LanguageType eLang = LANGUAGE_SYSTEM;
+
Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
pNumberFormatter = new SvNumberFormatter( xMSF, eLang );
pNumberFormatter->SetEvalDateFormat( NF_EVALDATEFORMAT_FORMAT_INTL );
@@ -2534,19 +2519,6 @@ void SwDoc::SetFmtItemByAutoFmt( const SwPaM& rPam, const SfxItemSet& rSet )
// in den Node gesetzt werden. Also muss man die Differenz nehmen
SwRedlineExtraData_Format aExtraData( rSet );
-/*
- if( pSet && pTNd->HasSwAttrSet() )
- {
- SfxItemSet aTmp( *pTNd->GetpSwAttrSet() );
- aTmp.Differentiate( *pSet );
- // das Adjust Item behalten wir extra
- const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pTNd->GetpSwAttrSet()->GetItemState(
- RES_PARATR_ADJUST, FALSE, &pItem ))
- aTmp.Put( *pItem );
- aExtraData.SetItemSet( aTmp );
- }
-*/
pRedl->SetExtraData( &aExtraData );
// !!!!!!!!! Undo fehlt noch !!!!!!!!!!!!!!!!!!
@@ -2654,7 +2626,6 @@ namespace docfunc
SwTxtFmtColl* pTxtFmtColl = (*pTxtFmtColls)[i];
if ( pTxtFmtColl->IsDefault() ||
- // pTxtFmtColl->GetOutlineLevel() == NO_NUMBERING ) //#outline level,zhaojianwei
! pTxtFmtColl->IsAssignedToListLevelOfOutlineStyle() ) //<-end,zhaojianwei
{
continue;
diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx
index 9080e14..5991e3d 100644
--- a/sw/source/core/doc/docftn.cxx
+++ b/sw/source/core/doc/docftn.cxx
@@ -423,8 +423,7 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
nSttCnt <= *pTxtFtn->GetStart() ) )
{
const SwFmtFtn& rFtn = pTxtFtn->GetFtn();
- if( /*rFtn.GetNumber() != nNumber ||*/
- rFtn.GetNumStr() != rNumStr ||
+ if( rFtn.GetNumStr() != rNumStr ||
rFtn.IsEndNote() != bIsEndNote )
{
bChg = TRUE;
@@ -455,8 +454,7 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
nEndCnt >= *pTxtFtn->GetStart() ) )
{
const SwFmtFtn& rFtn = pTxtFtn->GetFtn();
- if( /*rFtn.GetNumber() != nNumber ||*/
- rFtn.GetNumStr() != rNumStr ||
+ if( rFtn.GetNumStr() != rNumStr ||
rFtn.IsEndNote() != bIsEndNote )
{
bChg = TRUE;
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index 7c750ae..556be53 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -93,7 +93,6 @@ BOOL SwDoc::GenerateHTMLDoc( const String& rPath,
BYTE nLvl = 1;
const SwTxtFmtColls& rFmtColls =*GetTxtFmtColls();
for( USHORT n = rFmtColls.Count(); n; )
- //if( nLvl == rFmtColls[ --n ]->GetOutlineLevel() )//#outline level,zhaojianwei
if( nLvl == rFmtColls[ --n ]->GetAttrOutlineLevel() -1 )//<-end,zhaojianwei 0814
{
pSplitColl = rFmtColls[ n ];
@@ -129,7 +128,6 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
{
// wenn keine OutlineNumerierung ist, dann benutze eigenes Array
// und sammel die Nodes zusammen.
- //if( NO_NUMBERING == pSplitColl->GetOutlineLevel() )//#outline level,zhaojianwei
if( pSplitColl->GetAttrOutlineLevel() == 0 )//<-end,zhaojianwei, 0814
{
pOutlNds = new SwOutlineNodes( 8, 8 );
@@ -151,7 +149,6 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
// dann suche die Gliederungs - Vorlage, der 1. Ebene
const SwTxtFmtColls& rFmtColls =*GetTxtFmtColls();
for( USHORT n = rFmtColls.Count(); n; )
- //if( !rFmtColls[ --n ]->GetOutlineLevel() )//#outline level,zhaojianwei
if ( rFmtColls[ --n ]->GetAttrOutlineLevel() == 1 )//<-end,zhaojianwei
{
pSplitColl = rFmtColls[ n ];
@@ -171,7 +168,6 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
break;
default:
-// case SPLITDOC_TO_GLOBALDOC:
pFilter = SwIoSystem::GetFilterOfFormat(
String::CreateFromAscii( FILTER_XML ));
eDocType = SPLITDOC_TO_GLOBALDOC;
@@ -231,11 +227,6 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
pNd = pOutlNds->GetObject( nOutl );
SwTxtFmtColl* pTColl = pNd->GetTxtNode()->GetTxtColl();
- //if( ( pTColl == pSplitColl || //#outline level,zhaojianwei
- // ( NO_NUMBERING != pSplitColl->GetOutlineLevel() &&
- // pTColl->GetOutlineLevel() <
- // pSplitColl->GetOutlineLevel() )) &&
- // !pNd->FindTableNode() )
if( ( pTColl == pSplitColl ||
( pSplitColl->GetAttrOutlineLevel() > 0 &&
pTColl->GetAttrOutlineLevel() > 0 &&
@@ -476,7 +467,6 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
}
} while( pSttNd );
-// if( pOutlNds != (SwOutlineNodes*)&GetNodes().GetOutLineNds();
if( pOutlNds != &GetNodes().GetOutLineNds() )
delete pOutlNds;
@@ -494,7 +484,6 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
}
break;
-// case SPLITDOC_TO_GLOBALDOC:
default:
// dann das Globaldoc speichern
set(IDocumentSettingAccess::GLOBAL_DOCUMENT, true);
@@ -532,7 +521,6 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
break;
default:
-// case SPLITDOC_TO_GLOBALDOC:
pFilter = SwIoSystem::GetFilterOfFormat(
String::CreateFromAscii( FILTER_XML ));
eDocType = SPLITDOC_TO_GLOBALDOC;
@@ -670,7 +658,6 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath, int nOutlineLevel )
if( SPLITDOC_TO_HTML == eDocType &&
pDoc->GetSpzFrmFmts()->Count() )
{
- /* SfxViewFrame* pFrame = */
SfxViewFrame::LoadHiddenDocument( *xDocSh, 0 );
}
xDocSh->DoSaveAs( *pTmpMed );
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 3b8c83d..e45b8e0 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -253,18 +253,6 @@ void SwDoc::DelLayoutFmt( SwFrmFmt *pFmt )
SwOLENode* pOLENd = GetNodes()[ pCntIdx->GetIndex()+1 ]->GetOLENode();
if( pOLENd && pOLENd->GetOLEObj().IsOleRef() )
{
- /*
- SwDoc* pDoc = (SwDoc*)pFmt->GetDoc();
- if( pDoc )
- {
- SfxObjectShell* p = pDoc->GetPersist();
- if( p ) // muss da sein
- {
- SvInfoObjectRef aRef( p->Find( pOLENd->GetOLEObj().GetName() ) );
- if( aRef.Is() )
- aRef->SetObj(0);
- }
- } */
// TODO/MBA: the old object closed the object, cleared all references to it, but didn't remove it from the container.
// I have no idea, why, nobody could explain it - so I do my very best to mimic this behavior
@@ -280,7 +268,6 @@ void SwDoc::DelLayoutFmt( SwFrmFmt *pFmt )
}
}
- //pOLENd->GetOLEObj().GetOleRef() = 0;
}
}
@@ -870,15 +857,6 @@ if( DoesUndo() ) // werden erstmal alle Undo - Objecte geloescht.
}
else
{
-/*
- // alle Pams verschieben
- SwPaM* pTmp = (SwPaM*)&rPam;
- do {
- if( pTmp->HasMark() &&
- *pTmp->GetPoint() != *pTmp->GetMark() )
- MoveAndJoin( *pTmp, aPos );
- } while( &rPam != ( pTmp = (SwPaM*)pTmp->GetNext() ) );
-*/
// copy all Pams and then delete all
SwPaM* pTmp = (SwPaM*)&rPam;
BOOL bOldFlag = mbCopyIsMove, bOldUndo = mbUndo;
@@ -1018,26 +996,6 @@ SwDrawFrmFmt* SwDoc::Insert( const SwPaM &rRg,
return pFmt;
}
-/*************************************************************************
-|*
-|* SwDoc::GetAllFlyFmts
-|*
-|* Ersterstellung MA 14. Jul. 93
-|* Letzte Aenderung MD 23. Feb. 95
-|*
-|*************************************************************************/
-/*sal_Bool TstFlyRange( const SwPaM* pPam, sal_uInt32 nFlyPos )
-{
- sal_Bool bOk = sal_False;
- const SwPaM* pTmp = pPam;
- do {
- bOk = pTmp->Start()->nNode.GetIndex() < nFlyPos &&
- pTmp->End()->nNode.GetIndex() > nFlyPos;
- } while( !bOk && pPam != ( pTmp = (const SwPaM*)pTmp->GetNext() ));
- return bOk;
-}
-*/
-
/* -----------------------------04.04.00 10:55--------------------------------
paragraph frames - o.k. if the PaM includes the paragraph from the beginning
to the beginning of the next paragraph at least
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index f7702ac..580af91 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -134,7 +134,6 @@ void SwDoc::PropagateOutlineRule()
{
SwTxtFmtColl *pColl = (*pTxtFmtCollTbl)[n];
- // if (NO_NUMBERING != pColl->GetOutlineLevel())//#outline level,zhaojianwei
if(pColl->IsAssignedToListLevelOfOutlineStyle())//<-end,zhaojianwei
{
SwClientIter aIter(*pColl);
@@ -190,9 +189,6 @@ BOOL SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
for( n = 0; n < pTxtFmtCollTbl->Count(); ++n )
{
- //BYTE nLevel = (*pTxtFmtCollTbl)[ n ]->GetOutlineLevel();//#outline level,zhaojianwei
- //if( nLevel < MAXLEVEL )
- // aCollArr[ nLevel ] = (*pTxtFmtCollTbl)[ n ];
if((*pTxtFmtCollTbl)[ n ]->IsAssignedToListLevelOfOutlineStyle())
{
const int nLevel = (*pTxtFmtCollTbl)[ n ]->GetAssignedOutlineStyleLevel();
@@ -220,7 +216,6 @@ BOOL SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
SwTxtFmtColl *aTmpColl =
GetTxtCollFromPool(static_cast<sal_uInt16>(RES_POOLCOLL_HEADLINE1 + n));
- //if (aTmpColl->GetOutlineLevel() == n)//#outline level,zhaojianwei
if( aTmpColl->IsAssignedToListLevelOfOutlineStyle() &&
aTmpColl->GetAssignedOutlineStyleLevel() == n )//<-end,zhaojianwei
{
@@ -330,9 +325,7 @@ BOOL SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
{
SwTxtNode* pTxtNd = rOutlNds[ n ]->GetTxtNode();
SwTxtFmtColl* pColl = pTxtNd->GetTxtColl();
-// int nLevel = pColl->GetOutlineLevel();//#outline level,zhaojianwei
-// if (aMoveArr[nLevel] == -1)
-// bMoveApplicable = false;
+
if( pColl->IsAssignedToListLevelOfOutlineStyle() )
{
const int nLevel = pColl->GetAssignedOutlineStyleLevel();
@@ -372,9 +365,7 @@ BOOL SwDoc::OutlineUpDown( const SwPaM& rPam, short nOffset )
if( pColl->IsAssignedToListLevelOfOutlineStyle() )
{
- // ASSERT(pColl->GetOutlineLevel() < MAXLEVEL, //#outline level,removed by zhaojianwei
- // "non outline node in outline nodes?");
- //int nLevel = pColl->GetOutlineLevel();
+
const int nLevel = pColl->GetAssignedOutlineStyleLevel();//#outline level,add by zhaojianwei
ASSERT(aMoveArr[nLevel] >= 0,
@@ -425,11 +416,9 @@ BOOL SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
USHORT nAktPos = 0;
SwNodeIndex aSttRg( rStt.nNode ), aEndRg( rEnd.nNode );
- //BYTE nOutLineLevel = NO_NUMBERING; //#outline level,zhaojianwei
int nOutLineLevel = MAXLEVEL; //<-end,zhaojianwei
SwNode* pSrch = &aSttRg.GetNode();
- //if( pSrch->IsTxtNode() ) //#outline level,zhaojianwei
- // nOutLineLevel = static_cast<BYTE>(((SwTxtNode*)pSrch)->GetOutlineLevel());
+
if( pSrch->IsTxtNode())
nOutLineLevel = static_cast<BYTE>(((SwTxtNode*)pSrch)->GetAttrOutlineLevel()-1);//<-end,zhaojianwei
SwNode* pEndSrch = &aEndRg.GetNode();
@@ -453,7 +442,6 @@ BOOL SwDoc::MoveOutlinePara( const SwPaM& rPam, short nOffset )
if( GetNodes().GetOutLineNds().Seek_Entry( pEndSrch, &nTmpPos ) )
{
if( !pEndSrch->IsTxtNode() || pEndSrch == pSrch ||
- //nOutLineLevel < ((SwTxtNode*)pEndSrch)->GetOutlineLevel() )//#outline level,zhaojianwei
nOutLineLevel < ((SwTxtNode*)pEndSrch)->GetAttrOutlineLevel()-1 )//<-end,zhaojianwei
++nTmpPos; // For sub outlines only!
}
@@ -642,16 +630,12 @@ USHORT lcl_FindOutlineNum( const SwNodes& rNds, String& rName )
for( ; nPos < rOutlNds.Count(); ++nPos )
{
pNd = rOutlNds[ nPos ]->GetTxtNode();
- //BYTE nLvl = pNd->GetTxtColl()->GetOutlineLevel(); //#outline level,zhaojianwei
const int nLvl = pNd->GetAttrOutlineLevel()-1; //<-end,zhaojianwei
if( nLvl == nLevel - 1)
{
- // check for the outline num
- // --> OD 2005-11-02 #i51089 - TUNING#
- // --> OD 2006-09-22 #i68289#
+ // #i51089#, #i68289#
// Assure, that text node has the correct numbering level. Otherwise,
// its number vector will not fit to the searched level.
-// if ( pNd->GetNum() )
if ( pNd->GetNum() &&
pNd->GetActualListLevel() == ( nLevel - 1 ) )
// <--
@@ -763,84 +747,6 @@ BOOL SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const
return FALSE;
}
-// --- Nummerierung -----------------------------------------
-
-// --> OD 2008-02-19 #refactorlists#
-//void SwNumRuleInfo::MakeList( SwDoc& rDoc, BOOL )
-//{
-// SwNumRule* pRule = rDoc.FindNumRulePtr(rName);
-
-// // no rule, no fun.
-// if ( !pRule )
-// return;
-
-// //
-// // 1. Case: Information already available at pRule:
-// //
-// if (pRule->GetTxtNodeList())
-// {
-// // copy list to own pList pointer:
-// aList = *pRule->GetTxtNodeList();
-// return;
-// }
-
-// //
-// // 2. Case: Information has to be generated from scratch:
-// //
-
-// if (pRule->IsOutlineRule())
-// {
-// const SwOutlineNodes & rOutlineNodes = rDoc.GetNodes().GetOutLineNds();
-
-// for (USHORT i = 0; i < rOutlineNodes.Count(); ++i)
-// {
-// SwTxtNode & aNode = *((SwTxtNode *) rOutlineNodes[i]);
-
-// if (pRule == aNode.GetNumRule())
-// AddNode(aNode);
-// }
-// }
-// {
-// SwModify* pMod;
-// const SfxPoolItem* pItem;
-// USHORT i, nMaxItems = rDoc.GetAttrPool().GetItemCount
-// ( RES_PARATR_NUMRULE);
-// for( i = 0; i < nMaxItems; ++i )
-// {
-// pItem = rDoc.GetAttrPool().GetItem( RES_PARATR_NUMRULE, i );
-// if( 0 != pItem)
-// {
-// pMod = (SwModify*)((SwNumRuleItem*)pItem)->GetDefinedIn();
-// if (0 != pMod &&
-// ((SwNumRuleItem*)pItem)->GetValue().Len() &&
-// ((SwNumRuleItem*)pItem)->GetValue() == rName )
-// {
-// if( pMod->IsA( TYPE( SwFmt )) )
-// pMod->GetInfo( *this );
-// else
-// {
-// SwTxtNode* pModTxtNode = (SwTxtNode*)pMod;
-
-// // #115901#
-// if( pModTxtNode->GetNodes().IsDocNodes())
-// {
-// AddNode( *pModTxtNode );
-// }
-// }
-// }
-// }
-// }
-// }
-
-// // --> FME 2004-11-03 #i36571# The numrule and this info structure should
-// // have different instances of the list:
-// // --> OD 2006-09-12 #i69145#
-// // method <SwNumRule::SetList(..)> copies content of list provided by the parameter
-// pRule->SetTxtNodeList( aList );
-// // <--
-//}
-// <--
-
void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
{
SwNumRule* pOld = rDoc.FindNumRulePtr( rRule.GetName() );
@@ -869,8 +775,6 @@ void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
pOld->CheckCharFmts( &rDoc );
pOld->SetContinusNum( rRule.IsContinusNum() );
- // Do NOT change list style type
-// pOld->SetRuleType( rRule.GetRuleType() );
if ( bInvalidateNumRule )
{
pOld->SetInvalidRule(TRUE);
@@ -879,24 +783,6 @@ void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
return ;
}
-// SwNumRuleInfo* pUpd = new SwNumRuleInfo( rRule.GetName() );
-// pUpd->MakeList( rDoc );
-
-// BYTE nLvl;
-// for( ULONG nFirst = 0, nLast = pUpd->GetList().Count();
-// nFirst < nLast; ++nFirst )
-// {
-// SwTxtNode* pTxtNd = pUpd->GetList().GetObject( nFirst );
-// nLvl = static_cast<BYTE>(pTxtNd->GetLevel());
-
-// if( nLvl < MAXLEVEL )
-// {
-// if( nChgFmtLevel & ( 1 << nLvl ))
-// {
-// pTxtNd->NumRuleChgd();
-// }
-// }
-// }
SwNumRule::tTxtNodeList aTxtNodeList;
pOld->GetTxtNodeList( aTxtNodeList );
BYTE nLvl( 0 );
@@ -922,10 +808,6 @@ void lcl_ChgNumRule( SwDoc& rDoc, const SwNumRule& rRule )
pOld->CheckCharFmts( &rDoc );
pOld->SetInvalidRule(TRUE);
pOld->SetContinusNum( rRule.IsContinusNum() );
- // Do NOT change list style type
-// pOld->SetRuleType( rRule.GetRuleType() );
-
-// delete pUpd;
rDoc.UpdateNumRule();
}
@@ -1060,16 +942,7 @@ void SwDoc::SetNumRule( const SwPaM& rPam,
void SwDoc::SetCounted(const SwPaM & rPam, bool bCounted)
{
-// ULONG nStartPos = rPam.Start()->nNode.GetIndex();
-// ULONG nEndPos = rPam.End()->nNode.GetIndex();
-// for (ULONG n = nStartPos; n <= nEndPos; n++)
-// {
-// SwTxtNode * pNd = GetNodes()[n]->GetTxtNode();
-
-// if (pNd)
-// pNd->SetCountedInList(bCounted);
-// }
if ( bCounted )
{
SvUShortsSort aResetAttrsArray;
@@ -1083,30 +956,6 @@ void SwDoc::SetCounted(const SwPaM & rPam, bool bCounted)
}
}
-//void SwDoc::ReplaceNumRule(const SwPaM & rPaM, const SwNumRule & rNumRule)
-//{
-// if (DoesUndo())
-// StartUndo(UNDO_START, NULL);
-
-// ULONG nStt = rPaM.Start()->nNode.GetIndex();
-// ULONG nEnd = rPaM.End()->nNode.GetIndex();
-
-// for (ULONG n = nStt; n <= nEnd; n++)
-// {
-// SwTxtNode * pCNd = GetNodes()[n]->GetTxtNode();
-
-// if (pCNd && NULL != pCNd->GetNumRule())
-// {
-// SwPaM aPam(*pCNd);
-
-// InsertPoolItem(aPam, SwNumRuleItem(rNumRule.GetName()), 0);
-// }
-// }
-
-// if (DoesUndo())
-// EndUndo(UNDO_START, NULL);
-//}
-
void SwDoc::SetNumRuleStart( const SwPosition& rPos, BOOL bFlag )
{
SwTxtNode* pTxtNd = rPos.nNode.GetNode().GetTxtNode();
@@ -1135,18 +984,6 @@ void SwDoc::SetNodeNumStart( const SwPosition& rPos, USHORT nStt )
if (pTxtNd)
{
-// const SwNumRule* pRule = pTxtNd->GetNumRule();
-// if( pRule && nStt != pTxtNd->GetListRestartValue() )
-// {
-// if( DoesUndo() )
-// {
-// ClearRedo();
-// AppendUndo( new SwUndoNumRuleStart( rPos, nStt ));
-// }
-// }
-// pTxtNd->SetListRestartValue(nStt);
-
-// SetModified();
if ( !pTxtNd->HasAttrListRestartValue() ||
pTxtNd->GetAttrListRestartValue() != nStt )
{
@@ -1260,19 +1097,13 @@ sal_Bool SwDoc::RenameNumRule(const String & rOldName, const String & rNewName,
AppendUndo(pUndo);
}
-// SwNumRuleInfo aInfo(rOldName);
-// aInfo.MakeList(*this);
SwNumRule::tTxtNodeList aTxtNodeList;
pNumRule->GetTxtNodeList( aTxtNodeList );
pNumRule->SetName( rNewName, *this );
SwNumRuleItem aItem(rNewName);
-// for (ULONG nI = 0; nI < aInfo.GetList().Count(); ++nI)
-// {
-// SwTxtNode * pTxtNd = aInfo.GetList().GetObject(nI);
-// pTxtNd->SwCntntNode::SetAttr(aItem);
-// }
+
for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin();
aIter != aTxtNodeList.end(); ++aIter )
{
@@ -1294,19 +1125,6 @@ void SwDoc::StopNumRuleAnimations( OutputDevice* pOut )
{
for( USHORT n = GetNumRuleTbl().Count(); n; )
{
-// SwNumRuleInfo aUpd( GetNumRuleTbl()[ --n ]->GetName() );
-// aUpd.MakeList( *this );
-
-// for( ULONG nFirst = 0, nLast = aUpd.GetList().Count();
-// nFirst < nLast; ++nFirst )
-// {
-// SwTxtNode* pTNd = aUpd.GetList().GetObject( nFirst );
-// SwClientIter aIter( *pTNd );
-// for( SwFrm* pFrm = (SwFrm*)aIter.First( TYPE(SwFrm) );
-// pFrm; pFrm = (SwFrm*)aIter.Next() )
-// if( ((SwTxtFrm*)pFrm)->HasAnimation() )
-// ((SwTxtFrm*)pFrm)->StopAnimation( pOut );
-// }
SwNumRule::tTxtNodeList aTxtNodeList;
GetNumRuleTbl()[ --n ]->GetTxtNodeList( aTxtNodeList );
for ( SwNumRule::tTxtNodeList::iterator aTxtNodeIter = aTxtNodeList.begin();
@@ -1338,47 +1156,10 @@ BOOL SwDoc::ReplaceNumRule( const SwPosition& rPos,
AppendUndo( pUndo = new SwUndoInsNum( rPos, *pNewRule, rOldRule ) );
}
- // apply new list style <pNewRule> to all text nodes, which have the
- // old list style <pOldNRule> applied and belong to the same list as
- // the text node of the given <SwPosition>.
-// SwNumRuleInfo aUpd( rOldRule );
-// aUpd.MakeList( *this );
-
-// if (aUpd.GetList().Count() > 0) // #106897#
SwNumRule::tTxtNodeList aTxtNodeList;
pOldRule->GetTxtNodeList( aTxtNodeList );
if ( aTxtNodeList.size() > 0 )
{
-// // Position suchen und bestimme ob ein Node davor oder dahinter
-// // einen Start erzwingt
-// SwTxtNode* pTxtNd;
-// ULONG nFndPos, nFirst, nLast;
-
-// if( TABLE_ENTRY_NOTFOUND != aUpd.GetList().SearchKey(
-// rPos.nNode.GetIndex(), &nFndPos ))
-// ++nFndPos;
-
-// for( nLast = nFndPos; nLast < aUpd.GetList().Count(); ++nLast )
-// {
-// pTxtNd = aUpd.GetList().GetObject( nLast );
-// if(pTxtNd->IsRestart())
-// break;
-// }
-// for( nFirst = nFndPos; nFirst; )
-// {
-// pTxtNd = aUpd.GetList().GetObject( --nFirst );
-// if( pTxtNd->IsRestart() )
-// break;
-// }
-// // dann neue Numerierung ueber diesen Bereich
-// // definieren und den Start am Anfang/Ende zurueck setzen
-// pTxtNd = aUpd.GetList().GetObject( nFirst );
-// if( pTxtNd->IsRestart() )
-// {
-// pTxtNd->SetRestart(false);
-// if( pUndo )
-// pUndo->SetSttNum( pTxtNd->GetIndex() );
-// }
SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : 0 );
USHORT nChgFmtLevel = 0;
@@ -1394,15 +1175,7 @@ BOOL SwDoc::ReplaceNumRule( const SwPosition& rPos,
const SwTxtNode* pGivenTxtNode = rPos.nNode.GetNode().GetTxtNode();
SwNumRuleItem aRule( rNewRule );
-// for( ; nFirst < nLast; ++nFirst )
-// {
-// pTxtNd = aUpd.GetList().GetObject( nFirst );
-// aRegH.RegisterInModify( pTxtNd, *pTxtNd );
-
-// pTxtNd->SwCntntNode::SetAttr( aRule );
-// pTxtNd->NumRuleChgd();
-// }
for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin();
aIter != aTxtNodeList.end(); ++aIter )
{
@@ -1447,7 +1220,6 @@ void SwDoc::MakeUniqueNumRules(const SwPaM & rPaM)
{
ASSERT( rPaM.GetDoc() == this, "need same doc" );
-// map<SwNumRule *, SwNumRule *> aMyNumRuleMap;
::std::map<SwNumRule *, ListStyleData> aMyNumRuleMap;
ULONG nStt = rPaM.Start()->nNode.GetIndex();
@@ -1465,10 +1237,8 @@ void SwDoc::MakeUniqueNumRules(const SwPaM & rPaM)
if (pRule && pRule->IsAutoRule() && ! pRule->IsOutlineRule())
{
-// SwNumRule * pReplaceNumRule = aMyNumRuleMap[pRule];
ListStyleData aListStyleData = aMyNumRuleMap[pRule];
-// if (! pReplaceNumRule)
if ( aListStyleData.pReplaceNumRule == 0 )
{
if (bFirst)
@@ -1481,11 +1251,8 @@ void SwDoc::MakeUniqueNumRules(const SwPaM & rPaM)
aListStyleData.sListId, true ));
}
-// if (! pReplaceNumRule)
if ( aListStyleData.pReplaceNumRule == 0 )
{
-// pReplaceNumRule = new SwNumRule(*pRule);
-// pReplaceNumRule->SetName(GetUniqueNumRuleName());
aListStyleData.pReplaceNumRule = new SwNumRule(*pRule);
aListStyleData.pReplaceNumRule->SetName(
@@ -1494,7 +1261,6 @@ void SwDoc::MakeUniqueNumRules(const SwPaM & rPaM)
aListStyleData.bCreateNewList = true;
}
-// aMyNumRuleMap[pRule] = pReplaceNumRule;
aMyNumRuleMap[pRule] = aListStyleData;
}
@@ -1591,8 +1357,7 @@ void SwDoc::DelNumRules( const SwPaM& rPam )
if( RES_CONDTXTFMTCOLL == pTNd->GetFmtColl()->Which() )
pTNd->ChkCondColl();
- //else if( !pOutlNd && NO_NUMBERING != //#outline level,zhaojianwei
- // ((SwTxtFmtColl*)pTNd->GetFmtColl())->GetOutlineLevel() )
+
else if( !pOutlNd &&
((SwTxtFmtColl*)pTNd->GetFmtColl())->IsAssignedToListLevelOfOutlineStyle() )//<-end,zhaojianwei
pOutlNd = pTNd;
@@ -2355,7 +2120,6 @@ SwNumRule* SwDoc::GetCurrNumRule( const SwPosition& rPos ) const
if( pTNd )
{
-// pTNd->SyncNumberAndNumRule();
pRet = pTNd->GetNumRule();
}
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 0e76081..a1ff8e2 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -703,7 +703,6 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
case POS_COLLIDE_START:
case POS_COLLIDE_END:
if( pRedl->IsOwnRedline( *pNewRedl ) &&
-// 1 == pRedl->GetStackCount() &&
pRedl->CanCombine( *pNewRedl ) )
{
if( IsHideChanges( eRedlineMode ))
@@ -1024,8 +1023,6 @@ bool SwDoc::AppendRedline( SwRedline* pNewRedl, bool bCallDelete )
// insert the pNew part (if it exists)
if( pNew )
{
- // AppendRedline( pNew, bCallDelete );
- //sal_Bool bRet =
pRedlineTbl->Insert( pNew );
// pNew must be deleted if Insert() wasn't
@@ -3731,8 +3728,6 @@ BOOL SwRedline::CanCombine( const SwRedline& rRedl ) const
void SwRedline::PushData( const SwRedline& rRedl, BOOL bOwnAsNext )
{
-// SwRedlineData* pNew = new SwRedlineData( rRedl.GetType(),
-// rRedl.GetAuthor() );
SwRedlineData* pNew = new SwRedlineData( *rRedl.pRedlineData, FALSE );
if( bOwnAsNext )
{
diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx
index 866942b..a2b6cb3 100644
--- a/sw/source/core/doc/docruby.cxx
+++ b/sw/source/core/doc/docruby.cxx
@@ -298,28 +298,7 @@ BOOL SwDoc::_SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry, USHORT )
case UnicodeType::OTHER_LETTER:
bChkNxtWrd = TRUE;
- // no break!
-// case UnicodeType::UNASSIGNED:
-// case UnicodeType::MODIFIER_LETTER:
-// case UnicodeType::NON_SPACING_MARK:
-// case UnicodeType::ENCLOSING_MARK:
-// case UnicodeType::COMBINING_SPACING_MARK:
-// case UnicodeType::LETTER_NUMBER:
-// case UnicodeType::OTHER_NUMBER:
-// case UnicodeType::LINE_SEPARATOR:
-// case UnicodeType::PARAGRAPH_SEPARATOR:
-// case UnicodeType::FORMAT:
-// case UnicodeType::SURROGATE:
-// case UnicodeType::DASH_PUNCTUATION:
-// case UnicodeType::CONNECTOR_PUNCTUATION:
-///*?? */case UnicodeType::OTHER_PUNCTUATION:
-//--> char '!' is to ignore!
-// case UnicodeType::MATH_SYMBOL:
-// case UnicodeType::CURRENCY_SYMBOL:
-// case UnicodeType::MODIFIER_SYMBOL:
-// case UnicodeType::OTHER_SYMBOL:
-// case UnicodeType::INITIAL_PUNCTUATION:
-// case UnicodeType::FINAL_PUNCTUATION:
+
default:
bIsAlphaNum = FALSE;
break;
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 75af535..8f32b0c 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -94,8 +94,6 @@ void SwSortElement::Init( SwDoc* pD, const SwSortOptions& rOpt,
pSortCollator = new CollatorWrapper(
::comphelper::getProcessServiceFactory() );
-// pSortCollator->loadCollatorAlgorithm( sAlgorithm, aLocale,
-// rOpt.bIgnoreCase ? SW_COLLATOR_IGNORES : 0 );
}
void SwSortElement::Finit()
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index fb257de..df298c3 100644
--- a/sw/source/core/doc/doctxm.cxx
+++ b/sw/source/core/doc/doctxm.cxx
@@ -1361,11 +1361,8 @@ void SwTOXBaseSection::UpdateAuthorities( const SwTOXInternational& rIntl )
const SwTxtNode& rTxtNode = pTxtFld->GetTxtNode();
::SetProgressState( 0, pDoc->GetDocShell() );
-// const SwTxtNode* pChapterCompareNode = 0;
-
if( rTxtNode.GetTxt().Len() && rTxtNode.GetFrm() &&
- rTxtNode.GetNodes().IsDocNodes() /*&&
- (!IsFromChapter() || pChapterCompareNode == pOwnChapterNode) */)
+ rTxtNode.GetNodes().IsDocNodes() )
{
//#106485# the body node has to be used!
SwCntntFrm *pFrm = rTxtNode.GetFrm();
@@ -1509,9 +1506,6 @@ void SwTOXBaseSection::UpdateCntnt( SwTOXElement eMyType,
MAXLEVEL - 1 );
if( pOutlNd )
{
- //USHORT nTmp = pOutlNd->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
- //if( nTmp < NO_NUMBERING )
- // nSetLevel = nTmp + 1;
if( pOutlNd->GetTxtColl()->IsAssignedToListLevelOfOutlineStyle())
nSetLevel = pOutlNd->GetTxtColl()->GetAttrOutlineLevel() ;//<-end,zhaojianwei
}
@@ -1567,9 +1561,6 @@ void SwTOXBaseSection::UpdateTable( const SwTxtNode* pOwnChapterNode )
::lcl_FindChapterNode( *pCNd, MAXLEVEL - 1 );
if( pOutlNd )
{
- //USHORT nTmp = pOutlNd->GetTxtColl()->GetOutlineLevel();//#outline level,zhaojianwei
- //if( nTmp < NO_NUMBERING )
- // pNew->SetLevel( nTmp + 1 );
if( pOutlNd->GetTxtColl()->IsAssignedToListLevelOfOutlineStyle())
{
const int nTmp = pOutlNd->GetTxtColl()->GetAttrOutlineLevel();
@@ -1769,9 +1760,6 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
aInsStr += cEndPageNum;
rTxt.Append( aInsStr );
}
-// // Tab entfernen, wenn keine Seitennummer
-// else if( rTxt.Len() && '\t' == rTxt.GetChar( rTxt.Len() - 1 ))
-// rTxt.Erase( rTxt.Len()-1, 1 );
}
break;
@@ -1783,8 +1771,6 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
pTOXSource = &rBase.aTOXSources[0];
// --> OD 2008-02-14 #i53420#
-// if( pTOXSource && pTOXSource->pNd
-// pTOXSource->pNd->IsTxtNode() )
if ( pTOXSource && pTOXSource->pNd &&
pTOXSource->pNd->IsCntntNode() )
// <--
@@ -1796,7 +1782,6 @@ void SwTOXBaseSection::GenerateText( USHORT nArrayIdx,
SwChapterField aFld( &aFldTyp, aToken.nChapterFormat );
aFld.SetLevel( static_cast<BYTE>(aToken.nOutlineLevel - 1) );
// --> OD 2008-02-14 #i53420#
-// aFld.ChangeExpansion( pFrm, (SwTxtNode*)pTOXSource->pNd, TRUE );
aFld.ChangeExpansion( pFrm,
dynamic_cast<const SwCntntNode*>(pTOXSource->pNd),
TRUE );
diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx
index 6ec851c..da6482d 100644
--- a/sw/source/core/doc/fmtcol.cxx
+++ b/sw/source/core/doc/fmtcol.cxx
@@ -77,7 +77,6 @@ namespace TxtFmtCollFunc
}
// --> OD 2007-01-24 #i73790#
- // if ( pTxtFmtColl->AssignedToListLevelOfOutlineStyle() )
if ( !pTxtFmtColl->StayAssignedToListLevelOfOutlineStyle() &&
pTxtFmtColl->IsAssignedToListLevelOfOutlineStyle() )
// <--
diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx
index 8c34485..f446307 100644
--- a/sw/source/core/doc/list.cxx
+++ b/sw/source/core/doc/list.cxx
@@ -290,17 +290,4 @@ bool SwList::IsListLevelMarked( const int nListLevel ) const
return mpListImpl->IsListLevelMarked( nListLevel );
}
-//void SwList::ContinueList( SwList& rList )
-//{
-// mpListImpl->ContinueList( rList );
-//}
-//const SwList* SwList::GetContinuedList() const
-//{
-// return mpListImpl->GetContinuedList();
-//}
-//void SwList::ClearContinuation()
-//{
-// mpListImpl->ClearContinuation();
-//}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index 6c3256e..5aeb117 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -253,31 +253,6 @@ BOOL SwNumFmt::IsEnumeration() const
// using this code. Therefore HBRINKM and I agreed upon defining
// IsEnumeration() as !IsItemize()
return !IsItemize();
- // <--
-
- /*
- BOOL bResult;
-
- switch(GetNumberingType())
- {
- case SVX_NUM_CHARS_UPPER_LETTER:
- case SVX_NUM_CHARS_LOWER_LETTER:
- case SVX_NUM_ROMAN_UPPER:
- case SVX_NUM_ROMAN_LOWER:
- case SVX_NUM_ARABIC:
- case SVX_NUM_PAGEDESC:
- case SVX_NUM_CHARS_UPPER_LETTER_N:
- case SVX_NUM_CHARS_LOWER_LETTER_N:
- bResult = TRUE;
-
- break;
-
- default:
- bResult = FALSE;
- }
-
- return bResult;
- */
}
@@ -387,33 +362,6 @@ void SwNumFmt::UpdateNumNodes( SwDoc* pDoc )
for( BYTE i = 0; i < MAXLEVEL; ++i )
if( pRule->GetNumFmt( i ) == this )
{
- // --> OD 2008-02-19 #refactorlists#
-// const String& rRuleNm = pRule->GetName();
-
-// SwModify* pMod;
-// const SfxPoolItem* pItem;
-// USHORT k, nMaxItems = pDoc->GetAttrPool().GetItemCount(
-// RES_PARATR_NUMRULE );
-// for( k = 0; k < nMaxItems; ++k )
-// if( 0 != (pItem = pDoc->GetAttrPool().GetItem(
-// RES_PARATR_NUMRULE, k ) ) &&
-// 0 != ( pMod = (SwModify*)((SwNumRuleItem*)pItem)->
-// GetDefinedIn()) &&
-// ((SwNumRuleItem*)pItem)->GetValue() == rRuleNm )
-// {
-// if( pMod->IsA( TYPE( SwFmt )) )
-// {
-// SwNumRuleInfo aInfo( rRuleNm );
-// pMod->GetInfo( aInfo );
-
-// for( ULONG nFirst = 0, nLast = aInfo.GetList().Count();
-// nFirst < nLast; ++nFirst )
-// lcl_SetRuleChgd(
-// *aInfo.GetList().GetObject( nFirst ), i );
-// }
-// else if( ((SwTxtNode*)pMod)->GetNodes().IsDocNodes() )
-// lcl_SetRuleChgd( *(SwTxtNode*)pMod, i );
-// }
SwNumRule::tTxtNodeList aTxtNodeList;
pRule->GetTxtNodeList( aTxtNodeList );
for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin();
@@ -737,8 +685,7 @@ String SwNumRule::MakeNumString( const SwNumberTree::tNumberVector & rNumVector,
if (nLevel < MAXLEVEL)
{
const SwNumFmt& rMyNFmt = Get( static_cast<USHORT>(nLevel) );
- // - levels with numbering none has to provide prefix and suffix string
-// if( SVX_NUM_NUMBER_NONE != rMyNFmt.GetNumberingType() )
+
{
BYTE i = static_cast<BYTE>(nLevel);
@@ -916,16 +863,12 @@ void SwNumRule::SetInvalidRule(BOOL bFlag)
{
if (bFlag)
{
-// tPamAndNums::iterator aIt;
-// for (aIt = aNumberRanges.begin(); aIt != aNumberRanges.end(); aIt++)
-// (*aIt).second->InvalidateTree();
std::set< SwList* > aLists;
tTxtNodeList::iterator aIter;
for ( aIter = maTxtNodeList.begin(); aIter != maTxtNodeList.end(); ++aIter )
{
const SwTxtNode* pTxtNode = *aIter;
// --> OD 2010-06-04 #i111681# - applying patch from cmc
-// aLists.insert( pTxtNode->GetDoc()->getListByName( pTxtNode->GetListId() ) );
SwList* pList = pTxtNode->GetDoc()->getListByName( pTxtNode->GetListId() );
ASSERT( pList, "<SwNumRule::SetInvalidRule(..)> - list at which the text node is registered at does not exist. This is a serious issue --> please inform OD.");
if ( pList )
@@ -942,71 +885,6 @@ void SwNumRule::SetInvalidRule(BOOL bFlag)
bInvalidRuleFlag = bFlag;
}
-// --> OD 2008-06-16 #i90078#
-// #i23725#, #i23726#
-//void SwNumRule::Indent(short nAmount, int nLevel, int nReferenceLevel,
-// BOOL bRelative, BOOL bFirstLine, BOOL bCheckGtZero)
-//{
-// int nStartLevel = 0;
-// int nEndLevel = MAXLEVEL - 1;
-// BOOL bGotInvalid = FALSE;
-
-// if (nLevel >= 0)
-// nStartLevel = nEndLevel = nLevel;
-
-// int i;
-// short nRealAmount = nAmount;
-
-// if (! bRelative)
-// {
-// if (bFirstLine)
-// {
-// if (nReferenceLevel >= 0)
-// nAmount = nAmount - Get(static_cast<USHORT>(nReferenceLevel)).GetFirstLineOffset();
-// else
-// nAmount = nAmount - Get(static_cast<USHORT>(nStartLevel)).GetFirstLineOffset();
-// }
-
-// BOOL bFirst = TRUE;
-
-// if (nReferenceLevel >= 0)
-// nRealAmount = nAmount - Get(static_cast<USHORT>(nReferenceLevel)).GetAbsLSpace();
-// else
-// for (i = nStartLevel; i < nEndLevel + 1; i++)
-// {
-// short nTmp = nAmount - Get(static_cast<USHORT>(i)).GetAbsLSpace();
-
-// if (bFirst || nTmp > nRealAmount)
-// {
-// nRealAmount = nTmp;
-// bFirst = FALSE;
-// }
-// }
-// }
-
-// if (nRealAmount < 0)
-// for (i = nStartLevel; i < nEndLevel + 1; i++)
-// if (Get(static_cast<USHORT>(i)).GetAbsLSpace() + nRealAmount < 0)
-// nRealAmount = -Get(static_cast<USHORT>(i)).GetAbsLSpace();
-
-// for (i = nStartLevel; i < nEndLevel + 1; i++)
-// {
-// short nNew = Get(static_cast<USHORT>(i)).GetAbsLSpace() + nRealAmount;
-
-// if (bCheckGtZero && nNew < 0)
-// nNew = 0;
-
-// SwNumFmt aTmpNumFmt(Get(static_cast<USHORT>(i)));
-// aTmpNumFmt.SetAbsLSpace(nNew);
-
-// Set(static_cast<USHORT>(i), aTmpNumFmt);
-
-// bGotInvalid = TRUE;
-// }
-
-// if (bGotInvalid)
-// SetInvalidRule(bGotInvalid);
-//}
// change indent of all list levels by given difference
void SwNumRule::ChangeIndent( const short nDiff )
@@ -1104,9 +982,6 @@ void SwNumRule::SetIndentOfFirstListLevelAndChangeOthers( const short nNewIndent
void SwNumRule::Validate()
{
-// tPamAndNums::iterator aIt;
-// for (aIt = aNumberRanges.begin(); aIt != aNumberRanges.end(); aIt++)
-// (*aIt).second->NotifyInvalidChildren();
std::set< SwList* > aLists;
tTxtNodeList::iterator aIter;
for ( aIter = maTxtNodeList.begin(); aIter != maTxtNodeList.end(); ++aIter )
@@ -1287,25 +1162,12 @@ namespace numfunc
void SwDefBulletConfig::SetToDefault()
{
- // default bullet font name is now OpenSymbol
-// msFontname = String::CreateFromAscii("StarSymbol");
msFontname = String::CreateFromAscii("OpenSymbol");
mbUserDefinedFontname = false;
// <--
meFontWeight = WEIGHT_DONTKNOW;
meFontItalic = ITALIC_NONE;
- // new bullet characters
-// mnLevelChars[0] = 0x25cf;
-// mnLevelChars[1] = 0x25cb;
-// mnLevelChars[2] = 0x25a0;
-// mnLevelChars[3] = 0x25cf;
-// mnLevelChars[4] = 0x25cb;
-// mnLevelChars[5] = 0x25a0;
-// mnLevelChars[6] = 0x25cf;
-// mnLevelChars[7] = 0x25cb;
-// mnLevelChars[8] = 0x25a0;
-// mnLevelChars[9] = 0x25cf;
mnLevelChars[0] = 0x2022;
mnLevelChars[1] = 0x25e6;
mnLevelChars[2] = 0x25aa;
diff --git a/sw/source/core/doc/poolfmt.cxx b/sw/source/core/doc/poolfmt.cxx
index 7746482..1b77c25 100644
--- a/sw/source/core/doc/poolfmt.cxx
+++ b/sw/source/core/doc/poolfmt.cxx
@@ -225,7 +225,6 @@ void lcl_SetHeadline( SwDoc* pDoc, SwTxtFmtColl* pColl,
{
if( !( nOutLvlBits & ( 1 << nLevel )) )
{
- //pColl->SetOutlineLevel( nLevel ); //#outline level zhaojianwei
pColl->AssignToListLevelOfOutlineStyle(nLevel);//<-end,zhaojianwei
if( !bHTMLMode )
{
@@ -337,8 +336,7 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
{
return pNewColl;
}
- //if( pNewColl->GetOutlineLevel() < MAXLEVEL ) //#outline level,zhaojianwei
- //nOutLvlBits |= ( 1 << pNewColl->GetOutlineLevel() );
+
if( pNewColl->IsAssignedToListLevelOfOutlineStyle())
nOutLvlBits |= ( 1 << pNewColl->GetAssignedOutlineStyleLevel() );//<-end,zhaojianwei
}
@@ -970,7 +968,6 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
aLR.SetLeft( GetMetricVal( CM_1 ));
aLR.SetRight( GetMetricVal( CM_1 ));
aSet.Put( aLR );
-// aSet.Put( SvxAdjustItem( SVX_ADJUST_BLOCK, RES_PARATR_ADJUST ) );
SvxULSpaceItem aUL( RES_UL_SPACE );
aUL = pNewColl->GetULSpace();
aUL.SetLower( HTML_PARSPACE );
@@ -1049,9 +1046,6 @@ SwTxtFmtColl* SwDoc::GetTxtCollFromPool( USHORT nId, bool bRegardLanguage )
{
{
pNewColl->SetFmtAttr( aSet );
- // JP 31.08.95: erzeugen einer PoolVorlage ist keine Modifikation
- // (Bug: 18545)
- // SetModified();
}
}
return pNewColl;
@@ -1213,10 +1207,6 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
SetAllScriptItem( aSet, SvxFontItem( rBulletFont.GetFamily(),
rBulletFont.GetName(), rBulletFont.GetStyleName(),
rBulletFont.GetPitch(), rBulletFont.GetCharSet(), RES_CHRATR_FONT ));
- // --> OD 2008-06-02 #i63395#
- // no font and no font size any more
-// SetAllScriptItem( aSet, SvxFontHeightItem( PT_9, 100, RES_CHRATR_FONTSIZE ));
- // <--
}
break;
@@ -1286,10 +1276,6 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
case RES_POOLCHR_VERT_NUM:
aSet.Put( SvxCharRotateItem( 900, sal_False, RES_CHRATR_ROTATE ) );
break;
-//nichts besonderes
-// case RES_POOLCHR_HTML_DEFINSTANCE:
-// break;
-
case RES_POOLFRM_FRAME:
{
@@ -1377,9 +1363,6 @@ SwFmt* SwDoc::GetFmtFromPool( USHORT nId )
{
{
pNewFmt->SetFmtAttr( aSet );
- // JP 31.08.95: erzeugen einer PoolVorlage ist keine Modifikation
- // (Bug: 18545)
- // SetModified();
}
}
return pNewFmt;
@@ -1626,9 +1609,6 @@ SwPageDesc* SwDoc::GetPageDescFromPool( sal_uInt16 nId, bool bRegardLanguage )
if( bSetLeft )
pNewPgDsc->GetLeft().SetFmtAttr( aSet );
pNewPgDsc->GetMaster().SetFmtAttr( aSet );
- // JP 31.08.95: erzeugen einer PoolVorlage ist keine Modifikation
- // (Bug: 18545)
- // SetModified();
}
}
return pNewPgDsc;
@@ -2374,36 +2354,6 @@ sal_Bool SwDoc::IsUsed( const SwModify& rModify ) const
// erfrage ob die NumRule benutzt wird
sal_Bool SwDoc::IsUsed( const SwNumRule& rRule ) const
{
- // --> OD 2008-03-04 #refactorlists#
-// // dann teste mal, ob es abhaengige ContentNodes im Nodes Array gibt
-// // (auch indirekte fuer Format-Ableitung! )
-// sal_Bool bUsed = FALSE;
-// SwAutoFmtGetDocNode aGetHt( &aNodes );
-// SwModify* pMod;
-// const SfxPoolItem* pItem;
-// USHORT i, nMaxItems = GetAttrPool().GetItemCount( RES_PARATR_NUMRULE);
-// for( i = 0; i < nMaxItems; ++i )
-// {
-// if( 0 != (pItem = GetAttrPool().GetItem( RES_PARATR_NUMRULE, i ) ) &&
-// 0 != ( pMod = (SwModify*)((SwNumRuleItem*)pItem)->GetDefinedIn()) &&
-// ((SwNumRuleItem*)pItem)->GetValue().Len() &&
-// ((SwNumRuleItem*)pItem)->GetValue() == rRule.GetName() )
-// {
-// if( pMod->IsA( TYPE( SwFmt )) )
-// {
-// bUsed = !pMod->GetInfo( aGetHt );
-// if( bUsed )
-// break;
-// }
-// else if( ((SwTxtNode*)pMod)->GetNodes().IsDocNodes() )
-// {
-// bUsed = TRUE;
-// break;
-// }
-// }
-// }
-
-// return bUsed;
sal_Bool bUsed = rRule.GetTxtNodeListSize() > 0 ||
rRule.GetParagraphStyleListSize() > 0;
diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx
index 4a9ad23..b4a4f7e 100644
--- a/sw/source/core/doc/swserv.cxx
+++ b/sw/source/core/doc/swserv.cxx
@@ -162,10 +162,6 @@ void SwServerObject::SendDataChanged( const SwPosition& rPos )
SvLinkSource::NotifyDataChanged();
}
}
- // sonst melden wir uns ab !!
-// ????? JP 27.06.95: geht das so ????
-// else
-// Closed();
}
@@ -205,10 +201,6 @@ void SwServerObject::SendDataChanged( const SwPaM& rRange )
SvLinkSource::NotifyDataChanged();
}
}
- // sonst melden wir uns ab !!
-// ????? JP 27.06.95: geht das so ????
-// else
-// Closed();
}
@@ -259,10 +251,6 @@ BOOL SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const
// um Rekursionen zu Verhindern: ServerType umsetzen!
SwServerObject::ServerModes eSave = eType;
if( !pChkLnk )
-// sowas sollte man nicht tun, wer weiss schon, wie gross ein enum ist
-// ICC nimmt keinen int
-// #41723#
-// *((int*)&eType) = SECTION_SERVER+1;
((SwServerObject*)this)->eType = NONE_SERVER;
for( USHORT n = rLnks.Count(); n; )
{
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 60fdd30..1018586 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -1079,9 +1079,7 @@ BOOL SwTableAutoFmtTbl::Save( SvStream& rStream ) const
rStream << nVal
<< (BYTE)2 // Anzahl von Zeichen des Headers incl. diesem
<< (BYTE)GetStoreCharSet( ::gsl_getSystemTextEncoding() );
-// << (BYTE)4 // Anzahl von Zeichen des Headers incl. diesem
-// << (BYTE)::GetSystemCharSet()
-// << (UNIT16)SOFFICE_FILEFORMAT_NOW;
+
bRet = 0 == rStream.GetError();
//-----------------------------------------------------------
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index 13f1662..b589a5d 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -506,19 +506,6 @@ namespace
if( pBox && pBox->getRowSpan() > 0 )
lcl_CpyBox( rSource, rInfo.mpCopy, rDstTbl, pBox,
TRUE, pUndo );
- /* Idea: If target cell is a covered cell, append content
- to master cell.
- BOOL bReplace = TRUE;
- if( pBox->getRowSpan() < 0 )
- {
- if( rInfo.mpCopy->getRowSpan() < 0 )
- continue;
- pBox = &pBox->FindStartOfRowSpan( rDstTbl );
- bReplace = FALSE;
- }
- lcl_CpyBox( rSource, rInfo.mpCopy, rDstTbl, pBox,
- bReplace, pUndo );
- */
}
}
}
@@ -616,7 +603,6 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
}
if( pCNd &&
- /*RES_POOLCOLL_TABLE == */
RES_POOLCOLL_TABLE_HDLN !=
pCNd->GetFmtColl()->GetPoolFmtId() )
bReplaceColl = FALSE;
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 3f90394..22fd94a 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -397,7 +397,6 @@ BOOL lcl_CopyCol( const _FndBox*& rpFndBox, void* pPara )
else
{
aFindFrm = pCpyPara->rTabFrmArr[ nFndPos ];
-// aFindFrm.pNewFrmFmt->Add( pBox );
pBox->ChgFrmFmt( (SwTableBoxFmt*)aFindFrm.pNewFrmFmt );
}
}
@@ -1578,8 +1577,6 @@ BOOL lcl_Merge_MoveLine( const _FndLine*& rpFndLine, void* pPara )
USHORT nLeft = pFndLn->GetTabBoxes().C40_GETPOS( SwTableBox, pLBx );
USHORT nRight = pFndLn->GetTabBoxes().C40_GETPOS( SwTableBox, pRBx );
-// if( ( nLeft && nRight+1 < pFndLn->GetTabBoxes().Count() ) ||
-// ( !nLeft && nRight+1 >= pFndLn->GetTabBoxes().Count() ) )
if( !nLeft || nRight == pFndLn->GetTabBoxes().Count() )
{
if( pULPara->bUL ) // Upper ?
@@ -4604,10 +4601,6 @@ SwFrmFmt* SwShareBoxFmts::GetFormat( const SwFrmFmt& rFmt,
void SwShareBoxFmts::AddFormat( const SwFrmFmt& rOld, const SwFrmFmt& rNew )
{
- // wenn das Format nicht geshared ist, braucht es auch nicht in die
- // Liste aufgenommen werden. Denn es gibt keinen 2. der es sucht.
-//leider werden auch die CellFrms gefunden
-// if( !rOld.IsLastDepend() )
{
USHORT nPos;
SwShareBoxFmt* pEntry;
More information about the Libreoffice-commits
mailing list