summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/txtnode')
-rw-r--r--sw/source/core/txtnode/SwGrammarContact.cxx2
-rw-r--r--sw/source/core/txtnode/atrfld.cxx2
-rw-r--r--sw/source/core/txtnode/atrflyin.cxx2
-rw-r--r--sw/source/core/txtnode/atrftn.cxx2
-rw-r--r--sw/source/core/txtnode/atrref.cxx2
-rw-r--r--sw/source/core/txtnode/atrtox.cxx3
-rw-r--r--sw/source/core/txtnode/chrfmt.cxx2
-rw-r--r--sw/source/core/txtnode/fmtatr2.cxx2
-rw-r--r--sw/source/core/txtnode/fntcache.cxx2
-rw-r--r--sw/source/core/txtnode/fntcap.cxx4
-rw-r--r--sw/source/core/txtnode/modeltoviewhelper.cxx3
-rw-r--r--sw/source/core/txtnode/ndhints.cxx2
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx231
-rw-r--r--sw/source/core/txtnode/swfntcch.cxx2
-rw-r--r--sw/source/core/txtnode/swfont.cxx3
-rw-r--r--sw/source/core/txtnode/thints.cxx2
-rw-r--r--sw/source/core/txtnode/txatbase.cxx2
-rw-r--r--sw/source/core/txtnode/txatritr.cxx2
-rw-r--r--sw/source/core/txtnode/txtatr2.cxx2
-rw-r--r--sw/source/core/txtnode/txtedt.cxx46
20 files changed, 91 insertions, 227 deletions
diff --git a/sw/source/core/txtnode/SwGrammarContact.cxx b/sw/source/core/txtnode/SwGrammarContact.cxx
index 5a444161a702..a9ee7f529cdb 100644
--- a/sw/source/core/txtnode/SwGrammarContact.cxx
+++ b/sw/source/core/txtnode/SwGrammarContact.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -219,3 +220,4 @@ void finishGrammarCheck( SwTxtNode& rTxtNode )
pGrammarContact->finishGrammarCheck( rTxtNode );
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index 6b1adc76fbec..bedc79b1db86 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -399,3 +400,4 @@ void SwTxtFld::NotifyContentChange(SwFmtFld& rFmtFld)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx
index 02da2c32be8a..fb997f83d066 100644
--- a/sw/source/core/txtnode/atrflyin.cxx
+++ b/sw/source/core/txtnode/atrflyin.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -288,3 +289,4 @@ SwFlyInCntFrm *SwTxtFlyCnt::_GetFlyFrm( const SwFrm *pCurrFrm )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx
index 45f6c5da2baf..56d866911d7a 100644
--- a/sw/source/core/txtnode/atrftn.cxx
+++ b/sw/source/core/txtnode/atrftn.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -541,3 +542,4 @@ void SwTxtFtn::CheckCondColl()
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/atrref.cxx b/sw/source/core/txtnode/atrref.cxx
index 979a810b018b..65cfac27bdb6 100644
--- a/sw/source/core/txtnode/atrref.cxx
+++ b/sw/source/core/txtnode/atrref.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -101,3 +102,4 @@ xub_StrLen* SwTxtRefMark::GetEnd()
return m_pEnd;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/atrtox.cxx b/sw/source/core/txtnode/atrtox.cxx
index c02478fe1014..31820ab10978 100644
--- a/sw/source/core/txtnode/atrtox.cxx
+++ b/sw/source/core/txtnode/atrtox.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -94,3 +95,5 @@ void SwTxtTOXMark::CopyTOXMark( SwDoc* pDoc )
//
((SwTOXType*)pType)->Add( &rTOX );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/chrfmt.cxx b/sw/source/core/txtnode/chrfmt.cxx
index eb2f4be5c3e8..71d7e48f6d74 100644
--- a/sw/source/core/txtnode/chrfmt.cxx
+++ b/sw/source/core/txtnode/chrfmt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,3 +37,4 @@ TYPEINIT1( SwCharFmt, SwFmt ); //rtti fuer SwCharFmt
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx
index c7d032fe6ea9..faa408065dcb 100644
--- a/sw/source/core/txtnode/fmtatr2.cxx
+++ b/sw/source/core/txtnode/fmtatr2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -906,3 +907,4 @@ MetaFieldManager::getMetaFields()
} // namespace sw
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index b644929679d9..78713022f247 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -2726,3 +2727,4 @@ sal_Bool SwDrawTextInfo::ApplyAutoColor( Font* pFont )
return sal_False;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index c0b05b81de1e..f8efc733165a 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,7 +48,7 @@
using namespace ::com::sun::star::i18n;
-#define KAPITAELCHENPROP 66
+#define KAPITAELCHENPROP 80
/*************************************************************************
* class SwCapitalInfo
@@ -845,3 +846,4 @@ void SwSubFont::DoOnCapitals( SwDoCapitals &rDo )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx b/sw/source/core/txtnode/modeltoviewhelper.cxx
index 723c12bddbdc..8d4940b1ec67 100644
--- a/sw/source/core/txtnode/modeltoviewhelper.cxx
+++ b/sw/source/core/txtnode/modeltoviewhelper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -118,3 +119,5 @@ ModelPosition ConvertToModelPosition( const ConversionMap* pMap, sal_uInt32 nVie
}
} // namespace ModelToViewStringConverter end
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/ndhints.cxx b/sw/source/core/txtnode/ndhints.cxx
index c4c78fd6d59d..b6806be5917b 100644
--- a/sw/source/core/txtnode/ndhints.cxx
+++ b/sw/source/core/txtnode/ndhints.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -495,3 +496,4 @@ bool SwpHintsArray::Resort()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 76560bae91d7..61faf03c4cf4 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,9 +35,7 @@
#include <editeng/brkitem.hxx>
#include <editeng/escpitem.hxx>
#include <editeng/lrspitem.hxx>
-// --> OD 2008-01-17 #newlistlevelattrs#
#include <editeng/tstpitem.hxx>
-// <--
#include <svl/urihelper.hxx>
#ifndef _SVSTDARR_HXX
#define _SVSTDARR_ULONGS
@@ -88,16 +87,12 @@
#include <SwStyleNameMapper.hxx>
#include <numrule.hxx>
-//--> #outlinelevel added by zhaojianwei
#include <svl/intitem.hxx>
-//<--end
#include <swtable.hxx>
#include <docsh.hxx>
#include <SwNodeNum.hxx>
-// --> OD 2008-02-25 #refactorlists#
#include <svl/intitem.hxx>
#include <list.hxx>
-// <--
SV_DECL_PTRARR( TmpHints, SwTxtAttr*, 0, 4 )
@@ -126,24 +121,14 @@ SwTxtNode *SwNodes::MakeTxtNode( const SwNodeIndex & rWhere,
SwNodeIndex aIdx( *pNode );
- // --> OD 2005-11-03 #125329#
+ // #125329#
// call method <UpdateOutlineNode(..)> only for the document nodes array
if ( IsDocNodes() )
{
- //if ( pColl && NO_NUMBERING != pColl->GetOutlineLevel() ) //#outline level,removed by zhaojianwei
- //{
- // UpdateOutlineNode( *pNode, NO_NUMBERING, pColl->GetOutlineLevel() );
- //}
-// if ( pColl && 0 != pColl->GetAttrOutlineLevel() )//#outline level,added by zhaojianwei
-// {
-// UpdateOutlineNode( *pNode, 0, pColl->GetAttrOutlineLevel() );
-// }//<--end
-// else
{
UpdateOutlineNode(*pNode);
}
}
- // <--
//Wenn es noch kein Layout gibt oder in einer versteckten Section
// stehen, brauchen wir uns um das MakeFrms nicht bemuehen.
@@ -231,13 +216,10 @@ SwTxtNode::SwTxtNode( const SwNodeIndex &rWhere,
mpNodeNum( 0 ),
m_bLastOutlineState( false ),
m_bNotifiable( false ),
- // --> OD 2008-11-19 #i70748#
+ // #i70748#
mbEmptyListStyleSetDueToSetOutlineLevelAttr( false ),
- // <--
- // --> OD 2008-05-06 #refactorlists#
mbInSetOrResetAttr( false ),
mpList( 0 )
- // <--
{
InitSwParaStatistics( true );
@@ -245,11 +227,10 @@ SwTxtNode::SwTxtNode( const SwNodeIndex &rWhere,
if( pAutoAttr )
SetAttr( *pAutoAttr );
- // --> OD 2008-03-13 #refactorlists# - no longed needed
// SyncNumberAndNumRule();
if ( !IsInList() && GetNumRule() && GetListId().Len() > 0 )
{
- // --> OD 2009-08-27 #i101516#
+ // #i101516#
// apply paragraph style's assigned outline style list level as
// list level of the paragraph, if it has none set already.
if ( !HasAttrListLevel() &&
@@ -257,10 +238,8 @@ SwTxtNode::SwTxtNode( const SwNodeIndex &rWhere,
{
SetAttrListLevel( pTxtColl->GetAssignedOutlineStyleLevel() );
}
- // <--
AddToList();
}
- // <--
GetNodes().UpdateOutlineNode(*this);
m_bNotifiable = true;
@@ -287,15 +266,7 @@ SwTxtNode::~SwTxtNode()
delete pTmpHints;
}
- // --> OD 2008-03-13 #refactorlists#
-// if ( mpNodeNum )
-// {
-// mpNodeNum->RemoveMe();
-// delete mpNodeNum;
-// mpNodeNum = 0L;
-// }
RemoveFromList();
- // <--
InitSwParaStatistics( false );
}
@@ -360,7 +331,7 @@ void lcl_ChangeFtnRef( SwTxtNode &rNode )
{
while( pFtn->GetMaster() )
pFtn = pFtn->GetMaster();
- // OD 07.11.2002 #104840# - remember footnote frame
+ // #104840# - remember footnote frame
pFirstFtnOfNode = pFtn;
while ( pFtn )
{
@@ -380,7 +351,7 @@ void lcl_ChangeFtnRef( SwTxtNode &rNode )
}
}
} // end of for-loop on <SwpHints>
- // OD 08.11.2002 #104840# - invalidate
+ // #104840# - invalidate
if ( pFirstFtnOfNode )
{
SwCntntFrm* pCntnt = pFirstFtnOfNode->ContainsCntnt();
@@ -412,15 +383,6 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
}
}
- // --> OD 2008-03-27 #refactorlists#
-// // --> OD 2007-07-09 #i77372#
-// // reset numbering attribute at current node, only if it is numbered.
-// if ( GetNumRule() != NULL )
-// {
-// SetRestart(false);
-// SetStart(1);
-// SetCounted(true);
-// }
ResetAttr( RES_PARATR_LIST_ISRESTART );
ResetAttr( RES_PARATR_LIST_RESTARTVALUE );
ResetAttr( RES_PARATR_LIST_ISCOUNTED );
@@ -429,7 +391,6 @@ SwCntntNode *SwTxtNode::SplitCntntNode( const SwPosition &rPos )
ResetAttr( RES_PARATR_LIST_ID );
ResetAttr( RES_PARATR_LIST_LEVEL );
}
- // <--
if ( GetDepends() && m_Text.Len() && (nTxtLen / 2) < nSplitPos )
{
@@ -1119,15 +1080,12 @@ void SwTxtNode::_ChgTxtCollUpdateNum( const SwTxtFmtColl *pOldColl,
ASSERT( pDoc, "Kein Doc?" );
// erfrage die OutlineLevel und update gegebenenfalls das Nodes-Array,
// falls sich die Level geaendert haben !
- //const BYTE nOldLevel = pOldColl ? pOldColl->GetOutlineLevel():NO_NUMBERING;//#outline level,removed by zhaojianwei
- //const BYTE nNewLevel = pNewColl ? pNewColl->GetOutlineLevel():NO_NUMBERING;//<-end,zhaojianwei
const int nOldLevel = pOldColl && pOldColl->IsAssignedToListLevelOfOutlineStyle() ?
pOldColl->GetAssignedOutlineStyleLevel() : MAXLEVEL;
const int nNewLevel = pNewColl && pNewColl->IsAssignedToListLevelOfOutlineStyle() ?
pNewColl->GetAssignedOutlineStyleLevel() : MAXLEVEL;
-// if ( NO_NUMBERING != nNewLevel ) //#outline level,zhaojianwei
- if ( MAXLEVEL != nNewLevel ) //<-end,zhaojianwei
+ if ( MAXLEVEL != nNewLevel )
{
SetAttrListLevel(nNewLevel);
}
@@ -1149,14 +1107,11 @@ void SwTxtNode::_ChgTxtCollUpdateNum( const SwTxtFmtColl *pOldColl,
pDoc->GetFtnIdxs().UpdateFtn( aTmpIndex);
}
-//FEATURE::CONDCOLL
- if( /*pOldColl != pNewColl && pNewColl && */
- RES_CONDTXTFMTCOLL == pNewColl->Which() )
+ if( RES_CONDTXTFMTCOLL == pNewColl->Which() )
{
// Erfrage die akt. Condition des TextNodes:
ChkCondColl();
}
-//FEATURE::CONDCOLL
}
// Wenn man sich genau am Ende einer Text- bzw. INetvorlage befindet,
@@ -1521,7 +1476,6 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
SwIndex aIdx( pDest, pDest->m_Text.Len() );
CopyText( pDest, aIdx, rStart, nLen, bForceCopyOfAllAttrs );
}
-// <--
// --> OD 2008-11-18 #i96213#
// introduction of new optional parameter to control, if all attributes have to be copied.
@@ -1530,7 +1484,6 @@ void SwTxtNode::CopyText( SwTxtNode *const pDest,
const SwIndex &rStart,
xub_StrLen nLen,
const bool bForceCopyOfAllAttrs )
-// <--
{
xub_StrLen nTxtStartIdx = rStart.GetIndex();
xub_StrLen nDestStart = rDestStart.GetIndex(); // alte Pos merken
@@ -1898,7 +1851,7 @@ void SwTxtNode::CutText( SwTxtNode * const pDest,
void SwTxtNode::CutImpl( SwTxtNode * const pDest, const SwIndex & rDestStart,
- const SwIndex & rStart, /*const*/ xub_StrLen nLen, const bool bUpdate )
+ const SwIndex & rStart, xub_StrLen nLen, const bool bUpdate )
{
if(!pDest)
{
@@ -2327,12 +2280,7 @@ void SwTxtNode::EraseText(const SwIndex &rIdx, const xub_StrLen nCount,
// treated just like toxmark and refmarks
(RES_TXTATR_CJK_RUBY == nWhich) ) )
// <--
-#if 0
- || ( (nHintStart == nStartIdx) &&
- (nHintStart + 1 == nEndIdx)&&
-#else // generalize this to left-overlapped dummy char hints (see ASSERT)
|| ( (nHintStart < nEndIdx) &&
-#endif
pHt->HasDummyChar() )
)
{
@@ -2457,84 +2405,7 @@ SwNumRule* SwTxtNode::_GetNumRule(BOOL bInParent) const
}
}
}
-
- // --> OD 2006-11-20 #i71764#
- // Document setting OUTLINE_LEVEL_YIELDS_OUTLINE_RULE has no influence
- // any more.
-// if ( !pRet &&
-// GetDoc()->get(IDocumentSettingAccess::OUTLINE_LEVEL_YIELDS_OUTLINE_RULE) &&
-// GetOutlineLevel() != NO_NUMBERING )
-// {
-// pRet = GetDoc()->GetOutlineNumRule();
-// }
- // <--
}
- // old code before tuning
-// // --> OD 2005-10-25 #126347#
-// // determine of numbering/bullet rule, which is set as a hard attribute
-// // at the text node
-// const SfxPoolItem* pItem( 0L );
-// if ( HasSwAttrSet() ) // does text node has hard attributes ?
-// {
-// if ( SFX_ITEM_SET !=
-// GetpSwAttrSet()->GetItemState( RES_PARATR_NUMRULE, FALSE, &pItem ) )
-// {
-// pItem = 0L;
-// }
-// // else: <pItem> contains the numbering/bullet attribute, which is
-// // hard set at the paragraph.
-
-// }
-// // <--
-// bool bNoNumRule = false;
-// if (pItem)
-// {
-// String sNumRuleName = static_cast<const SwNumRuleItem *>(pItem)->GetValue();
-// if (sNumRuleName.Len() > 0)
-// {
-// pRet = GetDoc()->FindNumRulePtr(sNumRuleName);
-// }
-// else // numbering is turned off by hard attribute
-// bNoNumRule = true;
-// }
-
-// if (! bNoNumRule)
-// {
-// if (! pRet && bInParent)
-// {
-// SwTxtFmtColl * pColl = GetTxtColl();
-
-// if (pColl)
-// {
-// const SwNumRuleItem & rItem = pColl->GetNumRule(TRUE);
-
-// pRet = const_cast<SwDoc *>(GetDoc())->
-// FindNumRulePtrWithPool(rItem.GetValue());
-// // --> OD 2005-10-13 #125993# - The outline numbering rule
-// // isn't allowed to be derived from a parent paragraph style
-// // to a derived one.
-// // Thus check, if the found outline numbering rule is directly
-// // set at the paragraph style <pColl>. If not, don't return
-// // the outline numbering rule.
-// if ( pRet && pRet == GetDoc()->GetOutlineNumRule() )
-// {
-// const SwNumRuleItem& rDirectItem = pColl->GetNumRule(FALSE);
-// SwNumRule* pNumRuleAtParaStyle = const_cast<SwDoc*>(GetDoc())->
-// FindNumRulePtrWithPool(rDirectItem.GetValue());
-// if ( !pNumRuleAtParaStyle )
-// {
-// pRet = 0L;
-// }
-// }
-// // <--
-// }
-// }
-
-// if (!pRet && GetDoc()->IsOutlineLevelYieldsOutlineRule() &&
-// GetOutlineLevel() != NO_NUMBERING)
-// pRet = GetDoc()->GetOutlineNumRule();
-// }
- // <--
return pRet;
}
@@ -2548,7 +2419,6 @@ SwNumRule* SwTxtNode::GetNumRule(BOOL bInParent) const
void SwTxtNode::NumRuleChgd()
{
- // --> OD 2008-04-04 #refactorlists#
if ( IsInList() )
{
SwNumRule* pNumRule = GetNumRule();
@@ -2557,7 +2427,6 @@ void SwTxtNode::NumRuleChgd()
mpNodeNum->ChangeNumRule( *pNumRule );
}
}
- // <--
if( IsInCache() )
{
@@ -2583,7 +2452,6 @@ BOOL SwTxtNode::IsNumbered() const
return bResult;
}
-// --> OD 2008-04-02 #refactorlists#
bool SwTxtNode::HasMarkedLabel() const
{
bool bResult = false;
@@ -2596,7 +2464,6 @@ bool SwTxtNode::HasMarkedLabel() const
return bResult;
}
-// <--
// <- #i27615#
SwTxtNode* SwTxtNode::_MakeNewTxtNode( const SwNodeIndex& rPos, BOOL bNext,
@@ -2748,9 +2615,7 @@ SwCntntNode* SwTxtNode::AppendNode( const SwPosition & rPos )
pNew->ResetAttr( RES_PARATR_LIST_ID );
pNew->ResetAttr( RES_PARATR_LIST_LEVEL );
}
- // <--
- // --> OD 2008-03-13 #refactorlists#
-// SyncNumberAndNumRule();
+
if ( !IsInList() && GetNumRule() && GetListId().Len() > 0 )
{
AddToList();
@@ -2853,7 +2718,7 @@ long SwTxtNode::GetLeftMarginWithNum( BOOL bTxtLeft ) const
if( pRule )
{
const SwNumFmt& rFmt = pRule->Get(static_cast<USHORT>(GetActualListLevel()));
- // --> OD 2008-01-16 #newlistlevelattrs#
+
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
nRet = rFmt.GetAbsLSpace();
@@ -2882,10 +2747,8 @@ long SwTxtNode::GetLeftMarginWithNum( BOOL bTxtLeft ) const
{
nRet = nRet + rFmt.GetFirstLineIndent();
}
- // <--
}
}
- // <--
}
return nRet;
@@ -2904,7 +2767,6 @@ BOOL SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
{
if ( IsCountedInList() )
{
- // --> OD 2008-01-16 #newlistlevelattrs#
const SwNumFmt& rFmt = pRule->Get(static_cast<USHORT>(GetActualListLevel()));
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -2928,7 +2790,6 @@ BOOL SwTxtNode::GetFirstLineOfsWithNum( short& rFLOffset ) const
rFLOffset = aItem.GetTxtFirstLineOfst();
}
}
- // <--
}
bRet = TRUE;
@@ -2984,7 +2845,6 @@ SwTwips SwTxtNode::GetAdditionalIndentForStartingNewList() const
return nAdditionalIndent;
}
-// <--
// --> OD 2008-12-02 #i96772#
void SwTxtNode::ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpaceItem ) const
@@ -3003,7 +2863,6 @@ void SwTxtNode::ClearLRSpaceItemDueToListLevelIndents( SvxLRSpaceItem& o_rLRSpac
}
}
}
-// <--
// --> OD 2008-07-01 #i91133#
long SwTxtNode::GetLeftMarginForTabCalculation() const
@@ -3031,7 +2890,6 @@ long SwTxtNode::GetLeftMarginForTabCalculation() const
return nLeftMarginForTabCalc;
}
-// <--
void SwTxtNode::Replace0xFF( XubString& rTxt, xub_StrLen& rTxtStt,
xub_StrLen nEndPos, BOOL bExpandFlds ) const
@@ -3142,7 +3000,6 @@ XubString SwTxtNode::GetExpandTxt( const xub_StrLen nIdx,
return aTxt;
}
-// <--
BOOL SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
xub_StrLen nIdx, xub_StrLen nLen, BOOL bWithNum,
@@ -3494,19 +3351,14 @@ namespace {
bParagraphStyleChanged = true;
if( rTxtNode.GetNodes().IsDocNodes() )
{
- // --> OD 2008-12-17 #i70748#
- // The former list style set at the paragraph can not be
- // retrieved from the change set.
-// sOldNumRule =
-// dynamic_cast<const SwFmtChg*>(pOldValue)->pChangedFmt->GetNumRule().GetValue();
+ // #i70748#
const SwNumRule* pFormerNumRuleAtTxtNode =
rTxtNode.GetNum() ? rTxtNode.GetNum()->GetNumRule() : 0;
if ( pFormerNumRuleAtTxtNode )
{
sOldNumRule = pFormerNumRuleAtTxtNode->GetName();
}
- // <--
- // --> OD 2008-11-19 #i70748#
+ // #i70748#
if ( rTxtNode.IsEmptyListStyleDueToSetOutlineLevelAttr() )
{
const SwNumRuleItem& rNumRuleItem = rTxtNode.GetTxtColl()->GetNumRule();
@@ -3515,7 +3367,7 @@ namespace {
rTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr();
}
}
- // <--
+
const SwNumRule* pNumRuleAtTxtNode = rTxtNode.GetNumRule();
if ( pNumRuleAtTxtNode )
{
@@ -3528,71 +3380,46 @@ namespace {
case RES_ATTRSET_CHG:
{
const SfxPoolItem* pItem = 0;
- // --> OD 2008-12-19 #i70748#
- // The former list style set at the paragraph can not be
- // retrieved from the change set.
-// if ( dynamic_cast<const SwAttrSetChg*>(pOldValue)->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, FALSE, &pItem ) ==
-// SFX_ITEM_SET )
-// {
-// sOldNumRule = dynamic_cast<const SwNumRuleItem*>(pItem)->GetValue();
-// }
+ // #i70748#
const SwNumRule* pFormerNumRuleAtTxtNode =
rTxtNode.GetNum() ? rTxtNode.GetNum()->GetNumRule() : 0;
if ( pFormerNumRuleAtTxtNode )
{
sOldNumRule = pFormerNumRuleAtTxtNode->GetName();
}
- // <--
+
if ( dynamic_cast<const SwAttrSetChg*>(pNewValue)->GetChgSet()->GetItemState( RES_PARATR_NUMRULE, FALSE, &pItem ) ==
SFX_ITEM_SET )
{
- // --> OD 2008-11-19 #i70748#
+ // #i70748#
rTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr();
- // <--
bNumRuleSet = true;
- // The new list style set at the paragraph can not be
- // retrieved from the change set.
-// sNumRule = dynamic_cast<const SwNumRuleItem*>(pItem)->GetValue();
- // <--
}
- // --> OD 2008-12-17 #i70748#
+ // #i70748#
// The new list style set at the paragraph.
const SwNumRule* pNumRuleAtTxtNode = rTxtNode.GetNumRule();
if ( pNumRuleAtTxtNode )
{
sNumRule = pNumRuleAtTxtNode->GetName();
}
- // <--
break;
}
case RES_PARATR_NUMRULE:
{
if ( rTxtNode.GetNodes().IsDocNodes() )
{
- // The former list style set at the paragraph can not be
- // retrieved from the change set.
-// if ( pOldValue )
-// {
-// sOldNumRule = dynamic_cast<const SwNumRuleItem*>(pOldValue)->GetValue();
-// }
const SwNumRule* pFormerNumRuleAtTxtNode =
rTxtNode.GetNum() ? rTxtNode.GetNum()->GetNumRule() : 0;
if ( pFormerNumRuleAtTxtNode )
{
sOldNumRule = pFormerNumRuleAtTxtNode->GetName();
}
- // <--
+
if ( pNewValue )
{
- // --> OD 2008-11-19 #i70748#
+ // #i70748#
rTxtNode.ResetEmptyListStyleDueToResetOutlineLevelAttr();
- // <--
bNumRuleSet = true;
- // --> OD 2008-12-17 #i70748#
- // The new list style set at the paragraph can not be
- // retrieved from the change set.
-// sNumRule = dynamic_cast<const SwNumRuleItem*>(pNewValue)->GetValue();
- // <--
}
// --> OD 2008-12-17 #i70748#
// The new list style set at the paragraph.
@@ -3601,7 +3428,6 @@ namespace {
{
sNumRule = pNumRuleAtTxtNode->GetName();
}
- // <--
}
break;
}
@@ -3627,7 +3453,6 @@ namespace {
rTxtNode.GetDoc()->ResetAttrs( aPam, sal_False,
&aResetAttrsArray,
false );
- // <--
}
}
else
@@ -3643,7 +3468,6 @@ namespace {
"<HandleModifyAtTxtNode()> - text node with outline style, but its paragraph style is not assigned to outline style." );
int nNewListLevel =
rTxtNode.GetTxtColl()->GetAssignedOutlineStyleLevel();
- // <--
if ( 0 <= nNewListLevel && nNewListLevel < MAXLEVEL )
{
rTxtNode.SetAttrListLevel( nNewListLevel );
@@ -3683,11 +3507,9 @@ namespace {
{
rTxtNode.AddToList();
}
- // <--
}
// End of method <HandleModifyAtTxtNode>
}
-// <--
void SwTxtNode::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
{
@@ -3799,8 +3621,7 @@ bool SwTxtNode::IsOutline() const
{
bool bResult = false;
- //if ( GetOutlineLevel() != NO_NUMBERING )//#outline level,removed by zhaojianwei
- if ( GetAttrOutlineLevel() > 0 ) //<-end,zhaojianwei
+ if ( GetAttrOutlineLevel() > 0 )
{
bResult = !IsInRedlines();
}
@@ -4169,15 +3990,6 @@ String SwTxtNode::GetListId() const
if ( pRule )
{
sListId = pRule->GetDefaultListId();
-//#if OSL_DEBUG_LEVEL > 1
-// ASSERT( false,
-// "DEBUG ASSERTION: default list id of list style is applied." );
-//#endif
-// // setting list id directly using <SwCntntNode::SetAttr(..)>,
-// // because no handling of this attribute set is needed and to avoid
-// // recursive calls of <SwTxtNode::SetAttr(..)>
-// SfxStringItem aNewListIdItem( RES_PARATR_LIST_ID, sListId );
-// const_cast<SwTxtNode*>(this)->SwCntntNode::SetAttr( aNewListIdItem );
}
}
@@ -5090,3 +4902,4 @@ SwTxtNode::MakeUnoObject()
return xMeta;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/swfntcch.cxx b/sw/source/core/txtnode/swfntcch.cxx
index 202e6d48f763..590742575b7d 100644
--- a/sw/source/core/txtnode/swfntcch.cxx
+++ b/sw/source/core/txtnode/swfntcch.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -92,3 +93,4 @@ SwCacheObj *SwFontAccess::NewObj( )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 5808d1ddefc9..1c56676eadb7 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1236,3 +1237,5 @@ long AttrSetToLineHeight( const IDocumentSettingAccess& rIDocumentSettingAccess,
rMutableOut.SetFont(aOldFont);
return nHeight;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index ac2f281b0d90..bc395138e5e9 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -3063,3 +3064,4 @@ sal_Unicode GetCharOfTxtAttr( const SwTxtAttr& rAttr )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/txatbase.cxx b/sw/source/core/txtnode/txatbase.cxx
index f79db265d4fd..ae370d5afe42 100644
--- a/sw/source/core/txtnode/txatbase.cxx
+++ b/sw/source/core/txtnode/txatbase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,4 @@ xub_StrLen* SwTxtAttrEnd::GetEnd()
return & m_nEnd;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx
index dd62fda499fe..9122b2d42e08 100644
--- a/sw/source/core/txtnode/txatritr.cxx
+++ b/sw/source/core/txtnode/txatritr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -242,3 +243,4 @@ void SwTxtAttrIterator::SearchNextChg()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/txtatr2.cxx b/sw/source/core/txtnode/txtatr2.cxx
index 5499eeab4439..0285bdb89d63 100644
--- a/sw/source/core/txtnode/txtatr2.cxx
+++ b/sw/source/core/txtnode/txtatr2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -336,3 +337,4 @@ void SwTxtMeta::ChgTxtNode(SwTxtNode * const pNode)
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 0630dbd722b6..20888cb5116e 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -92,7 +93,6 @@
#include <vector>
-
using rtl::OUString;
using namespace ::com::sun::star;
using namespace ::com::sun::star::frame;
@@ -480,7 +480,6 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
continue;
}
-
if( nStt <= nAttrStart ) // Faelle: 1,3,5
{
if( nEnd > nAttrStart
@@ -598,7 +597,6 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
nsSetAttrMode::SETATTR_NOHINTADJUST );
}
-
// jetzt kein i+1, weil das eingefuegte Attribut
// ein anderes auf die Position geschoben hat !
continue;
@@ -623,8 +621,6 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
}
}
-
-
/*************************************************************************
* SwTxtNode::GetCurWord()
*
@@ -809,7 +805,6 @@ BOOL SwScanner::NextWord()
return TRUE;
}
-
USHORT SwTxtNode::Spell(SwSpellArgs* pArgs)
{
// Die Aehnlichkeiten zu SwTxtFrm::_AutoSpell sind beabsichtigt ...
@@ -937,7 +932,6 @@ USHORT SwTxtNode::Spell(SwSpellArgs* pArgs)
return pArgs->xSpellAlt.is() ? 1 : 0;
}
-
void SwTxtNode::SetLanguageAndFont( const SwPaM &rPaM,
LanguageType nLang, USHORT nLangWhichId,
const Font *pFont, USHORT nFontWhichId )
@@ -973,7 +967,6 @@ void SwTxtNode::SetLanguageAndFont( const SwPaM &rPaM,
}
-
USHORT SwTxtNode::Convert( SwConversionArgs &rArgs )
{
// get range of text within node to be converted
@@ -1404,7 +1397,6 @@ SwRect SwTxtFrm::SmartTagScan( SwCntntNode* /*pActNode*/, xub_StrLen /*nActPos*/
return aRet;
}
-
// Wird vom CollectAutoCmplWords gerufen
void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
{
@@ -1420,7 +1412,6 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
xub_StrLen nLen;
BOOL bACWDirty = FALSE, bAnyWrd = FALSE;
-
if( nBegin < nEnd )
{
USHORT nCnt = 200;
@@ -1456,7 +1447,6 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
pNode->SetAutoCompleteWordDirty( FALSE );
}
-
/*************************************************************************
* SwTxtNode::Hyphenate
*************************************************************************/
@@ -1517,7 +1507,6 @@ BOOL SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
// globale Variable
SwLinguStatistik aSwLinguStat;
-
void SwLinguStatistik::Flush()
{
if ( !nWords )
@@ -1585,7 +1574,6 @@ void SwLinguStatistik::Flush()
#endif
-
struct TransliterationChgData
{
xub_StrLen nStart;
@@ -1829,7 +1817,6 @@ void SwTxtNode::TransliterateText(
}
}
-
void SwTxtNode::ReplaceTextOnly( xub_StrLen nPos, xub_StrLen nLen,
const XubString& rText,
const Sequence<sal_Int32>& rOffsets )
@@ -1885,6 +1872,7 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
++rStat.nPara;
ULONG nTmpWords = 0;
ULONG nTmpChars = 0;
+ ULONG nTmpCharsExcludingSpaces = 0; // Number of characters in actual words (i.e. excluding spaces)
// Shortcut: Whole paragraph should be considered and cached values
// are valid:
@@ -1892,6 +1880,7 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
{
nTmpWords = GetParaNumberOfWords();
nTmpChars = GetParaNumberOfChars();
+ nTmpCharsExcludingSpaces = GetParaNumberOfCharsExcludingSpaces();
}
else
{
@@ -1925,9 +1914,13 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
while ( aScanner.NextWord() )
{
- if ( aScanner.GetLen() > 1 ||
- CH_TXTATR_BREAKWORD != aExpandText.match(aBreakWord, aScanner.GetBegin() ) )
+ if( aScanner.GetLen() > 1 ||
+ CH_TXTATR_BREAKWORD != aExpandText.match(aBreakWord, aScanner.GetBegin() ))
++nTmpWords;
+
+ if( CH_TXTATR_BREAKWORD != aExpandText.match(aBreakWord, aScanner.GetBegin() ))
+ nTmpCharsExcludingSpaces += aScanner.GetLen();
+
}
}
@@ -1971,12 +1964,14 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
{
SetParaNumberOfWords( nTmpWords );
SetParaNumberOfChars( nTmpChars );
+ SetParaNumberOfCharsExcludingSpaces( nTmpCharsExcludingSpaces );
SetWordCountDirty( false );
}
}
rStat.nWord += nTmpWords;
rStat.nChar += nTmpChars;
+ rStat.nCharExcludingSpaces += nTmpCharsExcludingSpaces;
}
}
}
@@ -1991,6 +1986,7 @@ struct SwParaIdleData_Impl
SwWrongList* pSmartTags;
ULONG nNumberOfWords;
ULONG nNumberOfChars;
+ ULONG nNumberOfCharsExcludingSpaces;
bool bWordCountDirty : 1;
bool bWrongDirty : 1; // Ist das Wrong-Feld auf invalid?
bool bGrammarCheckDirty : 1;
@@ -2003,6 +1999,7 @@ struct SwParaIdleData_Impl
pSmartTags ( 0 ),
nNumberOfWords ( 0 ),
nNumberOfChars ( 0 ),
+ nNumberOfCharsExcludingSpaces ( 0 ),
bWordCountDirty ( true ),
bWrongDirty ( true ),
bGrammarCheckDirty ( true ),
@@ -2050,7 +2047,6 @@ const SwWrongList* SwTxtNode::GetWrong() const
}
// <--
-
void SwTxtNode::SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete )
{
if ( m_pParaIdleData_Impl )
@@ -2117,6 +2113,20 @@ void SwTxtNode::SetWordCountDirty( bool bNew ) const
m_pParaIdleData_Impl->bWordCountDirty = bNew;
}
}
+
+ULONG SwTxtNode::GetParaNumberOfCharsExcludingSpaces() const
+{
+ return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->nNumberOfCharsExcludingSpaces : 0;
+}
+
+void SwTxtNode::SetParaNumberOfCharsExcludingSpaces( ULONG nNew ) const
+{
+ if ( m_pParaIdleData_Impl )
+ {
+ m_pParaIdleData_Impl->nNumberOfCharsExcludingSpaces = nNew;
+ }
+}
+
bool SwTxtNode::IsWordCountDirty() const
{
return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->bWordCountDirty : 0;
@@ -2168,3 +2178,5 @@ bool SwTxtNode::IsAutoCompleteWordDirty() const
//
// Paragraph statistics end
//
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */