diff options
author | Philipp Riemer <ruderphilipp@gmail.com> | 2013-06-09 00:44:03 +0200 |
---|---|---|
committer | Philipp Riemer <ruderphilipp@gmail.com> | 2013-06-09 00:56:40 +0200 |
commit | b3e67062608f11dbf4b92f5e0765bb0f28a6cfe8 (patch) | |
tree | afc6f2c288dd1a1251c4deec82acb815b849e824 /sw | |
parent | 7cb8b8c8e9548640e4732daaf8e009eb8d7a38f1 (diff) |
fdo#62475 - remove visual noise in sw/source/core/edit
- ASCII art
- method comments without further info
- multiple blank lines
Change-Id: I2b17f5fe4be89cc58c3563dfc64f1b3e2a20bdee
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/edit/acorrect.cxx | 16 | ||||
-rw-r--r-- | sw/source/core/edit/autofmt.cxx | 41 | ||||
-rw-r--r-- | sw/source/core/edit/edatmisc.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/edit/edattr.cxx | 9 | ||||
-rw-r--r-- | sw/source/core/edit/eddel.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/edit/edfcol.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/edit/edfld.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/edit/edfldexp.cxx | 1 | ||||
-rw-r--r-- | sw/source/core/edit/edfmt.cxx | 20 | ||||
-rw-r--r-- | sw/source/core/edit/edglbldc.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/edit/edglss.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/edit/editsh.cxx | 49 | ||||
-rw-r--r-- | sw/source/core/edit/edlingu.cxx | 103 | ||||
-rw-r--r-- | sw/source/core/edit/ednumber.cxx | 22 | ||||
-rw-r--r-- | sw/source/core/edit/edredln.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/edit/edsect.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/edit/edtab.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/edit/edtox.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/edit/edundo.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/edit/edws.cxx | 46 |
20 files changed, 12 insertions, 364 deletions
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index 12f4efcc5335..5530dc83ab29 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -37,7 +37,6 @@ using namespace ::com::sun::star; - class _PaMIntoCrsrShellRing { SwCrsrShell& rSh; @@ -62,12 +61,14 @@ _PaMIntoCrsrShellRing::_PaMIntoCrsrShellRing( SwCrsrShell& rCSh, rDelPam.MoveRingTo( pShCrsr ); rCrsr.MoveRingTo( pShCrsr ); } + _PaMIntoCrsrShellRing::~_PaMIntoCrsrShellRing() { // and take out the Pam again: RemoveFromRing( rDelPam, pPrevDelPam ); RemoveFromRing( rCrsr, pPrevCrsr ); } + void _PaMIntoCrsrShellRing::RemoveFromRing( SwPaM& rPam, Ring* pPrev ) { Ring *p, *pNext = (Ring*)&rPam; @@ -78,7 +79,6 @@ void _PaMIntoCrsrShellRing::RemoveFromRing( SwPaM& rPam, Ring* pPrev ) } while( p != pPrev ); } - SwAutoCorrDoc::SwAutoCorrDoc( SwEditShell& rEditShell, SwPaM& rPam, sal_Unicode cIns ) : rEditSh( rEditShell ), rCrsr( rPam ), pIdx( 0 ) @@ -87,7 +87,6 @@ SwAutoCorrDoc::SwAutoCorrDoc( SwEditShell& rEditShell, SwPaM& rPam, { } - SwAutoCorrDoc::~SwAutoCorrDoc() { for (int i = 0; i < m_nEndUndoCounter; ++i) @@ -124,7 +123,6 @@ sal_Bool SwAutoCorrDoc::Delete( xub_StrLen nStt, xub_StrLen nEnd ) return sal_True; } - sal_Bool SwAutoCorrDoc::Insert( xub_StrLen nPos, const String& rTxt ) { SwPaM aPam( rCrsr.GetPoint()->nNode.GetNode(), nPos ); @@ -141,11 +139,11 @@ sal_Bool SwAutoCorrDoc::Insert( xub_StrLen nPos, const String& rTxt ) return sal_True; } - sal_Bool SwAutoCorrDoc::Replace( xub_StrLen nPos, const String& rTxt ) { return ReplaceRange( nPos, rTxt.Len(), rTxt ); } + sal_Bool SwAutoCorrDoc::ReplaceRange( xub_StrLen nPos, xub_StrLen nSourceLength, const String& rTxt ) { SwPaM* pPam = &rCrsr; @@ -230,8 +228,6 @@ sal_Bool SwAutoCorrDoc::ReplaceRange( xub_StrLen nPos, xub_StrLen nSourceLength, return sal_True; } - - sal_Bool SwAutoCorrDoc::SetAttr( xub_StrLen nStt, xub_StrLen nEnd, sal_uInt16 nSlotId, SfxPoolItem& rItem ) { @@ -255,8 +251,6 @@ sal_Bool SwAutoCorrDoc::SetAttr( xub_StrLen nStt, xub_StrLen nEnd, sal_uInt16 nS return 0 != nWhich; } - - sal_Bool SwAutoCorrDoc::SetINetAttr( xub_StrLen nStt, xub_StrLen nEnd, const String& rURL ) { const SwNodeIndex& rNd = rCrsr.GetPoint()->nNode; @@ -302,7 +296,6 @@ const String* SwAutoCorrDoc::GetPrevPara( sal_Bool bAtNormalPos ) return pStr; } - sal_Bool SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPos, SvxAutoCorrect& rACorrect, const String** ppPara ) @@ -361,7 +354,6 @@ sal_Bool SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPo pIdx = new SwNodeIndex( rCrsr.GetPoint()->nNode, -1 ); } - // SwDoc* pAutoDoc = aTBlks.GetDoc(); SwNodeIndex aSttIdx( pAutoDoc->GetNodes().GetEndOfExtras(), 1 ); SwCntntNode* pCntntNd = pAutoDoc->GetNodes().GoNext( &aSttIdx ); @@ -453,7 +445,6 @@ void SwAutoCorrExceptWord::CheckChar( const SwPosition& rPos, sal_Unicode cChr ) } } - sal_Bool SwAutoCorrExceptWord::CheckDelChar( const SwPosition& rPos ) { sal_Bool bRet = sal_False; @@ -528,5 +519,4 @@ void SwDontExpandItem::RestoreDontExpandItems( const SwPosition& rPos ) } } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 2ffc0151ae9a..9815c1202753 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <ctype.h> #include <hintids.hxx> @@ -67,8 +66,6 @@ using namespace ::com::sun::star; -//------------------------------------------------------------------- - //JP 16.12.99: definition: // from pos cPosEnDash to cPosEmDash all chars changed to endashes, // from pos cPosEmDash to cPosEnd all chars changed to emdashes @@ -80,7 +77,6 @@ const int cnPosEnDash = 2, cnPosEmDash = 4, cnPosEnd = 5; const sal_Unicode cStarSymbolEnDash = 0x2013; const sal_Unicode cStarSymbolEmDash = 0x2014; - SvxSwAutoFmtFlags* SwEditShell::pAutoFmtFlags = 0; // Number of num-/bullet-paragraph templates. MAXLEVEL will soon be raised @@ -138,7 +134,6 @@ class SwAutoFormat bool bEmptyLine : 1; bool bMoreLines : 1; - // ------------- private methods ----------------------------- void _GetCharClass( LanguageType eLang ); CharClass& GetCharClass( LanguageType eLang ) const @@ -151,7 +146,6 @@ class SwAutoFormat return *pCharClass; } - bool IsSpace( const sal_Unicode c ) const { return (' ' == c || '\t' == c || 0x0a == c|| 0x3000 == c /* Jap. space */); } @@ -379,14 +373,12 @@ const SwTxtNode* SwAutoFormat::GetNextNode() const return pDoc->GetNodes()[ aNdIdx.GetIndex() + 1 ]->GetTxtNode(); } - sal_Bool SwAutoFormat::IsOneLine( const SwTxtNode& rNd ) const { SwTxtFrmInfo aFInfo( GetFrm( rNd ) ); return aFInfo.IsOneLine(); } - sal_Bool SwAutoFormat::IsFastFullLine( const SwTxtNode& rNd ) const { sal_Bool bRet = aFlags.bRightMargin; @@ -398,7 +390,6 @@ sal_Bool SwAutoFormat::IsFastFullLine( const SwTxtNode& rNd ) const return bRet; } - sal_Bool SwAutoFormat::IsEnumericChar( const SwTxtNode& rNd ) const { const OUString& rTxt = rNd.GetTxt(); @@ -423,7 +414,6 @@ sal_Bool SwAutoFormat::IsEnumericChar( const SwTxtNode& rNd ) const return USHRT_MAX != GetDigitLevel( rNd, nBlnks ); } - sal_Bool SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const { // Search more that 5 blanks/tabs in the string. @@ -451,7 +441,6 @@ sal_Bool SwAutoFormat::IsBlanksInString( const SwTxtNode& rNd ) const return sal_False; } - sal_uInt16 SwAutoFormat::CalcLevel( const SwTxtNode& rNd, sal_uInt16 *pDigitLvl ) const { sal_uInt16 nLvl = 0, nBlnk = 0; @@ -471,7 +460,6 @@ sal_uInt16 SwAutoFormat::CalcLevel( const SwTxtNode& rNd, sal_uInt16 *pDigitLvl ++nLvl; } - for (xub_StrLen n = 0, nEnd = rTxt.getLength(); n < nEnd; ++n) { switch (rTxt[n]) @@ -491,8 +479,6 @@ sal_uInt16 SwAutoFormat::CalcLevel( const SwTxtNode& rNd, sal_uInt16 *pDigitLvl return nLvl; } - - xub_StrLen SwAutoFormat::GetBigIndent( xub_StrLen& rAktSpacePos ) const { SwTxtFrmInfo aFInfo( GetFrm( *pAktTxtNd ) ); @@ -510,7 +496,6 @@ xub_StrLen SwAutoFormat::GetBigIndent( xub_StrLen& rAktSpacePos ) const return aFInfo.GetBigIndent( rAktSpacePos, pNxtFrm ); } - sal_Bool SwAutoFormat::IsNoAlphaLine( const SwTxtNode& rNd ) const { const String& rStr = rNd.GetTxt(); @@ -532,8 +517,6 @@ sal_Bool SwAutoFormat::IsNoAlphaLine( const SwTxtNode& rNd ) const return xub_StrLen(nLen) < (rStr.Len() - nANChar - nBlnk); } - - bool SwAutoFormat::DoUnderline() { if( !aFlags.bSetBorder ) @@ -614,7 +597,6 @@ bool SwAutoFormat::DoUnderline() return 2 < nCnt; } - bool SwAutoFormat::DoTable() { if( !aFlags.bCreateTable || !aFlags.bAFmtByInput || @@ -694,7 +676,6 @@ bool SwAutoFormat::DoTable() return 1 < aPosArr.size(); } - String& SwAutoFormat::DelLeadingBlanks( String& rStr ) const { xub_StrLen nL; @@ -707,7 +688,6 @@ String& SwAutoFormat::DelLeadingBlanks( String& rStr ) const return rStr; } - String& SwAutoFormat::DelTrailingBlanks( String& rStr ) const { xub_StrLen nL = rStr.Len(), n = nL; @@ -721,7 +701,6 @@ String& SwAutoFormat::DelTrailingBlanks( String& rStr ) const return rStr; } - xub_StrLen SwAutoFormat::GetLeadingBlanks( const String& rStr ) const { xub_StrLen nL; @@ -732,7 +711,6 @@ xub_StrLen SwAutoFormat::GetLeadingBlanks( const String& rStr ) const return n; } - xub_StrLen SwAutoFormat::GetTrailingBlanks( const String& rStr ) const { xub_StrLen nL = rStr.Len(), n = nL; @@ -744,7 +722,6 @@ xub_StrLen SwAutoFormat::GetTrailingBlanks( const String& rStr ) const return ++n; } - bool SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const { const OUString& rTxt = rNd.GetTxt(); @@ -761,7 +738,6 @@ bool SwAutoFormat::IsFirstCharCapital( const SwTxtNode& rNd ) const return false; } - sal_uInt16 SwAutoFormat::GetDigitLevel( const SwTxtNode& rNd, xub_StrLen& rPos, String* pPreFix, String* pPostFix, String* pNumTypes ) const { @@ -1001,7 +977,6 @@ CHECK_ROMAN_5: return nDigitLvl; // 0 .. 9 (MAXLEVEL - 1) } - void SwAutoFormat::SetColl( sal_uInt16 nId, bool bHdLineOrText ) { aDelPam.DeleteMark(); @@ -1035,7 +1010,6 @@ void SwAutoFormat::SetColl( sal_uInt16 nId, bool bHdLineOrText ) pDoc->SetTxtFmtCollByAutoFmt( *aDelPam.GetPoint(), nId, &aSet ); } - bool SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const { // Is there a Blank at the beginning or end? @@ -1060,7 +1034,6 @@ bool SwAutoFormat::HasSelBlanks( SwPaM& rPam ) const return true; } - bool SwAutoFormat::HasBreakAttr( const SwTxtNode& rTxtNd ) const { const SfxItemSet* pSet = rTxtNd.GetpSwAttrSet(); @@ -1079,7 +1052,6 @@ bool SwAutoFormat::HasBreakAttr( const SwTxtNode& rTxtNd ) const return false; } - /// Is there a dot at the end? bool SwAutoFormat::IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const { @@ -1093,7 +1065,6 @@ bool SwAutoFormat::IsSentenceAtEnd( const SwTxtNode& rTxtNd ) const return '.' == rStr.GetChar( n ); } - /// Delete beginning and/or end in a node void SwAutoFormat::DeleteAktPara( bool bStart, bool bEnd ) { @@ -1186,7 +1157,6 @@ bool SwAutoFormat::DeleteAktNxtPara( const String& rNxtPara ) return !bHasBlnks; } - void SwAutoFormat::DelEmptyLine( bool bTstNextPara ) { SetRedlineTxt( STR_AUTOFMTREDL_DEL_EMPTY_PARA ); @@ -1226,7 +1196,6 @@ void SwAutoFormat::DelEmptyLine( bool bTstNextPara ) ClearRedlineTxt(); } - void SwAutoFormat::DelMoreLinesBlanks( bool bWithLineBreaks ) { if( aFlags.bAFmtByInput @@ -1263,7 +1232,6 @@ void SwAutoFormat::DelMoreLinesBlanks( bool bWithLineBreaks ) } } - // delete the previous paragraph void SwAutoFormat::DelPrevPara() { @@ -1283,7 +1251,6 @@ void SwAutoFormat::DelPrevPara() aDelPam.DeleteMark(); } - void SwAutoFormat::BuildIndent() { SetRedlineTxt( STR_AUTOFMTREDL_SET_TMPL_INDENT ); @@ -1322,7 +1289,6 @@ void SwAutoFormat::BuildIndent() AutoCorrect(); } - void SwAutoFormat::BuildTextIndent() { SetRedlineTxt( STR_AUTOFMTREDL_SET_TMPL_TEXT_INDENT); @@ -1361,7 +1327,6 @@ void SwAutoFormat::BuildTextIndent() AutoCorrect(); } - void SwAutoFormat::BuildText() { SetRedlineTxt( STR_AUTOFMTREDL_SET_TMPL_TEXT ); @@ -1399,7 +1364,6 @@ void SwAutoFormat::BuildText() AutoCorrect(); } - void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) { SetRedlineTxt( STR_AUTOFMTREDL_SET_NUMBULET ); @@ -1712,7 +1676,6 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) AutoCorrect( nAutoCorrPos ); } - void SwAutoFormat::BuildNegIndent( SwTwips nSpaces ) { SetRedlineTxt( STR_AUTOFMTREDL_SET_TMPL_NEG_INDENT ); @@ -1798,7 +1761,6 @@ void SwAutoFormat::BuildNegIndent( SwTwips nSpaces ) AutoCorrect(); } - void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl ) { if( aFlags.bWithRedlining ) @@ -1832,7 +1794,6 @@ void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl ) } } - /// Start autocorrection for the current TextNode void SwAutoFormat::AutoCorrect( xub_StrLen nPos ) { @@ -2129,7 +2090,6 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos ) ClearRedlineTxt(); } - SwAutoFormat::SwAutoFormat( SwEditShell* pEdShell, SvxSwAutoFmtFlags& rFlags, SwNodeIndex* pSttNd, SwNodeIndex* pEndNd ) : aFlags( rFlags ), @@ -2616,7 +2576,6 @@ void SwEditShell::AutoFormat( const SvxSwAutoFmtFlags* pAFlags ) delete pWait; } - void SwEditShell::AutoFmtBySplitNode() { SET_CURR_SHELL( this ); diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx index 616a01ef76fa..5c3fc19f7173 100644 --- a/sw/source/core/edit/edatmisc.cxx +++ b/sw/source/core/edit/edatmisc.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <editsh.hxx> #include <doc.hxx> // for aNodes #include <IDocumentUndoRedo.hxx> @@ -26,13 +25,10 @@ #include <swundo.hxx> // for the UndoIds #include <ndtxt.hxx> // fot Get-/ChgFmt Set-/GetAttrXXX - - /* * hard formatting (Attribute) */ - void SwEditShell::ResetAttr( const std::set<sal_uInt16> &attrs, SwPaM* pPaM ) { SET_CURR_SHELL( this ); @@ -58,8 +54,6 @@ void SwEditShell::ResetAttr( const std::set<sal_uInt16> &attrs, SwPaM* pPaM ) EndAllAction(); } - - void SwEditShell::GCAttr() { FOREACHPAM_START(this) @@ -100,10 +94,8 @@ void SwEditShell::SetDefault( const SfxPoolItem& rFmtHint ) const SfxPoolItem& SwEditShell::GetDefault( sal_uInt16 nFmtHint ) const { return GetDoc()->GetDefault( nFmtHint ); - } - void SwEditShell::SetAttr( const SfxPoolItem& rHint, sal_uInt16 nFlags ) { SET_CURR_SHELL( this ); @@ -133,7 +125,6 @@ void SwEditShell::SetAttr( const SfxPoolItem& rHint, sal_uInt16 nFlags ) EndAllAction(); } - void SwEditShell::SetAttr( const SfxItemSet& rSet, sal_uInt16 nFlags, SwPaM* pPaM ) { SET_CURR_SHELL( this ); @@ -166,7 +157,4 @@ void SwEditShell::SetAttr( const SfxItemSet& rSet, sal_uInt16 nFlags, SwPaM* pPa EndAllAction(); } - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index e0dd05ebbd09..74b58a50c44e 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -273,8 +273,6 @@ SwTxtFmtColl* SwEditShell::GetPaMTxtFmtColl( SwPaM* pPaM ) const return NULL; } - - sal_Bool SwEditShell::GetCurFtn( SwFmtFtn* pFillFtn ) { // The cursor must be positioned on the current footnotes anchor: @@ -295,7 +293,6 @@ sal_Bool SwEditShell::GetCurFtn( SwFmtFtn* pFillFtn ) return 0 != pFtn; } - bool SwEditShell::SetCurFtn( const SwFmtFtn& rFillFtn ) { bool bChgd = false; @@ -313,7 +310,6 @@ bool SwEditShell::SetCurFtn( const SwFmtFtn& rFillFtn ) return bChgd; } - bool SwEditShell::HasFtns( bool bEndNotes ) const { const SwFtnIdxs &rIdxs = mpDoc->GetFtnIdxs(); @@ -326,7 +322,6 @@ bool SwEditShell::HasFtns( bool bEndNotes ) const return false; } - /// Give a List of all footnotes and their beginning texts sal_uInt16 SwEditShell::GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes ) { @@ -367,7 +362,6 @@ sal_uInt16 SwEditShell::GetSeqFtnList( SwSeqFldList& rList, bool bEndNotes ) return rList.Count(); } - /// Adjust left margin via object bar (similar to adjustment of numerations). bool SwEditShell::IsMoveLeftMargin( bool bRight, bool bModulus ) const { @@ -439,7 +433,6 @@ void SwEditShell::MoveLeftMargin( bool bRight, bool bModulus ) EndAllAction(); } - static inline sal_uInt16 lcl_SetScriptFlags( sal_uInt16 nType ) { sal_uInt16 nRet; @@ -524,7 +517,6 @@ static bool lcl_IsNoEndTxtAttrAtPos( const SwTxtNode& rTNd, xub_StrLen nPos, return bRet; } - /// returns the script type of the selection sal_uInt16 SwEditShell::GetScriptType() const { @@ -639,7 +631,6 @@ sal_uInt16 SwEditShell::GetScriptType() const return nRet; } - sal_uInt16 SwEditShell::GetCurLang() const { const SwPaM* pCrsr = GetCrsr(); diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index 62862fcfd157..2d7adb6e816b 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -96,7 +96,6 @@ void SwEditShell::DeleteSel( SwPaM& rPam, sal_Bool* pUndo ) rPam.DeleteMark(); } - long SwEditShell::Delete() { SET_CURR_SHELL( this ); @@ -331,6 +330,4 @@ sal_Bool SwEditShell::DelFullPara() return bRet; } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index a4b8903d96ec..612fdd5ff10b 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -32,24 +32,16 @@ #include <swundo.hxx> #include <docary.hxx> -/************************************* - * FormatColl - *************************************/ -// TXT - - SwTxtFmtColl& SwEditShell::GetDfltTxtFmtColl() const { return *((SwTxtFmtColl*) (GetDoc()->GetDfltTxtFmtColl())); } - sal_uInt16 SwEditShell::GetTxtFmtCollCount() const { return GetDoc()->GetTxtFmtColls()->size(); } - SwTxtFmtColl& SwEditShell::GetTxtFmtColl( sal_uInt16 nFmtColl) const { return *((*(GetDoc()->GetTxtFmtColls()))[nFmtColl]); @@ -78,7 +70,6 @@ void SwEditShell::SetTxtFmtColl( SwTxtFmtColl *pFmt, EndAllAction(); } - SwTxtFmtColl* SwEditShell::MakeTxtFmtColl(const String& rFmtCollName, SwTxtFmtColl* pParent) { @@ -93,12 +84,10 @@ SwTxtFmtColl* SwEditShell::MakeTxtFmtColl(const String& rFmtCollName, } - void SwEditShell::FillByEx(SwTxtFmtColl* pColl, sal_Bool bReset) { if( bReset ) { - // #i73790# - method renamed pColl->ResetAllFmtAttr(); } @@ -140,7 +129,4 @@ void SwEditShell::FillByEx(SwTxtFmtColl* pColl, sal_Bool bReset) } } - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx index 279d3d1d3722..503fa6f83936 100644 --- a/sw/source/core/edit/edfld.cxx +++ b/sw/source/core/edit/edfld.cxx @@ -164,7 +164,6 @@ void SwEditShell::RemoveFldType(sal_uInt16 nResId, const String& rStr) } } - void SwEditShell::FieldToText( SwFieldType* pType ) { if( !pType->GetDepends() ) @@ -251,7 +250,6 @@ SwField* SwEditShell::GetCurFld() const return pCurFld; } - /// Are the PaMs positioned on fields? static SwTxtFld* lcl_FindInputFld( SwDoc* pDoc, SwField& rFld ) { @@ -280,7 +278,6 @@ void SwEditShell::UpdateFlds( SwField &rFld ) SET_CURR_SHELL( this ); StartAllAction(); { - // // If there are no selections so take the value of the current cursor position. SwMsgPoolItem* pMsgHnt = 0; SwRefMarkFldUpdate aRefMkHt( GetOut() ); @@ -420,7 +417,6 @@ void SwEditShell::UnlockExpFlds() GetDoc()->UnlockExpFlds(); } - void SwEditShell::SetFldUpdateFlags( SwFldUpdateFlags eFlags ) { getIDocumentSettingAccess()->setFieldUpdateFlags( eFlags ); diff --git a/sw/source/core/edit/edfldexp.cxx b/sw/source/core/edit/edfldexp.cxx index 290666c61688..b7a0d6a3e695 100644 --- a/sw/source/core/edit/edfldexp.cxx +++ b/sw/source/core/edit/edfldexp.cxx @@ -79,5 +79,4 @@ sal_Bool SwEditShell::IsFieldDataSourceAvailable(String& rUsedDataSource) const return sal_True; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx index f85243cac67b..502cc309ae11 100644 --- a/sw/source/core/edit/edfmt.cxx +++ b/sw/source/core/edit/edfmt.cxx @@ -28,25 +28,16 @@ #include "ndtxt.hxx" // for GetXXXFmt #include "hints.hxx" -/************************************* - * Formate - *************************************/ -// Char -// OPT: inline - - sal_uInt16 SwEditShell::GetCharFmtCount() const { return GetDoc()->GetCharFmts()->size(); } - SwCharFmt& SwEditShell::GetCharFmt(sal_uInt16 nFmt) const { return *((*(GetDoc()->GetCharFmts()))[nFmt]); } - SwCharFmt* SwEditShell::GetCurCharFmt() const { SwCharFmt *pFmt = 0; @@ -60,12 +51,10 @@ SwCharFmt* SwEditShell::GetCurCharFmt() const return pFmt; } - void SwEditShell::FillByEx(SwCharFmt* pCharFmt, sal_Bool bReset) { if ( bReset ) { - // #i73790# - method renamed pCharFmt->ResetAllFmtAttr(); } @@ -114,7 +103,6 @@ void SwEditShell::FillByEx(SwCharFmt* pCharFmt, sal_Bool bReset) pCharFmt->SetFmtAttr( *pCNd->GetpSwAttrSet() ); } -// Frm sal_uInt16 SwEditShell::GetTblFrmFmtCount(bool bUsed) const { return GetDoc()->GetTblFrmFmtCount(bUsed); @@ -130,7 +118,6 @@ String SwEditShell::GetUniqueTblName() const return GetDoc()->GetUniqueTblName(); } - SwCharFmt* SwEditShell::MakeCharFmt( const String& rName, SwCharFmt* pDerivedFrom ) { @@ -140,29 +127,22 @@ SwCharFmt* SwEditShell::MakeCharFmt( const String& rName, return GetDoc()->MakeCharFmt( rName, pDerivedFrom ); } -//---------------------------------- -// inlines in product - - SwTxtFmtColl* SwEditShell::GetTxtCollFromPool( sal_uInt16 nId ) { return GetDoc()->GetTxtCollFromPool( nId ); } - /// return the requested automatic format - base-class ! SwFmt* SwEditShell::GetFmtFromPool( sal_uInt16 nId ) { return GetDoc()->GetFmtFromPool( nId ); } - SwPageDesc* SwEditShell::GetPageDescFromPool( sal_uInt16 nId ) { return GetDoc()->GetPageDescFromPool( nId ); } - bool SwEditShell::IsUsed( const SwModify& rModify ) const { return mpDoc->IsUsed( rModify ); diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx index b1be2890a680..b19b83938ec4 100644 --- a/sw/source/core/edit/edglbldc.cxx +++ b/sw/source/core/edit/edglbldc.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <doc.hxx> #include <IDocumentUndoRedo.hxx> #include <editsh.hxx> @@ -30,7 +29,6 @@ #include <doctxm.hxx> #include <edglbldc.hxx> - sal_Bool SwEditShell::IsGlobalDoc() const { return getIDocumentSettingAccess()->get(IDocumentSettingAccess::GLOBAL_DOCUMENT); diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx index d769b9b56482..af1f793017db 100644 --- a/sw/source/core/edit/edglss.cxx +++ b/sw/source/core/edit/edglss.cxx @@ -335,8 +335,4 @@ sal_Bool SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk ) return sal_True; } - - - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index cad1fd9f92ff..f4521a385ece 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <hintids.hxx> #include <vcl/cmdevt.hxx> #include <unotools/charclass.hxx> @@ -61,12 +60,6 @@ using namespace com::sun::star; - -/****************************************************************************** - * void SwEditShell::Insert(char c) - ******************************************************************************/ - - void SwEditShell::Insert( sal_Unicode c, sal_Bool bOnlyCurrCrsr ) { StartAllAction(); @@ -85,12 +78,6 @@ void SwEditShell::Insert( sal_Unicode c, sal_Bool bOnlyCurrCrsr ) EndAllAction(); } - -/****************************************************************************** - * void SwEditShell::Insert(const String &rStr) - ******************************************************************************/ - - void SwEditShell::Insert2(const String &rStr, const bool bForceExpandHints ) { StartAllAction(); @@ -170,12 +157,6 @@ void SwEditShell::Insert2(const String &rStr, const bool bForceExpandHints ) EndAllAction(); } - -/****************************************************************************** - * void SwEditShell::Overwrite(const String &rStr) - ******************************************************************************/ - - void SwEditShell::Overwrite(const String &rStr) { StartAllAction(); @@ -189,11 +170,6 @@ void SwEditShell::Overwrite(const String &rStr) EndAllAction(); } - -/****************************************************************************** - * long SwEditShell::SplitNode() - ******************************************************************************/ - long SwEditShell::SplitNode( sal_Bool bAutoFormat, sal_Bool bCheckTableStart ) { StartAllAction(); @@ -345,14 +321,12 @@ void SwEditShell::GetGrfNms( String* pGrfName, String* pFltName, } } - const PolyPolygon *SwEditShell::GetGraphicPolygon() const { SwNoTxtNode *pNd = GetCrsr()->GetNode()->GetNoTxtNode(); return pNd->HasContour(); } - void SwEditShell::SetGraphicPolygon( const PolyPolygon *pPoly ) { SwNoTxtNode *pNd = GetCrsr()->GetNode()->GetNoTxtNode(); @@ -401,7 +375,6 @@ svt::EmbeddedObjectRef& SwEditShell::GetOLEObject() const return rOObj.GetObject(); } - sal_Bool SwEditShell::HasOLEObj( const String &rName ) const { SwStartNode *pStNd; @@ -420,7 +393,6 @@ sal_Bool SwEditShell::HasOLEObj( const String &rName ) const return sal_False; } - void SwEditShell::SetChartName( const String &rName ) { SwOLENode *pONd = GetCrsr()->GetNode()->GetOLENode(); @@ -450,11 +422,6 @@ String SwEditShell::GetCurWord() return aString; } -/**************************************************************************** - * void SwEditShell::UpdateDocStat() - ****************************************************************************/ - - void SwEditShell::UpdateDocStat( ) { StartAllAction(); @@ -484,11 +451,6 @@ sal_uInt16 SwEditShell::GetRefMarks( std::vector<OUString>* pStrings ) const return GetDoc()->GetRefMarks( pStrings ); } -/****************************************************************************** - * DropCap-SS - ******************************************************************************/ - - String SwEditShell::GetDropTxt( const sal_uInt16 nChars ) const { /* @@ -554,7 +516,6 @@ void SwEditShell::ReplaceDropTxt( const String &rStr, SwPaM* pPaM ) } } - String SwEditShell::Calculate() { String aFormel; // the final formula @@ -621,13 +582,11 @@ String SwEditShell::Calculate() return aCalc.GetStrResult( aCalc.Calculate(aFormel) ); } - sfx2::LinkManager& SwEditShell::GetLinkManager() { return mpDoc->GetLinkManager(); } - void *SwEditShell::GetIMapInventor() const { // The node on which the cursor points should be sufficient as a unique identifier @@ -635,7 +594,6 @@ void *SwEditShell::GetIMapInventor() const } // #i73788# -// remove default parameter, because method is always called this default value Graphic SwEditShell::GetIMapGraphic() const { // returns always a graphic if the cursor is in a Fly @@ -672,7 +630,6 @@ Graphic SwEditShell::GetIMapGraphic() const return aRet; } - sal_Bool SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, sal_Bool bKeepSelection ) { // URL and hint text (directly or via selection) necessary @@ -727,7 +684,6 @@ sal_Bool SwEditShell::InsertURL( const SwFmtINetFmt& rFmt, const String& rStr, s return sal_True; } - sal_uInt16 SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr ) { rArr.clear(); @@ -795,6 +751,7 @@ sal_Bool SwEditShell::RemoveInvisibleContent() EndAllAction(); return bRet; } + bool SwEditShell::ConvertFieldsToText() { StartAllAction(); @@ -802,6 +759,7 @@ bool SwEditShell::ConvertFieldsToText() EndAllAction(); return bRet; } + void SwEditShell::SetNumberingRestart() { StartAllAction(); @@ -872,7 +830,6 @@ void SwEditShell::SetNumberingRestart() } } - Pop(sal_False); EndAllAction(); } @@ -950,7 +907,6 @@ long SwEditShell::MergeDoc( const SwDoc& rDoc ) return nRet; } - const SwFtnInfo& SwEditShell::GetFtnInfo() const { return GetDoc()->GetFtnInfo(); @@ -1123,5 +1079,4 @@ void SwEditShell::ApplyViewOptions( const SwViewOption &rOpt ) SwEditShell::EndAction(); } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index d36fa391d7a1..8cfc4e664726 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <com/sun/star/linguistic2/ProofreadingResult.hpp> #include <com/sun/star/linguistic2/XProofreader.hpp> #include <com/sun/star/linguistic2/XProofreadingIterator.hpp> @@ -63,10 +62,6 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::linguistic2; -/************************************************************************* - * class SwLinguIter - *************************************************************************/ - class SwLinguIter { SwEditShell *pSh; @@ -101,10 +96,6 @@ public: void _End(bool bRestoreSelection = true); }; -/************************************************************************* - * class SwSpellIter - *************************************************************************/ - // #i18881# to be able to identify the postions of the changed words // the content positions of each portion need to be saved struct SpellContentPosition @@ -112,7 +103,9 @@ struct SpellContentPosition sal_uInt16 nLeft; sal_uInt16 nRight; }; + typedef std::vector<SpellContentPosition> SpellContentPositions; + class SwSpellIter : public SwLinguIter { uno::Reference< XSpellChecker1 > xSpeller; @@ -159,10 +152,6 @@ public: uno::Any Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ); }; -/************************************************************************* - * class SwHyphIter - *************************************************************************/ - class SwHyphIter : public SwLinguIter { sal_Bool bOldIdle; @@ -192,22 +181,12 @@ static SwHyphIter* pHyphIter = 0; const SwTxtNode *pLinguNode; SwTxtFrm *pLinguFrm; -/************************************************************************* - * SwLinguIter::SwLinguIter - *************************************************************************/ - SwLinguIter::SwLinguIter() : pSh( 0 ), pStart( 0 ), pEnd( 0 ), pCurr( 0 ), pCurrX( 0 ) { // TODO missing: ensurance of re-entrance, OSL_ENSURE( etc. } -/************************************************************************* - * SwLinguIter::Start - *************************************************************************/ - - - void SwLinguIter::_Start( SwEditShell *pShell, SwDocPositions eStart, SwDocPositions eEnd ) { @@ -269,12 +248,6 @@ void SwLinguIter::_Start( SwEditShell *pShell, SwDocPositions eStart, pLinguNode = 0; } -/************************************************************************* - * SwLinguIter::End - *************************************************************************/ - - - void SwLinguIter::_End(bool bRestoreSelection) { if( !pSh ) @@ -297,12 +270,6 @@ void SwLinguIter::_End(bool bRestoreSelection) pSh = 0; } -/************************************************************************* - * virtual SwSpellIter::Start() - *************************************************************************/ - - - void SwSpellIter::Start( SwEditShell *pShell, SwDocPositions eStart, SwDocPositions eEnd ) { @@ -373,12 +340,6 @@ uno::Any SwSpellIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) return aSpellRet; } -/************************************************************************* - * virtual SwConvIter::Start() - *************************************************************************/ - - - void SwConvIter::Start( SwEditShell *pShell, SwDocPositions eStart, SwDocPositions eEnd ) { @@ -387,10 +348,6 @@ void SwConvIter::Start( SwEditShell *pShell, SwDocPositions eStart, _Start( pShell, eStart, eEnd ); } -/************************************************************************* - * SwConvIter::Continue - *************************************************************************/ - uno::Any SwConvIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) { //!! @@ -450,12 +407,6 @@ uno::Any SwConvIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) return makeAny( aConvText ); } - -/************************************************************************* - * SwHyphIter - *************************************************************************/ - - sal_Bool SwHyphIter::IsAuto() { uno::Reference< beans::XPropertySet > xProp( ::GetLinguPropertySet() ); @@ -464,7 +415,6 @@ sal_Bool SwHyphIter::IsAuto() : sal_False; } - void SwHyphIter::ShowSelection() { SwEditShell *pMySh = GetSh(); @@ -477,12 +427,6 @@ void SwHyphIter::ShowSelection() } } -/************************************************************************* - * virtual SwHyphIter::Start() - *************************************************************************/ - - - void SwHyphIter::Start( SwEditShell *pShell, SwDocPositions eStart, SwDocPositions eEnd ) { // robust @@ -507,10 +451,6 @@ void SwHyphIter::End() _End(); } -/************************************************************************* - * SwHyphIter::Continue - *************************************************************************/ - uno::Any SwHyphIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) { uno::Any aHyphRet; @@ -581,10 +521,6 @@ void SwHyphIter::Ignore() pCrsr->SetMark(); } -/************************************************************************* - * SwHyphIter::DelSoftHyph - *************************************************************************/ - void SwHyphIter::DelSoftHyph( SwPaM &rPam ) { const SwPosition* pStt = rPam.Start(); @@ -594,11 +530,6 @@ void SwHyphIter::DelSoftHyph( SwPaM &rPam ) pNode->DelSoftHyph( nStart, nEnd ); } -/************************************************************************* - * SwHyphIter::InsertSoftHyph - *************************************************************************/ - - void SwHyphIter::InsertSoftHyph( const xub_StrLen nHyphPos ) { SwEditShell *pMySh = GetSh(); @@ -654,28 +585,16 @@ bool SwEditShell::HasLastSentenceGotGrammarChecked() const return bTextWasGrammarChecked; } -/************************************************************************* - * SwEditShell::HasConvIter - *************************************************************************/ - sal_Bool SwEditShell::HasConvIter() const { return 0 != pConvIter; } -/************************************************************************* - * SwEditShell::HasHyphIter - *************************************************************************/ - sal_Bool SwEditShell::HasHyphIter() const { return 0 != pHyphIter; } -/************************************************************************* - * SwEditShell::SetFindRange - *************************************************************************/ - void SwEditShell::SetLinguRange( SwDocPositions eStart, SwDocPositions eEnd ) { SwPaM *pCrsr = GetCrsr(); @@ -684,10 +603,6 @@ void SwEditShell::SetLinguRange( SwDocPositions eStart, SwDocPositions eEnd ) pCrsr->Exchange(); } -/************************************************************************* - * SwEditShell::SpellStart - *************************************************************************/ - void SwEditShell::SpellStart( SwDocPositions eStart, SwDocPositions eEnd, SwDocPositions eCurr, SwConversionArgs *pConvArgs ) @@ -727,10 +642,6 @@ void SwEditShell::SpellStart( pConvIter->Start( this, eStart, eEnd ); } -/************************************************************************* - * SwEditShell::SpellEnd - *************************************************************************/ - void SwEditShell::SpellEnd( SwConversionArgs *pConvArgs, bool bRestoreSelection ) { if (!pConvArgs && pSpellIter && pSpellIter->GetSh() == this) @@ -794,9 +705,6 @@ uno::Any SwEditShell::SpellContinue( } return aRes; } -/************************************************************************* - * SwEditShell::HyphStart - *************************************************************************/ /* Interactive Hyphenation (BP 10.03.93) * @@ -821,9 +729,6 @@ uno::Any SwEditShell::SpellContinue( * 4) HyphEnd * - Restore old cursor, EndAction */ - - - void SwEditShell::HyphStart( SwDocPositions eStart, SwDocPositions eEnd ) { // do not hyphenate if interactive hyphenationg is active elsewhere @@ -1018,8 +923,6 @@ uno::Reference< XSpellAlternatives > return xSpellAlt; } - - bool SwEditShell::GetGrammarCorrection( linguistic2::ProofreadingResult /*out*/ &rResult, // the complete result sal_Int32 /*out*/ &rErrorPosInText, // offset of error position in string that was grammar checked... @@ -1194,7 +1097,6 @@ void SwEditShell::MoveContinuationPosToEndOfCheckedSentence() } } - void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck) { // Note: rNewPortions.size() == 0 is valid and happens when the whole @@ -1837,5 +1739,4 @@ void SwEditShell::IgnoreGrammarErrorAt( SwPaM& rErrorPosition ) } } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index 8c5eedaeede7..fe5d91a3909e 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -27,7 +27,6 @@ #include <swundo.hxx> #include <numrule.hxx> - SwPamRanges::SwPamRanges( const SwPaM& rRing ) { const SwPaM* pTmp = &rRing; @@ -36,7 +35,6 @@ SwPamRanges::SwPamRanges( const SwPaM& rRing ) } while( &rRing != ( pTmp = (const SwPaM*)pTmp->GetNext() )); } - void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 ) { SwPamRange aRg( rIdx1.GetIndex(), rIdx2.GetIndex() ); @@ -98,8 +96,6 @@ void SwPamRanges::Insert( const SwNodeIndex& rIdx1, const SwNodeIndex& rIdx2 ) _SwPamRanges::insert( aRg ); } - - SwPaM& SwPamRanges::SetPam( sal_uInt16 nArrPos, SwPaM& rPam ) { OSL_ASSERT( nArrPos < Count() ); @@ -121,7 +117,6 @@ void SwEditShell::SetOutlineNumRule(const SwNumRule& rRule) EndAllAction(); } - const SwNumRule* SwEditShell::GetOutlineNumRule() const { return GetDoc()->GetOutlineNumRule(); @@ -231,11 +226,11 @@ sal_Bool SwEditShell::SelectionHasBullet() const } } } - } return bResult; } + // -> #i29560# sal_Bool SwEditShell::HasNumber() const { @@ -335,6 +330,7 @@ bool SwEditShell::NumUpDown( bool bDown ) EndAllAction(); return bRet; } + // -> #i23726# bool SwEditShell::IsFirstOfNumRule() const { @@ -356,10 +352,7 @@ bool SwEditShell::IsFirstOfNumRule(const SwPaM & rPaM) const } // <- #i23726# -// -> #i23725# -// #i90078# -// Remove unused default parameter <nLevel> and <bRelative>. -// Adjust method name and parameter name +// -> #i23725#, #i90078# void SwEditShell::ChangeIndentOfAllListLevels( short nDiff ) { StartAllAction(); @@ -380,7 +373,6 @@ void SwEditShell::ChangeIndentOfAllListLevels( short nDiff ) } // #i90078# -// Adjust method name void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos) { StartAllAction(); @@ -392,8 +384,6 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos) SwPaM aPaM(rPos); SwTxtNode * pTxtNode = aPaM.GetNode()->GetTxtNode(); - // #i90078# - SwNumRule aRule(*pCurNumRule); if ( IsFirstOfNumRule() ) @@ -435,7 +425,6 @@ bool SwEditShell::MoveParagraph( long nOffset ) return bRet; } -//#outline level add by zhaojianwei int SwEditShell::GetCurrentParaOutlineLevel( ) const { int nLevel = 0; @@ -446,7 +435,6 @@ int SwEditShell::GetCurrentParaOutlineLevel( ) const nLevel = pTxtNd->GetAttrOutlineLevel(); return nLevel; } -//<-end,zhaojianwei void SwEditShell::GetCurrentOutlineLevels( sal_uInt8& rUpper, sal_uInt8& rLower ) { @@ -575,7 +563,6 @@ bool SwEditShell::OutlineUpDown( short nOffset ) return bRet; } - bool SwEditShell::MoveOutlinePara( short nOffset ) { StartAllAction(); @@ -658,7 +645,6 @@ sal_Bool SwEditShell::IsOutlineCopyable( sal_uInt16 nIdx ) const return lcl_IsOutlineMoveAndCopyable( GetDoc(), nIdx, true ); } - bool SwEditShell::NumOrNoNum( sal_Bool bNumOn, bool bChkStart ) { bool bRet = false; @@ -696,7 +682,7 @@ sal_Bool SwEditShell::IsNoNum( sal_Bool bChkStart ) const sal_uInt8 SwEditShell::GetNumLevel() const { // return current level where the point of the cursor is - sal_uInt8 nLevel = MAXLEVEL; //end,zhaojianwei + sal_uInt8 nLevel = MAXLEVEL; SwPaM* pCrsr = GetCrsr(); const SwTxtNode* pTxtNd = pCrsr->GetNode()->GetTxtNode(); diff --git a/sw/source/core/edit/edredln.cxx b/sw/source/core/edit/edredln.cxx index 4165e4c26ed6..966255b898a1 100644 --- a/sw/source/core/edit/edredln.cxx +++ b/sw/source/core/edit/edredln.cxx @@ -26,7 +26,6 @@ #include "edimp.hxx" #include "frmtool.hxx" - sal_uInt16 SwEditShell::GetRedlineMode() const { return GetDoc()->GetRedlineMode(); @@ -136,6 +135,4 @@ sal_uInt16 SwEditShell::FindRedlineOfData( const SwRedlineData& rData ) const return USHRT_MAX; } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index f767c4da32d0..f9b8af0e27e0 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <editsh.hxx> #include <doc.hxx> #include <IDocumentUndoRedo.hxx> @@ -55,7 +54,6 @@ SwEditShell::InsertSection( return pRet; } - sal_Bool SwEditShell::IsInsRegionAvailable() const { if( IsTableMode() ) @@ -69,7 +67,6 @@ sal_Bool SwEditShell::IsInsRegionAvailable() const return sal_True; } - const SwSection* SwEditShell::GetCurrSection() const { if( IsTableMode() ) @@ -82,7 +79,6 @@ const SwSection* SwEditShell::GetCurrSection() const * * In footnotes it may not be the area within the footnote. */ - const SwSection* SwEditShell::GetAnySection( sal_Bool bOutOfTab, const Point* pPt ) const { SwFrm *pFrm; @@ -118,7 +114,6 @@ sal_uInt16 SwEditShell::GetSectionFmtCount() const return GetDoc()->GetSections().size(); } - sal_Bool SwEditShell::IsAnySectionInDoc( sal_Bool bChkReadOnly, sal_Bool bChkHidden, sal_Bool bChkTOX ) const { const SwSectionFmts& rFmts = GetDoc()->GetSections(); @@ -155,7 +150,6 @@ const SwSectionFmt& SwEditShell::GetSectionFmt( sal_uInt16 nFmt ) const return *GetDoc()->GetSections()[ nFmt ]; } - void SwEditShell::DelSectionFmt( sal_uInt16 nFmt ) { StartAllAction(); @@ -165,7 +159,6 @@ void SwEditShell::DelSectionFmt( sal_uInt16 nFmt ) EndAllAction(); } - void SwEditShell::UpdateSection(sal_uInt16 const nSect, SwSectionData & rNewData, SfxItemSet const*const pAttr) { @@ -320,7 +313,6 @@ static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos) OSL_ENSURE( pCurrentPos != NULL, "Strange, we have no position!" ); const SwNode& rCurrentNode = pCurrentPos->nNode.GetNode(); - // find innermost section or table. At the end of this scope, // pInntermostNode contain the section/table before/after which we should // insert our empty paragraph, or it will be NULL if none is found. @@ -391,14 +383,12 @@ static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos) pReturn = pInnermostNode; } - OSL_ENSURE( ( pReturn == NULL ) || pReturn->IsStartNode() || pReturn->IsEndNode(), "SpecialInsertNode failed" ); return pReturn; } - /** a node can be special-inserted (alt-Enter) whenever lcl_SpecialInsertNode finds a suitable position */ diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx index 1c6dbef2bd18..1526496a1c80 100644 --- a/sw/source/core/edit/edtab.cxx +++ b/sw/source/core/edit/edtab.cxx @@ -21,7 +21,6 @@ #include <hintids.hxx> #include <hints.hxx> - #include <vcl/svapp.hxx> #include <vcl/window.hxx> #include <editeng/boxitem.hxx> @@ -88,6 +87,7 @@ sal_Bool ConvertTableToText( const SwTableNode *pConstTableNode, sal_Unicode cCh return pTableNode->GetDoc()->TableToText( pTableNode, cCh ); } //End for bug #i119954# + const SwTable& SwEditShell::InsertTable( const SwInsertTableOptions& rInsTblOpts, sal_uInt16 nRows, sal_uInt16 nCols, sal_Int16 eAdj, diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index f91912903989..426ec63d819a 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <com/sun/star/util/SearchOptions.hpp> #include <com/sun/star/util/SearchFlags.hpp> #include <com/sun/star/i18n/TransliterationModules.hpp> @@ -79,8 +78,6 @@ void SwEditShell::Insert(const SwTOXMark& rMark) EndAllAction(); } - - void SwEditShell::DeleteTOXMark( SwTOXMark* pMark ) { SET_CURR_SHELL( this ); @@ -224,7 +221,6 @@ sal_uInt16 SwEditShell::GetTOIKeys( SwTOIKeyType eTyp, std::vector<String>& rArr return GetDoc()->GetTOIKeys( eTyp, rArr ); } - sal_uInt16 SwEditShell::GetTOXCount() const { const SwSectionFmts& rFmts = GetDoc()->GetSections(); @@ -239,7 +235,6 @@ sal_uInt16 SwEditShell::GetTOXCount() const return nRet; } - const SwTOXBase* SwEditShell::GetTOX( sal_uInt16 nPos ) const { const SwSectionFmts& rFmts = GetDoc()->GetSections(); @@ -263,7 +258,6 @@ void SwEditShell::SetUpdateTOX( sal_Bool bFlag ) GetDoc()->SetUpdateTOX( bFlag ); } - sal_Bool SwEditShell::IsUpdateTOX() const { return GetDoc()->IsUpdateTOX(); @@ -313,9 +307,7 @@ void SwEditShell::ApplyAutoMark() Push(); rtl_TextEncoding eChrSet = ::osl_getThreadTextEncoding(); - // // SearchOptions to be used in loop below - // bool bCaseSensitive = true; bool bWordOnly = false; bool bSrchInSel = false; @@ -426,6 +418,4 @@ void SwEditShell::ApplyAutoMark() EndAllAction(); } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/edit/edundo.cxx b/sw/source/core/edit/edundo.cxx index 09537fe460da..79fc76a1fa28 100644 --- a/sw/source/core/edit/edundo.cxx +++ b/sw/source/core/edit/edundo.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <svx/svdview.hxx> #include <editsh.hxx> @@ -34,7 +33,6 @@ #include <docsh.hxx> #include <pagefrm.hxx> - /** helper function to select all objects in an SdrMarkList; * implementation: see below */ static void lcl_SelectSdrMarkList( SwEditShell* pShell, @@ -42,7 +40,6 @@ static void lcl_SelectSdrMarkList( SwEditShell* pShell, bool SwEditShell::CursorsLocked() const { - return GetDoc()->GetDocShell()->GetModel()->hasControllersLocked(); } @@ -201,7 +198,6 @@ bool SwEditShell::Redo(sal_uInt16 const nCount) return bRet; } - bool SwEditShell::Repeat(sal_uInt16 const nCount) { SET_CURR_SHELL( this ); @@ -223,7 +219,6 @@ bool SwEditShell::Repeat(sal_uInt16 const nCount) return bRet; } - static void lcl_SelectSdrMarkList( SwEditShell* pShell, const SdrMarkList* pSdrMarkList ) { diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx index 0c646f9aff2f..acf268eae8f4 100644 --- a/sw/source/core/edit/edws.cxx +++ b/sw/source/core/edit/edws.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <vcl/window.hxx> #include <editsh.hxx> @@ -37,42 +36,25 @@ SwEditShell::SwEditShell( SwEditShell& rEdSH, Window *pWindow ) { } -// ctor/dtor - - SwEditShell::SwEditShell( SwDoc& rDoc, Window *pWindow, const SwViewOption *pOptions ) : SwCrsrShell( rDoc, pWindow, pOptions ) { GetDoc()->GetIDocumentUndoRedo().DoUndo(true); } - SwEditShell::~SwEditShell() // USED { } -/****************************************************************************** - * sal_Bool SwEditShell::IsModified() const - ******************************************************************************/ - - sal_Bool SwEditShell::IsModified() const { return GetDoc()->IsModified(); } -/****************************************************************************** - * void SwEditShell::SetModified() - ******************************************************************************/ - void SwEditShell::SetModified() { GetDoc()->SetModified(); } -/****************************************************************************** - * void SwEditShell::ResetModified() - ******************************************************************************/ - void SwEditShell::ResetModified() { @@ -85,11 +67,6 @@ void SwEditShell::SetUndoNoResetModified() GetDoc()->GetIDocumentUndoRedo().SetUndoNoResetModified(); } -/****************************************************************************** - * void SwEditShell::StartAllAction() - ******************************************************************************/ - - void SwEditShell::StartAllAction() { ViewShell *pSh = this; @@ -101,10 +78,6 @@ void SwEditShell::StartAllAction() pSh = (ViewShell *)pSh->GetNext(); } while(pSh != this); } -/****************************************************************************** - * void SwEditShell::EndAllAction() - ******************************************************************************/ - void SwEditShell::EndAllAction() { @@ -118,11 +91,6 @@ void SwEditShell::EndAllAction() } while(pSh != this); } -/****************************************************************************** - * void SwEditShell::CalcLayout() - ******************************************************************************/ - - void SwEditShell::CalcLayout() { StartAllAction(); @@ -161,9 +129,6 @@ sal_uInt16 SwEditShell::GetCntType() const return nRet; } -//------------------------------------------------------------------------------ - - sal_Bool SwEditShell::HasOtherCnt() const { @@ -192,20 +157,17 @@ SwActContext::SwActContext(SwEditShell *pShell) pSh->StartAction(); } - SwActContext::~SwActContext() { pSh->EndAction(); } - SwMvContext::SwMvContext(SwEditShell *pShell) : pSh(pShell) { pSh->SttCrsrMove(); } - SwMvContext::~SwMvContext() { pSh->EndCrsrMove(); @@ -223,14 +185,11 @@ sal_uInt16 SwEditShell::GetTOXTypeCount(TOXTypes eTyp) const return mpDoc->GetTOXTypeCount(eTyp); } - void SwEditShell::InsertTOXType(const SwTOXType& rTyp) { mpDoc->InsertTOXType(rTyp); } - - void SwEditShell::DoUndo( sal_Bool bOn ) { GetDoc()->GetIDocumentUndoRedo().DoUndo( bOn ); } @@ -273,7 +232,6 @@ SwUndoId SwEditShell::EndUndo(SwUndoId eUndoId, const SwRewriter *pRewriter) { return GetDoc()->GetIDocumentUndoRedo().EndUndo(eUndoId, pRewriter); } - bool SwEditShell::GetLastUndoInfo(OUString *const o_pStr, SwUndoId *const o_pId) const { return GetDoc()->GetIDocumentUndoRedo().GetLastUndoInfo(o_pStr, o_pId); } @@ -306,13 +264,11 @@ void SwEditShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Bool bInsert, EndAllAction(); } - void SwEditShell::SetNewDoc(sal_Bool bNew) { GetDoc()->SetNewDoc(bNew); } - sal_Bool SwEditShell::GetPrevAutoCorrWord( SvxAutoCorrect& rACorr, String& rWord ) { SET_CURR_SHELL( this ); @@ -337,6 +293,4 @@ SwAutoCompleteWord& SwEditShell::GetAutoCompleteWords() return SwDoc::GetAutoCompleteWords(); } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |