diff options
author | August Sodora <augsod@gmail.com> | 2011-11-26 14:31:55 -0500 |
---|---|---|
committer | August Sodora <augsod@gmail.com> | 2011-11-26 14:31:55 -0500 |
commit | f04882ba6a6d58ee45aa509359747f3c607a863b (patch) | |
tree | 01b731809717d6f725bd9b5dc4fb91d19d5bd365 /svl | |
parent | 2554f7a543c68f4175b042f15bf0aa3df2ddd608 (diff) |
sal_Bool->bool
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/svl/lngmisc.hxx | 10 | ||||
-rw-r--r-- | svl/source/misc/lngmisc.cxx | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/svl/inc/svl/lngmisc.hxx b/svl/inc/svl/lngmisc.hxx index 9d34083928a4..a473ab69f910 100644 --- a/svl/inc/svl/lngmisc.hxx +++ b/svl/inc/svl/lngmisc.hxx @@ -46,22 +46,22 @@ class String; namespace linguistic { -inline sal_Bool IsHyphen( sal_Unicode cChar ) +inline bool IsHyphen( sal_Unicode cChar ) { return cChar == SVT_SOFT_HYPHEN || cChar == SVT_HARD_HYPHEN; } -inline sal_Bool IsControlChar( sal_Unicode cChar ) +inline bool IsControlChar( sal_Unicode cChar ) { return cChar < static_cast<sal_Unicode>(' '); } SVL_DLLPRIVATE sal_Int32 GetNumControlChars( const rtl::OUString &rTxt ); -SVL_DLLPUBLIC sal_Bool RemoveHyphens( rtl::OUString &rTxt ); -SVL_DLLPUBLIC sal_Bool RemoveControlChars( rtl::OUString &rTxt ); +SVL_DLLPUBLIC bool RemoveHyphens( rtl::OUString &rTxt ); +SVL_DLLPUBLIC bool RemoveControlChars( rtl::OUString &rTxt ); -SVL_DLLPUBLIC sal_Bool ReplaceControlChars( rtl::OUString &rTxt, sal_Char aRplcChar = ' ' ); +SVL_DLLPUBLIC bool ReplaceControlChars( rtl::OUString &rTxt, sal_Char aRplcChar = ' ' ); SVL_DLLPUBLIC String GetThesaurusReplaceText( const String &rText ); diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx index f204f4bf8924..3c32099db5ee 100644 --- a/svl/source/misc/lngmisc.cxx +++ b/svl/source/misc/lngmisc.cxx @@ -56,7 +56,7 @@ sal_Int32 GetNumControlChars( const OUString &rTxt ) return nCnt; } -sal_Bool RemoveHyphens( OUString &rTxt ) +bool RemoveHyphens( OUString &rTxt ) { sal_Int32 n = rTxt.getLength(); rTxt = comphelper::string::remove(rTxt, SVT_SOFT_HYPHEN); @@ -64,9 +64,9 @@ sal_Bool RemoveHyphens( OUString &rTxt ) return n != rTxt.getLength(); } -sal_Bool RemoveControlChars( OUString &rTxt ) +bool RemoveControlChars( OUString &rTxt ) { - sal_Bool bModified = sal_False; + bool bModified = false; sal_Int32 nCtrlChars = GetNumControlChars( rTxt ); if (nCtrlChars) { @@ -86,7 +86,7 @@ sal_Bool RemoveControlChars( OUString &rTxt ) } DBG_ASSERT( nCnt == nSize, "wrong size" ); rTxt = aBuf.makeStringAndClear(); - bModified = sal_True; + bModified = true; } return bModified; } @@ -95,13 +95,13 @@ sal_Bool RemoveControlChars( OUString &rTxt ) // non breaking field character #define CH_TXTATR_INWORD ((sal_Char) 0x02) -sal_Bool ReplaceControlChars( rtl::OUString &rTxt, sal_Char /*aRplcChar*/ ) +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 ' ' - sal_Bool bModified = sal_False; + bool bModified = false; sal_Int32 nCtrlChars = GetNumControlChars( rTxt ); if (nCtrlChars) { @@ -121,7 +121,7 @@ sal_Bool ReplaceControlChars( rtl::OUString &rTxt, sal_Char /*aRplcChar*/ ) } aBuf.setLength( nCnt ); rTxt = aBuf.makeStringAndClear(); - bModified = sal_True; + bModified = true; } return bModified; } |