[Libreoffice-commits] .: svl/inc svl/source
August Sodora
augsod at kemper.freedesktop.org
Sat Nov 26 11:32:04 PST 2011
svl/inc/svl/lngmisc.hxx | 10 +++++-----
svl/source/misc/lngmisc.cxx | 14 +++++++-------
2 files changed, 12 insertions(+), 12 deletions(-)
New commits:
commit f04882ba6a6d58ee45aa509359747f3c607a863b
Author: August Sodora <augsod at gmail.com>
Date: Sat Nov 26 14:31:55 2011 -0500
sal_Bool->bool
diff --git a/svl/inc/svl/lngmisc.hxx b/svl/inc/svl/lngmisc.hxx
index 9d34083..a473ab6 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 f204f4b..3c32099 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;
}
More information about the Libreoffice-commits
mailing list