diff options
Diffstat (limited to 'svl/source/misc/lngmisc.cxx')
-rw-r--r-- | svl/source/misc/lngmisc.cxx | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx index 2203cc08458e..0cbd5d747882 100644 --- a/svl/source/misc/lngmisc.cxx +++ b/svl/source/misc/lngmisc.cxx @@ -42,11 +42,11 @@ namespace linguistic /////////////////////////////////////////////////////////////////////////// -INT32 GetNumControlChars( const OUString &rTxt ) +sal_Int32 GetNumControlChars( const OUString &rTxt ) { - INT32 nCnt = 0; - INT32 nLen = rTxt.getLength(); - for (INT32 i = 0; i < nLen; ++i) + sal_Int32 nCnt = 0; + sal_Int32 nLen = rTxt.getLength(); + for (sal_Int32 i = 0; i < nLen; ++i) { if (IsControlChar( rTxt[i] )) ++nCnt; @@ -55,33 +55,33 @@ INT32 GetNumControlChars( const OUString &rTxt ) } -BOOL RemoveHyphens( OUString &rTxt ) +sal_Bool RemoveHyphens( OUString &rTxt ) { - BOOL bModified = FALSE; + sal_Bool bModified = sal_False; if (HasHyphens( rTxt )) { String aTmp( rTxt ); aTmp.EraseAllChars( SVT_SOFT_HYPHEN ); aTmp.EraseAllChars( SVT_HARD_HYPHEN ); rTxt = aTmp; - bModified = TRUE; + bModified = sal_True; } return bModified; } -BOOL RemoveControlChars( OUString &rTxt ) +sal_Bool RemoveControlChars( OUString &rTxt ) { - BOOL bModified = FALSE; - INT32 nCtrlChars = GetNumControlChars( rTxt ); + sal_Bool bModified = sal_False; + sal_Int32 nCtrlChars = GetNumControlChars( rTxt ); if (nCtrlChars) { - INT32 nLen = rTxt.getLength(); - INT32 nSize = nLen - nCtrlChars; + sal_Int32 nLen = rTxt.getLength(); + sal_Int32 nSize = nLen - nCtrlChars; OUStringBuffer aBuf( nSize ); aBuf.setLength( nSize ); - INT32 nCnt = 0; - for (INT32 i = 0; i < nLen; ++i) + sal_Int32 nCnt = 0; + for (sal_Int32 i = 0; i < nLen; ++i) { sal_Unicode cChar = rTxt[i]; if (!IsControlChar( cChar )) @@ -92,7 +92,7 @@ BOOL RemoveControlChars( OUString &rTxt ) } DBG_ASSERT( nCnt == nSize, "wrong size" ); rTxt = aBuf.makeStringAndClear(); - bModified = TRUE; + bModified = sal_True; } return bModified; } @@ -101,20 +101,20 @@ BOOL RemoveControlChars( OUString &rTxt ) // non breaking field character #define CH_TXTATR_INWORD ((sal_Char) 0x02) -BOOL ReplaceControlChars( rtl::OUString &rTxt, sal_Char /*aRplcChar*/ ) +sal_Bool ReplaceControlChars( rtl::OUString &rTxt, sal_Char /*aRplcChar*/ ) { // the resulting string looks like this: // 1. non breaking field characters get removed // 2. remaining control characters will be replaced by ' ' - BOOL bModified = FALSE; - INT32 nCtrlChars = GetNumControlChars( rTxt ); + sal_Bool bModified = sal_False; + sal_Int32 nCtrlChars = GetNumControlChars( rTxt ); if (nCtrlChars) { - INT32 nLen = rTxt.getLength(); + sal_Int32 nLen = rTxt.getLength(); OUStringBuffer aBuf( nLen ); - INT32 nCnt = 0; - for (INT32 i = 0; i < nLen; ++i) + sal_Int32 nCnt = 0; + for (sal_Int32 i = 0; i < nLen; ++i) { sal_Unicode cChar = rTxt[i]; if (CH_TXTATR_INWORD != cChar) @@ -127,7 +127,7 @@ BOOL ReplaceControlChars( rtl::OUString &rTxt, sal_Char /*aRplcChar*/ ) } aBuf.setLength( nCnt ); rTxt = aBuf.makeStringAndClear(); - bModified = TRUE; + bModified = sal_True; } return bModified; } |