From cb66ea3604ea441ddd03df706bb30e6063fb9a52 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 31 Mar 2014 14:35:18 +0200 Subject: linguistic: sal_Bool->bool Change-Id: Ie2366b25a1f81a5b25142e8b9a727bcc2f585c14 --- cui/source/dialogs/SpellDialog.cxx | 6 ++-- cui/source/options/optdict.cxx | 2 +- include/linguistic/hyphdta.hxx | 8 ++--- include/linguistic/lngprophelp.hxx | 48 ++++++++++++------------- include/linguistic/misc.hxx | 24 ++++++------- include/linguistic/spelldta.hxx | 4 +-- linguistic/source/convdic.cxx | 2 +- linguistic/source/lngprophelp.cxx | 64 +++++++++++++++++----------------- linguistic/source/misc.cxx | 62 ++++++++++++++++---------------- linguistic/source/misc2.cxx | 4 +-- linguistic/source/spelldsp.cxx | 6 ++-- linguistic/source/spelldta.cxx | 12 +++---- sw/source/core/uibase/lingu/olmenu.cxx | 4 +-- 13 files changed, 123 insertions(+), 123 deletions(-) diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index dda350523873..26b5909d5779 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -586,7 +586,7 @@ IMPL_LINK_NOARG(SpellDialog, ChangeAllHdl) SvxPrepareAutoCorrect( aOldWord, aString ); Reference aXDictionary( SvxGetChangeAllList(), UNO_QUERY ); sal_uInt8 nAdded = linguistic::AddEntryToDic( aXDictionary, - aOldWord , sal_True, + aOldWord, true, aString, eLang ); if(nAdded == DIC_ERR_NONE) @@ -635,7 +635,7 @@ IMPL_LINK( SpellDialog, IgnoreAllHdl, Button *, pButton ) { OUString sErrorText(m_pSentenceED->GetErrorText()); sal_uInt8 nAdded = linguistic::AddEntryToDic( aXDictionary, - sErrorText, sal_False, + sErrorText, false, OUString(), LANGUAGE_NONE ); if(nAdded == DIC_ERR_NONE) { @@ -917,7 +917,7 @@ int SpellDialog::AddToDictionaryExecute( sal_uInt16 nItemId, PopupMenu *pMenu ) sal_Int16 nAddRes = DIC_ERR_UNKNOWN; if (xDic.is()) { - nAddRes = linguistic::AddEntryToDic( xDic, aNewWord, sal_False, OUString(), LANGUAGE_NONE ); + nAddRes = linguistic::AddEntryToDic( xDic, aNewWord, false, OUString(), LANGUAGE_NONE ); // save modified user-dictionary if it is persistent uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY ); if (xSavDic.is()) diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index 6a060430121d..189a5114c02e 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -621,7 +621,7 @@ IMPL_LINK(SvxEditDictionaryDialog, NewDelHdl, PushButton*, pBtn) nAddRes = linguistic::AddEntryToDic( xDic, aNewWord, bIsNegEntry, - aRplcText, LanguageTag( xDic->getLocale() ).getLanguageType(), sal_False ); + aRplcText, LanguageTag( xDic->getLocale() ).getLanguageType(), false ); } } if (DIC_ERR_NONE != nAddRes) diff --git a/include/linguistic/hyphdta.hxx b/include/linguistic/hyphdta.hxx index 71aece26b929..820a3e3d421c 100644 --- a/include/linguistic/hyphdta.hxx +++ b/include/linguistic/hyphdta.hxx @@ -36,10 +36,10 @@ class HyphenatedWord : { OUString aWord; OUString aHyphenatedWord; - sal_Int16 nHyphPos; - sal_Int16 nHyphenationPos; - sal_Int16 nLanguage; - sal_Bool bIsAltSpelling; + sal_Int16 nHyphPos; + sal_Int16 nHyphenationPos; + sal_Int16 nLanguage; + bool bIsAltSpelling; // disallow copy-constructor and assignment-operator for now HyphenatedWord(const HyphenatedWord &); diff --git a/include/linguistic/lngprophelp.hxx b/include/linguistic/lngprophelp.hxx index 05e8d9d87e76..e0fb2aac1a87 100644 --- a/include/linguistic/lngprophelp.hxx +++ b/include/linguistic/lngprophelp.hxx @@ -68,12 +68,12 @@ class PropertyChgHelper : int nEvtFlags; // flags for event types allowed to be launched // default values - sal_Bool bIsIgnoreControlCharacters; - sal_Bool bIsUseDictionaryList; + bool bIsIgnoreControlCharacters; + bool bIsUseDictionaryList; // return values, will be set to default value or current temporary value - sal_Bool bResIsIgnoreControlCharacters; - sal_Bool bResIsUseDictionaryList; + bool bResIsIgnoreControlCharacters; + bool bResIsUseDictionaryList; // disallow use of copy-constructor and assignment-operator @@ -92,7 +92,7 @@ protected: void AddPropNames( const char *pNewNames[], sal_Int32 nCount ); - virtual sal_Bool propertyChange_Impl( + virtual bool propertyChange_Impl( const ::com::sun::star::beans::PropertyChangeEvent& rEvt ); public: @@ -143,8 +143,8 @@ public: ::com::sun::star::uno::XInterface > & GetEvtObj() const { return xMyEvtObj; } - sal_Bool IsIgnoreControlCharacters() const { return bResIsIgnoreControlCharacters; } - sal_Bool IsUseDictionaryList() const { return bResIsUseDictionaryList; } + bool IsIgnoreControlCharacters() const { return bResIsIgnoreControlCharacters; } + bool IsUseDictionaryList() const { return bResIsUseDictionaryList; } }; @@ -195,15 +195,15 @@ class LNG_DLLPUBLIC PropertyHelper_Spell : public PropertyChgHelper { // default values - sal_Bool bIsSpellUpperCase; - sal_Bool bIsSpellWithDigits; - sal_Bool bIsSpellCapitalization; + bool bIsSpellUpperCase; + bool bIsSpellWithDigits; + bool bIsSpellCapitalization; // return values, will be set to default value or current temporary value sal_Int16 nResMaxNumberOfSuggestions; // special value that is not part of the property set and thus needs to be handled differently - sal_Bool bResIsSpellUpperCase; - sal_Bool bResIsSpellWithDigits; - sal_Bool bResIsSpellCapitalization; + bool bResIsSpellUpperCase; + bool bResIsSpellWithDigits; + bool bResIsSpellCapitalization; // disallow use of copy-constructor and assignment-operator @@ -214,7 +214,7 @@ protected: // PropertyChgHelper virtual void SetDefaultValues() SAL_OVERRIDE; virtual void GetCurrentValues() SAL_OVERRIDE; - virtual sal_Bool propertyChange_Impl( + virtual bool propertyChange_Impl( const ::com::sun::star::beans::PropertyChangeEvent& rEvt ) SAL_OVERRIDE; public: @@ -235,9 +235,9 @@ public: virtual sal_Int16 GetDefaultNumberOfSuggestions() const; sal_Int16 GetMaxNumberOfSuggestions() const { return nResMaxNumberOfSuggestions; } - sal_Bool IsSpellUpperCase() const { return bResIsSpellUpperCase; } - sal_Bool IsSpellWithDigits() const { return bResIsSpellWithDigits; } - sal_Bool IsSpellCapitalization() const { return bResIsSpellCapitalization; } + bool IsSpellUpperCase() const { return bResIsSpellUpperCase; } + bool IsSpellWithDigits() const { return bResIsSpellWithDigits; } + bool IsSpellCapitalization() const { return bResIsSpellCapitalization; } }; @@ -260,15 +260,15 @@ public: void AddAsPropListener(); void RemoveAsPropListener(); - void SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals ); - sal_Bool IsSpellUpperCase() const; - sal_Bool IsSpellWithDigits() const; - sal_Bool IsSpellCapitalization() const; - sal_Bool addLinguServiceEventListener( + void SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals ); + bool IsSpellUpperCase() const; + bool IsSpellWithDigits() const; + bool IsSpellCapitalization() const; + bool addLinguServiceEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException); - sal_Bool removeLinguServiceEventListener( + bool removeLinguServiceEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException); @@ -296,7 +296,7 @@ protected: // PropertyChgHelper virtual void SetDefaultValues() SAL_OVERRIDE; virtual void GetCurrentValues() SAL_OVERRIDE; - virtual sal_Bool propertyChange_Impl( + virtual bool propertyChange_Impl( const ::com::sun::star::beans::PropertyChangeEvent& rEvt ) SAL_OVERRIDE; public: diff --git a/include/linguistic/misc.hxx b/include/linguistic/misc.hxx index 277d298d1c4d..84f4360a62ab 100644 --- a/include/linguistic/misc.hxx +++ b/include/linguistic/misc.hxx @@ -120,10 +120,10 @@ LNG_DLLPUBLIC bool LinguIsUnspecified( const OUString & rBcp47 ); // checks if file pointed to by rURL is readonly // and may also check return if such a file exists or not -sal_Bool IsReadOnly( const OUString &rURL, sal_Bool *pbExist = 0 ); +bool IsReadOnly( const OUString &rURL, bool *pbExist = 0 ); // checks if a file with the given URL exists -sal_Bool FileExists( const OUString &rURL ); +bool FileExists( const OUString &rURL ); OUString GetDictionaryWriteablePath(); @@ -142,14 +142,14 @@ LNG_DLLPUBLIC sal_Int32 GetPosInWordToCheck( const OUString &rTxt, sal_Int32 nPo ::com::sun::star::linguistic2::XHyphenatedWord > &rxHyphWord ); -LNG_DLLPUBLIC sal_Bool IsUpper( const OUString &rText, sal_Int32 nPos, sal_Int32 nLen, sal_Int16 nLanguage ); +LNG_DLLPUBLIC bool IsUpper( const OUString &rText, sal_Int32 nPos, sal_Int32 nLen, sal_Int16 nLanguage ); -inline sal_Bool IsUpper( const OUString &rText, sal_Int16 nLanguage ) { return IsUpper( rText, 0, rText.getLength(), nLanguage ); } +inline bool IsUpper( const OUString &rText, sal_Int16 nLanguage ) { return IsUpper( rText, 0, rText.getLength(), nLanguage ); } LNG_DLLPUBLIC CapType SAL_CALL capitalType(const OUString&, CharClass *); OUString ToLower( const OUString &rText, sal_Int16 nLanguage ); -LNG_DLLPUBLIC sal_Bool HasDigits( const OUString &rText ); -LNG_DLLPUBLIC sal_Bool IsNumeric( const OUString &rText ); +LNG_DLLPUBLIC bool HasDigits( const OUString &rText ); +LNG_DLLPUBLIC bool IsNumeric( const OUString &rText ); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > GetOneInstanceService( const char *pServiceName ); @@ -158,11 +158,11 @@ LNG_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::X ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > GetIgnoreAllList(); -sal_Bool IsUseDicList( const ::com::sun::star::beans::PropertyValues &rProperties, +bool IsUseDicList( const ::com::sun::star::beans::PropertyValues &rProperties, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &rxPropSet ); -sal_Bool IsIgnoreControlChars( const ::com::sun::star::beans::PropertyValues &rProperties, +bool IsIgnoreControlChars( const ::com::sun::star::beans::PropertyValues &rProperties, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > &rxPropSet ); @@ -171,15 +171,15 @@ sal_Bool IsIgnoreControlChars( const ::com::sun::star::beans::PropertyValues &rP SearchDicList( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSearchableDictionaryList >& rDicList, const OUString& rWord, sal_Int16 nLanguage, - sal_Bool bSearchPosDics, sal_Bool bSearchSpellEntry ); + bool bSearchPosDics, bool bSearchSpellEntry ); LNG_DLLPUBLIC sal_uInt8 AddEntryToDic( ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XDictionary > &rxDic, - const OUString &rWord, sal_Bool bIsNeg, + const OUString &rWord, bool bIsNeg, const OUString &rRplcTxt, sal_Int16 nRplcLang, - sal_Bool bStripDot = sal_True ); + bool bStripDot = true ); -LNG_DLLPUBLIC sal_Bool SaveDictionaries( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSearchableDictionaryList > &xDicList ); +LNG_DLLPUBLIC bool SaveDictionaries( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XSearchableDictionaryList > &xDicList ); // AppExitLstnr: // virtual base class that calls it AtExit function when the application diff --git a/include/linguistic/spelldta.hxx b/include/linguistic/spelldta.hxx index 3aa5d1e18793..9bdfe8334516 100644 --- a/include/linguistic/spelldta.hxx +++ b/include/linguistic/spelldta.hxx @@ -42,7 +42,7 @@ namespace linguistic MergeProposalSeqs( ::com::sun::star::uno::Sequence< OUString > &rAlt1, ::com::sun::star::uno::Sequence< OUString > &rAlt2, - sal_Bool bAllowDuplicates ); + bool bAllowDuplicates ); void SeqRemoveNegEntries( ::com::sun::star::uno::Sequence< OUString > &rSeq, @@ -50,7 +50,7 @@ void SeqRemoveNegEntries( ::com::sun::star::linguistic2::XSearchableDictionaryList > &rxDicList, sal_Int16 nLanguage ); -sal_Bool SeqHasEntry( +bool SeqHasEntry( const ::com::sun::star::uno::Sequence< OUString > &rSeq, const OUString &rTxt); diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx index 3e909c7d5136..0d2feb5e85b2 100644 --- a/linguistic/source/convdic.cxx +++ b/linguistic/source/convdic.cxx @@ -189,7 +189,7 @@ ConvDic::ConvDic( if( !rMainURL.isEmpty() ) { - sal_Bool bExists = sal_False; + bool bExists = false; bIsReadonly = IsReadOnly( rMainURL, &bExists ); if( !bExists ) // new empty dictionary diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx index d11b9e687c4f..ce5a6ef6e5ed 100644 --- a/linguistic/source/lngprophelp.cxx +++ b/linguistic/source/lngprophelp.cxx @@ -114,8 +114,8 @@ void PropertyChgHelper::AddPropNames( const char *pNewNames[], sal_Int32 nCount void PropertyChgHelper::SetDefaultValues() { - bResIsIgnoreControlCharacters = bIsIgnoreControlCharacters = sal_True; - bResIsUseDictionaryList = bIsUseDictionaryList = sal_True; + bResIsIgnoreControlCharacters = bIsIgnoreControlCharacters = true; + bResIsUseDictionaryList = bIsUseDictionaryList = true; } @@ -127,7 +127,7 @@ void PropertyChgHelper::GetCurrentValues() const OUString *pPropName = GetPropNames().getConstArray(); for (sal_Int32 i = 0; i < nLen; ++i) { - sal_Bool *pbVal = NULL, + bool *pbVal = NULL, *pbResVal = NULL; if ( pPropName[i] == UPN_IS_IGNORE_CONTROL_CHARACTERS ) @@ -164,7 +164,7 @@ void PropertyChgHelper::SetTmpPropVals( const PropertyValues &rPropVals ) const PropertyValue *pVal = rPropVals.getConstArray(); for (sal_Int32 i = 0; i < nLen; ++i) { - sal_Bool *pbResVal = NULL; + bool *pbResVal = NULL; switch (pVal[i].Handle) { case UPH_IS_IGNORE_CONTROL_CHARACTERS : @@ -181,18 +181,18 @@ void PropertyChgHelper::SetTmpPropVals( const PropertyValues &rPropVals ) } -sal_Bool PropertyChgHelper::propertyChange_Impl( const PropertyChangeEvent& rEvt ) +bool PropertyChgHelper::propertyChange_Impl( const PropertyChangeEvent& rEvt ) { - sal_Bool bRes = sal_False; + bool bRes = false; if (GetPropSet().is() && rEvt.Source == GetPropSet()) { sal_Int16 nLngSvcFlags = (nEvtFlags & AE_HYPHENATOR) ? LinguServiceEventFlags::HYPHENATE_AGAIN : 0; - sal_Bool bSCWA = sal_False, // SPELL_CORRECT_WORDS_AGAIN ? - bSWWA = sal_False; // SPELL_WRONG_WORDS_AGAIN ? + bool bSCWA = false, // SPELL_CORRECT_WORDS_AGAIN ? + bSWWA = false; // SPELL_WRONG_WORDS_AGAIN ? - sal_Bool *pbVal = NULL; + bool *pbVal = NULL; switch (rEvt.PropertyHandle) { case UPH_IS_IGNORE_CONTROL_CHARACTERS : @@ -204,12 +204,12 @@ sal_Bool PropertyChgHelper::propertyChange_Impl( const PropertyChangeEvent& rEvt case UPH_IS_USE_DICTIONARY_LIST : { pbVal = &bIsUseDictionaryList; - bSCWA = bSWWA = sal_True; + bSCWA = bSWWA = true; break; } default: { - bRes = sal_False; + bRes = false; } } if (pbVal) @@ -218,7 +218,7 @@ sal_Bool PropertyChgHelper::propertyChange_Impl( const PropertyChangeEvent& rEvt bRes = 0 != pbVal; // sth changed? if (bRes) { - sal_Bool bSpellEvts = (nEvtFlags & AE_SPELLCHECKER) ? sal_True : sal_False; + bool bSpellEvts = (nEvtFlags & AE_SPELLCHECKER); if (bSCWA && bSpellEvts) nLngSvcFlags |= LinguServiceEventFlags::SPELL_CORRECT_WORDS_AGAIN; if (bSWWA && bSpellEvts) @@ -390,9 +390,9 @@ void PropertyHelper_Spell::SetDefaultValues() { PropertyChgHelper::SetDefaultValues(); - bResIsSpellUpperCase = bIsSpellUpperCase = sal_False; - bResIsSpellWithDigits = bIsSpellWithDigits = sal_False; - bResIsSpellCapitalization = bIsSpellCapitalization = sal_True; + bResIsSpellUpperCase = bIsSpellUpperCase = false; + bResIsSpellWithDigits = bIsSpellWithDigits = false; + bResIsSpellCapitalization = bIsSpellCapitalization = true; } @@ -406,7 +406,7 @@ void PropertyHelper_Spell::GetCurrentValues() const OUString *pPropName = GetPropNames().getConstArray(); for (sal_Int32 i = 0; i < nLen; ++i) { - sal_Bool *pbVal = NULL, + bool *pbVal = NULL, *pbResVal = NULL; if ( pPropName[i] == UPN_IS_SPELL_UPPER_CASE ) @@ -435,36 +435,36 @@ void PropertyHelper_Spell::GetCurrentValues() } -sal_Bool PropertyHelper_Spell::propertyChange_Impl( const PropertyChangeEvent& rEvt ) +bool PropertyHelper_Spell::propertyChange_Impl( const PropertyChangeEvent& rEvt ) { - sal_Bool bRes = PropertyChgHelper::propertyChange_Impl( rEvt ); + bool bRes = PropertyChgHelper::propertyChange_Impl( rEvt ); if (!bRes && GetPropSet().is() && rEvt.Source == GetPropSet()) { - sal_Bool bSCWA = sal_False, // SPELL_CORRECT_WORDS_AGAIN ? - bSWWA = sal_False; // SPELL_WRONG_WORDS_AGAIN ? + bool bSCWA = false, // SPELL_CORRECT_WORDS_AGAIN ? + bSWWA = false; // SPELL_WRONG_WORDS_AGAIN ? - sal_Bool *pbVal = NULL; + bool *pbVal = NULL; switch (rEvt.PropertyHandle) { case UPH_IS_SPELL_UPPER_CASE : { pbVal = &bIsSpellUpperCase; - bSCWA = sal_False == *pbVal; // sal_False->sal_True change? + bSCWA = ! *pbVal; // sal_False->sal_True change? bSWWA = !bSCWA; // sal_True->sal_False change? break; } case UPH_IS_SPELL_WITH_DIGITS : { pbVal = &bIsSpellWithDigits; - bSCWA = sal_False == *pbVal; // sal_False->sal_True change? + bSCWA = ! *pbVal; // sal_False->sal_True change? bSWWA = !bSCWA; // sal_True->sal_False change? break; } case UPH_IS_SPELL_CAPITALIZATION : { pbVal = &bIsSpellCapitalization; - bSCWA = sal_False == *pbVal; // sal_False->sal_True change? + bSCWA = ! *pbVal; // sal_False->sal_True change? bSWWA = !bSCWA; // sal_True->sal_False change? break; } @@ -526,7 +526,7 @@ void PropertyHelper_Spell::SetTmpPropVals( const PropertyValues &rPropVals ) } else { - sal_Bool *pbResVal = NULL; + bool *pbResVal = NULL; switch (pVal[i].Handle) { case UPH_IS_SPELL_UPPER_CASE : pbResVal = &bResIsSpellUpperCase; break; @@ -621,9 +621,9 @@ void PropertyHelper_Hyphen::GetCurrentValues() } -sal_Bool PropertyHelper_Hyphen::propertyChange_Impl( const PropertyChangeEvent& rEvt ) +bool PropertyHelper_Hyphen::propertyChange_Impl( const PropertyChangeEvent& rEvt ) { - sal_Bool bRes = PropertyChgHelper::propertyChange_Impl( rEvt ); + bool bRes = PropertyChgHelper::propertyChange_Impl( rEvt ); if (!bRes && GetPropSet().is() && rEvt.Source == GetPropSet()) { @@ -817,22 +817,22 @@ void PropertyHelper_Spelling::SetTmpPropVals( const com::sun::star::beans::Prope pInst->SetTmpPropVals( rPropVals ); } -sal_Bool PropertyHelper_Spelling::IsSpellUpperCase() const +bool PropertyHelper_Spelling::IsSpellUpperCase() const { return pInst->IsSpellUpperCase(); } -sal_Bool PropertyHelper_Spelling::IsSpellWithDigits() const +bool PropertyHelper_Spelling::IsSpellWithDigits() const { return pInst->IsSpellWithDigits(); } -sal_Bool PropertyHelper_Spelling::IsSpellCapitalization() const +bool PropertyHelper_Spelling::IsSpellCapitalization() const { return pInst->IsSpellCapitalization(); } -sal_Bool PropertyHelper_Spelling::addLinguServiceEventListener( +bool PropertyHelper_Spelling::addLinguServiceEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) @@ -840,7 +840,7 @@ sal_Bool PropertyHelper_Spelling::addLinguServiceEventListener( return pInst->addLinguServiceEventListener( rxListener ); } -sal_Bool PropertyHelper_Spelling::removeLinguServiceEventListener( +bool PropertyHelper_Spelling::removeLinguServiceEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx index b56b0cb9987e..c1cede4fceae 100644 --- a/linguistic/source/misc.cxx +++ b/linguistic/source/misc.cxx @@ -203,10 +203,10 @@ sal_Int32 LevDistance( const OUString &rTxt1, const OUString &rTxt2 ) return nDist; } -sal_Bool IsUseDicList( const PropertyValues &rProperties, +bool IsUseDicList( const PropertyValues &rProperties, const uno::Reference< XPropertySet > &rxProp ) { - sal_Bool bRes = sal_True; + bool bRes = true; sal_Int32 nLen = rProperties.getLength(); const PropertyValue *pVal = rProperties.getConstArray(); @@ -230,10 +230,10 @@ sal_Bool IsUseDicList( const PropertyValues &rProperties, return bRes; } -sal_Bool IsIgnoreControlChars( const PropertyValues &rProperties, +bool IsIgnoreControlChars( const PropertyValues &rProperties, const uno::Reference< XPropertySet > &rxProp ) { - sal_Bool bRes = sal_True; + bool bRes = true; sal_Int32 nLen = rProperties.getLength(); const PropertyValue *pVal = rProperties.getConstArray(); @@ -257,9 +257,9 @@ sal_Bool IsIgnoreControlChars( const PropertyValues &rProperties, return bRes; } -static sal_Bool lcl_HasHyphInfo( const uno::Reference &xEntry ) +static bool lcl_HasHyphInfo( const uno::Reference &xEntry ) { - sal_Bool bRes = sal_False; + bool bRes = false; if (xEntry.is()) { // there has to be (at least one) '=' or '[' denoting a hyphenation position @@ -275,7 +275,7 @@ static sal_Bool lcl_HasHyphInfo( const uno::Reference &xEntry uno::Reference< XDictionaryEntry > SearchDicList( const uno::Reference< XSearchableDictionaryList > &xDicList, const OUString &rWord, sal_Int16 nLanguage, - sal_Bool bSearchPosDics, sal_Bool bSearchSpellEntry ) + bool bSearchPosDics, bool bSearchSpellEntry ) { MutexGuard aGuard( GetLinguMutex() ); @@ -320,12 +320,12 @@ uno::Reference< XDictionaryEntry > SearchDicList( return xEntry; } -sal_Bool SaveDictionaries( const uno::Reference< XSearchableDictionaryList > &xDicList ) +bool SaveDictionaries( const uno::Reference< XSearchableDictionaryList > &xDicList ) { if (!xDicList.is()) - return sal_True; + return true; - sal_Bool bRet = sal_True; + bool bRet = true; Sequence< uno::Reference< XDictionary > > aDics( xDicList->getDictionaries() ); const uno::Reference< XDictionary > *pDic = aDics.getConstArray(); @@ -343,7 +343,7 @@ sal_Bool SaveDictionaries( const uno::Reference< XSearchableDictionaryList > &xD } catch(uno::Exception &) { - bRet = sal_False; + bRet = false; } } @@ -352,9 +352,9 @@ sal_Bool SaveDictionaries( const uno::Reference< XSearchableDictionaryList > &xD sal_uInt8 AddEntryToDic( uno::Reference< XDictionary > &rxDic, - const OUString &rWord, sal_Bool bIsNeg, + const OUString &rWord, bool bIsNeg, const OUString &rRplcTxt, sal_Int16 /* nRplcLang */, - sal_Bool bStripDot ) + bool bStripDot ) { if (!rxDic.is()) return DIC_ERR_NOT_EXISTS; @@ -370,7 +370,7 @@ sal_uInt8 AddEntryToDic( aTmp = aTmp.copy( 0, nLen - 1 ); } } - sal_Bool bAddOk = rxDic->add( aTmp, bIsNeg, rRplcTxt ); + bool bAddOk = rxDic->add( aTmp, bIsNeg, rRplcTxt ); sal_uInt8 nRes = DIC_ERR_NONE; if (!bAddOk) @@ -406,10 +406,10 @@ uno::Sequence< sal_Int16 > return aLangs; } -sal_Bool IsReadOnly( const OUString &rURL, sal_Bool *pbExist ) +bool IsReadOnly( const OUString &rURL, bool *pbExist ) { - sal_Bool bRes = sal_False; - sal_Bool bExists = sal_False; + bool bRes = false; + bool bExists = false; if (!rURL.isEmpty()) { @@ -427,7 +427,7 @@ sal_Bool IsReadOnly( const OUString &rURL, sal_Bool *pbExist ) } catch (Exception &) { - bRes = sal_True; + bRes = true; } } @@ -436,10 +436,10 @@ sal_Bool IsReadOnly( const OUString &rURL, sal_Bool *pbExist ) return bRes; } -static sal_Bool GetAltSpelling( sal_Int16 &rnChgPos, sal_Int16 &rnChgLen, OUString &rRplc, +static bool GetAltSpelling( sal_Int16 &rnChgPos, sal_Int16 &rnChgLen, OUString &rRplc, uno::Reference< XHyphenatedWord > &rxHyphWord ) { - sal_Bool bRes = rxHyphWord->isAlternativeSpelling(); + bool bRes = rxHyphWord->isAlternativeSpelling(); if (bRes) { OUString aWord( rxHyphWord->getWord() ), @@ -495,7 +495,7 @@ static sal_Int16 GetOrigWordPos( const OUString &rOrigWord, sal_Int16 nPos ) while (nPos >= 0 && i++ < nLen) { sal_Unicode cChar = rOrigWord[i]; - sal_Bool bSkip = IsHyphen( cChar ) || IsControlChar( cChar ); + bool bSkip = IsHyphen( cChar ) || IsControlChar( cChar ); if (!bSkip) --nPos; } @@ -512,7 +512,7 @@ sal_Int32 GetPosInWordToCheck( const OUString &rTxt, sal_Int32 nPos ) for (sal_Int32 i = 0; i < nPos; ++i) { sal_Unicode cChar = rTxt[i]; - sal_Bool bSkip = IsHyphen( cChar ) || IsControlChar( cChar ); + bool bSkip = IsHyphen( cChar ) || IsControlChar( cChar ); if (!bSkip) ++nRes; } @@ -530,7 +530,7 @@ uno::Reference< XHyphenatedWord > RebuildHyphensAndControlChars( sal_Int16 nChgPos = 0, nChgLen = 0; OUString aRplc; - sal_Bool bAltSpelling = GetAltSpelling( nChgPos, nChgLen, aRplc, rxHyphWord ); + bool bAltSpelling = GetAltSpelling( nChgPos, nChgLen, aRplc, rxHyphWord ); #if OSL_DEBUG_LEVEL > 1 OUString aWord( rxHyphWord->getWord() ); #endif @@ -597,7 +597,7 @@ osl::Mutex & lcl_GetCharClassMutex() return aMutex; } -sal_Bool IsUpper( const OUString &rText, sal_Int32 nPos, sal_Int32 nLen, sal_Int16 nLanguage ) +bool IsUpper( const OUString &rText, sal_Int32 nPos, sal_Int32 nLen, sal_Int16 nLanguage ) { MutexGuard aGuard( lcl_GetCharClassMutex() ); @@ -682,7 +682,7 @@ static const sal_uInt32 the_aDigitZeroes [] = 0x0001D7CE //1D7FF ; Decimal # Nd [50] MATHEMATICAL BOLD DIGIT ZERO..MATHEMATICAL MONOSPACE DIGIT NINE }; -sal_Bool HasDigits( const OUString &rText ) +bool HasDigits( const OUString &rText ) { static const int nNumDigitZeroes = sizeof(the_aDigitZeroes) / sizeof(the_aDigitZeroes[0]); const sal_Int32 nLen = rText.getLength(); @@ -697,25 +697,25 @@ sal_Bool HasDigits( const OUString &rText ) if (nDigitZero > nCodePoint) break; if (/*nDigitZero <= nCodePoint &&*/ nCodePoint <= nDigitZero + 9) - return sal_True; + return true; } } - return sal_False; + return false; } -sal_Bool IsNumeric( const OUString &rText ) +bool IsNumeric( const OUString &rText ) { - sal_Bool bRes = sal_False; + bool bRes = false; if (!rText.isEmpty()) { sal_Int32 nLen = rText.getLength(); - bRes = sal_True; + bRes = true; for(sal_Int32 i = 0; i < nLen; ++i) { sal_Unicode cChar = rText[ i ]; if ( !((sal_Unicode)'0' <= cChar && cChar <= (sal_Unicode)'9') ) { - bRes = sal_False; + bRes = false; break; } } diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx index 02421495a80e..e7e8031e41c8 100644 --- a/linguistic/source/misc2.cxx +++ b/linguistic/source/misc2.cxx @@ -40,9 +40,9 @@ namespace linguistic { -sal_Bool FileExists( const OUString &rMainURL ) +bool FileExists( const OUString &rMainURL ) { - sal_Bool bExists = sal_False; + bool bExists = false; if (!rMainURL.isEmpty()) { try diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx index 0c892f38c20a..3ea7d5f4f40b 100644 --- a/linguistic/source/spelldsp.cxx +++ b/linguistic/source/spelldsp.cxx @@ -262,13 +262,13 @@ static Reference< XDictionaryEntry > lcl_GetRulingDictionaryEntry( { Reference< XSearchableDictionaryList > xDList( GetDictionaryList() ); Reference< XDictionaryEntry > xNegEntry( SearchDicList( xDList, - rWord, nLanguage, sal_False, sal_True ) ); + rWord, nLanguage, false, true ) ); if (xNegEntry.is()) xRes = xNegEntry; else { Reference< XDictionaryEntry > xPosEntry( SearchDicList( xDList, - rWord, nLanguage, sal_True, sal_True ) ); + rWord, nLanguage, true, true ) ); if (xPosEntry.is()) xRes = xPosEntry; } @@ -660,7 +660,7 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl( // replacement text must not be in negative dictionary itself if (!aAddRplcTxt.isEmpty() && - !SearchDicList( xDList, aAddRplcTxt, nLanguage, sal_False, sal_True ).is()) + !SearchDicList( xDList, aAddRplcTxt, nLanguage, false, true ).is()) { aProposalList.Prepend( aAddRplcTxt ); } diff --git a/linguistic/source/spelldta.cxx b/linguistic/source/spelldta.cxx index d895bcb9fa90..b8490ee08aeb 100644 --- a/linguistic/source/spelldta.cxx +++ b/linguistic/source/spelldta.cxx @@ -44,17 +44,17 @@ namespace linguistic #define MAX_PROPOSALS 40 -sal_Bool SeqHasEntry( +bool SeqHasEntry( const Sequence< OUString > &rSeq, const OUString &rTxt) { - sal_Bool bRes = sal_False; + bool bRes = false; sal_Int32 nLen = rSeq.getLength(); const OUString *pEntry = rSeq.getConstArray(); for (sal_Int32 i = 0; i < nLen && !bRes; ++i) { if (rTxt == pEntry[i]) - bRes = sal_True; + bRes = true; } return bRes; } @@ -117,7 +117,7 @@ void SeqRemoveNegEntries( Sequence< OUString > &rSeq, for (sal_Int32 i = 0; i < nLen; ++i) { Reference< XDictionaryEntry > xNegEntry( SearchDicList( rxDicList, - pEntries[i], nLanguage, sal_False, sal_True ) ); + pEntries[i], nLanguage, false, true ) ); if (xNegEntry.is()) { pEntries[i] = aEmpty; @@ -128,7 +128,7 @@ void SeqRemoveNegEntries( Sequence< OUString > &rSeq, { Sequence< OUString > aNew; // merge sequence without duplicates and empty strings in new empty sequence - aNew = MergeProposalSeqs( aNew, rSeq, sal_False ); + aNew = MergeProposalSeqs( aNew, rSeq, false ); rSeq = aNew; } } @@ -137,7 +137,7 @@ void SeqRemoveNegEntries( Sequence< OUString > &rSeq, Sequence< OUString > MergeProposalSeqs( Sequence< OUString > &rAlt1, Sequence< OUString > &rAlt2, - sal_Bool bAllowDuplicates ) + bool bAllowDuplicates ) { Sequence< OUString > aMerged; diff --git a/sw/source/core/uibase/lingu/olmenu.cxx b/sw/source/core/uibase/lingu/olmenu.cxx index f5909da430d1..2108ac503afd 100644 --- a/sw/source/core/uibase/lingu/olmenu.cxx +++ b/sw/source/core/uibase/lingu/olmenu.cxx @@ -754,7 +754,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) } } else { linguistic::AddEntryToDic( xDictionary, - m_xSpellAlt->getWord(), sal_False, OUString(), LANGUAGE_NONE ); + m_xSpellAlt->getWord(), false, OUString(), LANGUAGE_NONE ); } } else if ((MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END) || nId == MN_ADD_TO_DIC_SINGLE) @@ -777,7 +777,7 @@ void SwSpellPopup::Execute( sal_uInt16 nId ) if (xDic.is()) { - sal_Int16 nAddRes = linguistic::AddEntryToDic( xDic, aWord, sal_False, OUString(), LANGUAGE_NONE ); + sal_Int16 nAddRes = linguistic::AddEntryToDic( xDic, aWord, false, OUString(), LANGUAGE_NONE ); // save modified user-dictionary if it is persistent uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY ); if (xSavDic.is()) -- cgit