diff options
Diffstat (limited to 'sw/source/core/edit/autofmt.cxx')
-rw-r--r-- | sw/source/core/edit/autofmt.cxx | 41 |
1 files changed, 0 insertions, 41 deletions
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 ); |