diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-04-21 16:55:25 +0200 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-04-22 07:16:25 +0000 |
commit | e0067f8451402f84093836e000acd09fe3ab820d (patch) | |
tree | 4afd4f60cd6f52f5bc3ed4c79861fa57d149469e /editeng/source | |
parent | 43c422ebb7a7c1431d179ed1b9572fabf9845aa8 (diff) |
sal_Bool to bool
Change-Id: I5831dfb7270ce3983a454c6c40558a74931d5200
Reviewed-on: https://gerrit.libreoffice.org/3537
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'editeng/source')
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 10 | ||||
-rw-r--r-- | editeng/source/editeng/impedit4.cxx | 10 | ||||
-rw-r--r-- | editeng/source/editeng/textconv.cxx | 76 | ||||
-rw-r--r-- | editeng/source/editeng/textconv.hxx | 26 | ||||
-rw-r--r-- | editeng/source/misc/hangulhanja.cxx | 86 |
5 files changed, 104 insertions, 104 deletions
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index f6ab122cbbb3..871b99924d1c 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -168,10 +168,10 @@ struct ConvInfo EPaM aConvStart; EPaM aConvTo; EPaM aConvContinue; // position to start search for next text portion (word) with - sal_Bool bConvToEnd; - sal_Bool bMultipleDoc; + bool bConvToEnd; + bool bMultipleDoc; - ConvInfo() { bConvToEnd = sal_True; bMultipleDoc = sal_False; } + ConvInfo() : bConvToEnd(true), bMultipleDoc(false) {} }; struct FormatterFontMetric @@ -898,9 +898,9 @@ public: ImpSpell( EditView* pEditView ); // text conversion functions - void Convert( EditView* pEditView, LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ); + void Convert( EditView* pEditView, LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc ); void ImpConvert( OUString &rConvTxt, LanguageType &rConvTxtLang, EditView* pEditView, LanguageType nSrcLang, const ESelection &rConvRange, - sal_Bool bAllowImplicitChangesForNotConvertibleText, LanguageType nTargetLang, const Font *pTargetFont ); + bool bAllowImplicitChangesForNotConvertibleText, LanguageType nTargetLang, const Font *pTargetFont ); ConvInfo * GetConvInfo() const { return pConvInfo; } sal_Bool HasConvertibleTextPortion( LanguageType nLang ); void SetLanguageAndFont( const ESelection &rESel, diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index 08aed29dbd6a..24e963e5ab76 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1516,7 +1516,7 @@ sal_Bool ImpEditEngine::HasConvertibleTextPortion( LanguageType nSrcLang ) void ImpEditEngine::Convert( EditView* pEditView, LanguageType nSrcLang, LanguageType nDestLang, const Font *pDestFont, - sal_Int32 nOptions, sal_Bool bIsInteractive, sal_Bool bMultipleDoc ) + sal_Int32 nOptions, bool bIsInteractive, bool bMultipleDoc ) { // modified version of ImpEditEngine::Spell @@ -1555,11 +1555,11 @@ void ImpEditEngine::Convert( EditView* pEditView, // pConvInfo->aConvContinue = pConvInfo->aConvStart; - sal_Bool bIsStart = sal_False; + bool bIsStart = false; if ( bMultipleDoc ) - bIsStart = sal_True; // Accessible from the front or from behind ... + bIsStart = true; // Accessible from the front or from behind ... else if ( CreateEPaM( aEditDoc.GetStartPaM() ) == pConvInfo->aConvStart ) - bIsStart = sal_True; + bIsStart = true; bImpConvertFirstCall = true; // next ImpConvert call is the very first in this conversion turn @@ -1638,7 +1638,7 @@ void ImpEditEngine::SetLanguageAndFont( void ImpEditEngine::ImpConvert( OUString &rConvTxt, LanguageType &rConvTxtLang, EditView* pEditView, LanguageType nSrcLang, const ESelection &rConvRange, - sal_Bool bAllowImplicitChangesForNotConvertibleText, + bool bAllowImplicitChangesForNotConvertibleText, LanguageType nTargetLang, const Font *pTargetFont ) { // modified version of ImpEditEngine::ImpSpell diff --git a/editeng/source/editeng/textconv.cxx b/editeng/source/editeng/textconv.cxx index 9733842f0e28..7c24c7e4c132 100644 --- a/editeng/source/editeng/textconv.cxx +++ b/editeng/source/editeng/textconv.cxx @@ -48,8 +48,8 @@ TextConvWrapper::TextConvWrapper( Window* pWindow, const Locale& rTargetLocale, const Font* pTargetFont, sal_Int32 nOptions, - sal_Bool bIsInteractive, - sal_Bool bIsStart, + bool bIsInteractive, + bool bIsStart, EditView* pView ) : HangulHanjaConversion( pWindow, rxContext, rSourceLocale, rTargetLocale, pTargetFont, nOptions, bIsInteractive ) { @@ -58,16 +58,16 @@ TextConvWrapper::TextConvWrapper( Window* pWindow, nConvTextLang = LANGUAGE_NONE; nUnitOffset = 0; - bStartChk = sal_False; + bStartChk = false; bStartDone = bIsStart; - bEndDone = sal_False; + bEndDone = false; pWin = pWindow; pEditView = pView; aConvSel = pEditView->GetSelection(); aConvSel.Adjust(); // make Start <= End - bAllowChange = sal_False; + bAllowChange = false; } @@ -76,65 +76,65 @@ TextConvWrapper::~TextConvWrapper() } -sal_Bool TextConvWrapper::ConvNext_impl() +bool TextConvWrapper::ConvNext_impl() { // modified version of SvxSpellWrapper::SpellNext if( bStartChk ) - bStartDone = sal_True; + bStartDone = true; else - bEndDone = sal_True; + bEndDone = true; if ( bStartDone && bEndDone ) { if ( ConvMore_impl() ) // examine another document? { - bStartDone = sal_True; - bEndDone = sal_False; + bStartDone = true; + bEndDone = false; ConvStart_impl( SVX_SPELL_BODY ); - return sal_True; + return true; } - return sal_False; + return false; } - sal_Bool bGoOn = sal_False; + bool bGoOn = false; if ( bStartDone && bEndDone ) { if ( ConvMore_impl() ) // examine another document? { - bStartDone = sal_True; - bEndDone = sal_False; + bStartDone = true; + bEndDone = false; ConvStart_impl( SVX_SPELL_BODY ); - return sal_True; + return true; } } else if (!aConvSel.HasRange()) { bStartChk = !bStartDone; ConvStart_impl( bStartChk ? SVX_SPELL_BODY_START : SVX_SPELL_BODY_END ); - bGoOn = sal_True; + bGoOn = true; } return bGoOn; } -sal_Bool TextConvWrapper::FindConvText_impl() +bool TextConvWrapper::FindConvText_impl() { // modified version of SvxSpellWrapper::FindSpellError - sal_Bool bFound = sal_False; + bool bFound = false; pWin->EnterWait(); - sal_Bool bConvert = sal_True; + bool bConvert = true; while ( bConvert ) { bFound = ConvContinue_impl(); if (bFound) { - bConvert = sal_False; + bConvert = false; } else { @@ -147,7 +147,7 @@ sal_Bool TextConvWrapper::FindConvText_impl() } -sal_Bool TextConvWrapper::ConvMore_impl() +bool TextConvWrapper::ConvMore_impl() { // modified version of SvxSpellWrapper::SpellMore @@ -182,7 +182,7 @@ void TextConvWrapper::ConvStart_impl( SvxSpellArea eArea ) // Is called when Spell-forward has reached the end, and to start over if ( bEndDone ) { - pConvInfo->bConvToEnd = sal_False; + pConvInfo->bConvToEnd = false; pConvInfo->aConvTo = pConvInfo->aConvStart; pConvInfo->aConvContinue = EPaM( 0, 0 ); pEditView->GetImpEditView()->SetEditSelection( @@ -190,7 +190,7 @@ void TextConvWrapper::ConvStart_impl( SvxSpellArea eArea ) } else { - pConvInfo->bConvToEnd = sal_True; + pConvInfo->bConvToEnd = true; pConvInfo->aConvTo = pImpEE->CreateEPaM( pEE->GetEditDoc().GetStartPaM() ); } @@ -198,13 +198,13 @@ void TextConvWrapper::ConvStart_impl( SvxSpellArea eArea ) else if ( eArea == SVX_SPELL_BODY_END ) { // Is called when Spell-forward starts - pConvInfo->bConvToEnd = sal_True; + pConvInfo->bConvToEnd = true; if (aConvSel.HasRange()) { // user selection: convert to end of selection pConvInfo->aConvTo.nPara = aConvSel.nEndPara; pConvInfo->aConvTo.nIndex = aConvSel.nEndPos; - pConvInfo->bConvToEnd = sal_False; + pConvInfo->bConvToEnd = false; } else { @@ -232,7 +232,7 @@ void TextConvWrapper::ConvEnd_impl() } -sal_Bool TextConvWrapper::ConvContinue_impl() +bool TextConvWrapper::ConvContinue_impl() { // modified version of EditSpellWrapper::SpellContinue @@ -282,7 +282,7 @@ void TextConvWrapper::SelectNewUnit_impl( const sal_Int32 nUnitStart, const sal_Int32 nUnitEnd ) { - sal_Bool bOK = 0 <= nUnitStart && 0 <= nUnitEnd && nUnitStart <= nUnitEnd; + const bool bOK = 0 <= nUnitStart && 0 <= nUnitEnd && nUnitStart <= nUnitEnd; DBG_ASSERT( bOK, "invalid arguments" ); if (!bOK) return; @@ -299,7 +299,7 @@ void TextConvWrapper::SelectNewUnit_impl( void TextConvWrapper::GetNextPortion( OUString& /* [out] */ rNextPortion, LanguageType& /* [out] */ rLangOfPortion, - sal_Bool /* [in] */ _bAllowImplicitChangesForNotConvertibleText ) + bool /* [in] */ _bAllowImplicitChangesForNotConvertibleText ) { bAllowChange = _bAllowImplicitChangesForNotConvertibleText; @@ -327,7 +327,7 @@ void TextConvWrapper::HandleNewUnit( #ifdef DBG_UTIL namespace { - sal_Bool IsSimilarChinese( LanguageType nLang1, LanguageType nLang2 ) + bool IsSimilarChinese( LanguageType nLang1, LanguageType nLang2 ) { using namespace editeng; return (HangulHanjaConversion::IsTraditional(nLang1) && HangulHanjaConversion::IsTraditional(nLang2)) || @@ -344,7 +344,7 @@ void TextConvWrapper::ReplaceUnit( ReplacementAction eAction, LanguageType *pNewUnitLanguage ) { - sal_Bool bOK = 0 <= nUnitStart && 0 <= nUnitEnd && nUnitStart <= nUnitEnd; + const bool bOK = 0 <= nUnitStart && 0 <= nUnitEnd && nUnitStart <= nUnitEnd; DBG_ASSERT( bOK, "invalid arguments" ); if (!bOK) return; @@ -390,7 +390,7 @@ void TextConvWrapper::ReplaceUnit( // according to FT we should currently not bother about keeping // attributes in Hangul/Hanja conversion and leave that untouched. // Thus we do this only for Chinese translation... - sal_Bool bIsChineseConversion = IsChinese( GetSourceLanguage() ); + bool bIsChineseConversion = IsChinese( GetSourceLanguage() ); if (bIsChineseConversion) ChangeText( aNewTxt, rOrigText, &rOffsets, &_aOldSel ); else @@ -512,7 +512,7 @@ void TextConvWrapper::ChangeText( const String &rNewText, // replace selected sub string with the corresponding // sub string from the new text while keeping as // much from the attributes as possible - ChangeText_impl( aInNew, sal_True ); + ChangeText_impl( aInNew, true ); nCorrectionOffset += nConvChgLen - nChgLen; @@ -541,12 +541,12 @@ void TextConvWrapper::ChangeText( const String &rNewText, } else { - ChangeText_impl( rNewText, sal_False ); + ChangeText_impl( rNewText, false ); } } -void TextConvWrapper::ChangeText_impl( const String &rNewText, sal_Bool bKeepAttributes ) +void TextConvWrapper::ChangeText_impl( const String &rNewText, bool bKeepAttributes ) { if (bKeepAttributes) { @@ -580,16 +580,16 @@ void TextConvWrapper::ChangeText_impl( const String &rNewText, sal_Bool bKeepAtt void TextConvWrapper::Convert() { - bStartChk = sal_False; + bStartChk = false; ConvStart_impl( SVX_SPELL_BODY_END ); ConvertDocument(); ConvEnd_impl(); } -sal_Bool TextConvWrapper::HasRubySupport() const +bool TextConvWrapper::HasRubySupport() const { - return sal_False; + return false; } ////////////////////////////////////////////////////////////////////// diff --git a/editeng/source/editeng/textconv.hxx b/editeng/source/editeng/textconv.hxx index 2a0bf0b2ecd2..7d50bdefa0a5 100644 --- a/editeng/source/editeng/textconv.hxx +++ b/editeng/source/editeng/textconv.hxx @@ -41,23 +41,23 @@ class TextConvWrapper : public editeng::HangulHanjaConversion EditView * pEditView; Window * pWin; - sal_Bool bStartChk; - sal_Bool bStartDone; - sal_Bool bEndDone; - sal_Bool bAllowChange; // storage for _bAllowImplicitChangesForNotConvertibleText + bool bStartChk; + bool bStartDone; + bool bEndDone; + bool bAllowChange; // storage for _bAllowImplicitChangesForNotConvertibleText // parameters value of function GetNextPortion. // used to transport the value to where it is needed. // from SvxSpellWrapper copied and modified - sal_Bool ConvNext_impl(); // former SpellNext - sal_Bool FindConvText_impl(); // former FindSpellError - sal_Bool ConvMore_impl(); // former SpellMore + bool ConvNext_impl(); // former SpellNext + bool FindConvText_impl(); // former FindSpellError + bool ConvMore_impl(); // former SpellMore // from EditSpellWrapper copied and modified void ConvStart_impl( SvxSpellArea eSpell ); // former SpellStart void ConvEnd_impl(); // former SpellEnd - sal_Bool ConvContinue_impl(); // former SpellContinue + bool ConvContinue_impl(); // former SpellContinue void SelectNewUnit_impl( const sal_Int32 nUnitStart, const sal_Int32 nUnitEnd ); @@ -66,7 +66,7 @@ class TextConvWrapper : public editeng::HangulHanjaConversion const OUString& rOrigText, const ::com::sun::star::uno::Sequence< sal_Int32 > *pOffsets, ESelection *pESelection ); - void ChangeText_impl( const String &rNewText, sal_Bool bKeepAttributes ); + void ChangeText_impl( const String &rNewText, bool bKeepAttributes ); // Forbidden and not implemented. TextConvWrapper (const TextConvWrapper &); @@ -75,7 +75,7 @@ class TextConvWrapper : public editeng::HangulHanjaConversion protected: virtual void GetNextPortion( OUString& /* [out] */ rNextPortion, LanguageType& /* [out] */ rLangOfPortion, - sal_Bool /* [in] */ _bAllowImplicitChangesForNotConvertibleText ); + bool /* [in] */ _bAllowImplicitChangesForNotConvertibleText ); virtual void HandleNewUnit( const sal_Int32 nUnitStart, const sal_Int32 nUnitEnd ); virtual void ReplaceUnit( @@ -86,7 +86,7 @@ protected: ReplacementAction eAction, LanguageType *pNewUnitLanguage ); - virtual sal_Bool HasRubySupport() const; + virtual bool HasRubySupport() const; void SetLanguageAndFont( const ESelection &rESel, LanguageType nLang, sal_uInt16 nLangWhichId, @@ -100,8 +100,8 @@ public: const ::com::sun::star::lang::Locale& rTargetLocale, const Font* pTargetFont, sal_Int32 nOptions, - sal_Bool bIsInteractive, - sal_Bool bIsStart, EditView* pView ); + bool bIsInteractive, + bool bIsStart, EditView* pView ); virtual ~TextConvWrapper(); diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx index 860a673e1635..a1493fe9a4d8 100644 --- a/editeng/source/misc/hangulhanja.cxx +++ b/editeng/source/misc/hangulhanja.cxx @@ -84,7 +84,7 @@ namespace editeng LanguageType m_nTargetLang; // target language of new replacement text const Font* m_pTargetFont; // target font of new replacement text sal_Int32 m_nConvOptions; // text conversion options (as used by 'getConversions') - sal_Bool m_bIsInteractive; // specifies if the conversion requires user interaction + bool m_bIsInteractive; // specifies if the conversion requires user interaction // (and likeley a specialised dialog) or if it is to run // automatically without any user interaction. // True for Hangul / Hanja conversion @@ -93,7 +93,7 @@ namespace editeng HangulHanjaConversion* m_pAntiImpl; // our "anti-impl" instance // options - sal_Bool m_bByCharacter; // are we in "by character" mode currently? + bool m_bByCharacter; // are we in "by character" mode currently? HHC::ConversionFormat m_eConversionFormat; // the current format for the conversion HHC::ConversionDirection m_ePrimaryConversionDirection; // the primary conversion direction HHC::ConversionDirection m_eCurrentConversionDirection; // the primary conversion direction @@ -114,7 +114,7 @@ namespace editeng Sequence< OUString > m_aCurrentSuggestions; // the suggestions for the current unit // (means for the text [m_nCurrentStartIndex, m_nCurrentEndIndex) in m_sCurrentPortion) - sal_Bool m_bTryBothDirections; // specifies if other conversion directions should be tried when looking for convertible characters + bool m_bTryBothDirections; // specifies if other conversion directions should be tried when looking for convertible characters public: @@ -125,24 +125,24 @@ namespace editeng const Locale& _rTargetLocale, const Font* _pTargetFont, sal_Int32 _nConvOptions, - sal_Bool _bIsInteractive, + bool _bIsInteractive, HangulHanjaConversion* _pAntiImpl ); public: - static void SetUseSavedConversionDirectionState( sal_Bool bVal ); + static void SetUseSavedConversionDirectionState( bool bVal ); void DoDocumentConversion( ); - inline sal_Bool IsByCharacter( ) const { return m_bByCharacter; } + inline bool IsByCharacter( ) const { return m_bByCharacter; } - inline sal_Bool IsValid() const { return m_xConverter.is(); } + inline bool IsValid() const { return m_xConverter.is(); } inline LanguageType GetSourceLang() const { return m_nSourceLang; } inline LanguageType GetTargetLang() const { return m_nTargetLang; } inline const Font * GetTargetFont() const { return m_pTargetFont; } inline sal_Int32 GetConvOptions() const { return m_nConvOptions; } - inline sal_Bool IsInteractive() const { return m_bIsInteractive; } + inline bool IsInteractive() const { return m_bIsInteractive; } protected: void createDialog(); @@ -152,7 +152,7 @@ namespace editeng if <TRUE/>, an implNextConvertible will be called initially to advance to the next convertible. if <FALSE/>, the method will initially work with the current convertible unit */ - sal_Bool ContinueConversion( bool _bRepeatCurrentUnit ); + bool ContinueConversion( bool _bRepeatCurrentUnit ); private: DECL_LINK( OnOptionsChanged, void* ); @@ -181,7 +181,7 @@ namespace editeng @see HangulHanjaConversion::GetNextPortion */ - sal_Bool implNextConvertible( bool _bRepeatUnit ); + bool implNextConvertible( bool _bRepeatUnit ); /** find the next convertible unit within the current portion @param _bRepeatUnit @@ -238,7 +238,7 @@ namespace editeng const Locale& _rTargetLocale, const Font* _pTargetFont, sal_Int32 _nOptions, - sal_Bool _bIsInteractive, + bool _bIsInteractive, HangulHanjaConversion* _pAntiImpl ) : m_pConversionDialog( NULL ) , m_pUIParent( _pUIParent ) @@ -255,7 +255,7 @@ namespace editeng , m_nReplacementBaseIndex( 0 ) , m_nCurrentConversionOption( TextConversionOption::NONE ) , m_nCurrentConversionType( -1 ) // not yet known -, m_bTryBothDirections( sal_True ) +, m_bTryBothDirections( true ) { implReadOptionsFromConfiguration(); @@ -338,9 +338,9 @@ namespace editeng // no need to check both directions for chinese conversion (saves time) if (m_eConvType == HHC::eConvSimplifiedTraditional) - m_bTryBothDirections = sal_False; + m_bTryBothDirections = false; - sal_Bool bFoundAny = sal_True; + bool bFoundAny = true; try { TextConversionResult aResult = m_xConverter->getConversions( @@ -351,7 +351,7 @@ namespace editeng m_nCurrentConversionType, m_nCurrentConversionOption ); - sal_Bool bFoundPrimary = aResult.Boundary.startPos < aResult.Boundary.endPos; + const bool bFoundPrimary = aResult.Boundary.startPos < aResult.Boundary.endPos; bFoundAny = bFoundPrimary; if ( m_bTryBothDirections ) @@ -380,7 +380,7 @@ namespace editeng // our current conversion direction changed now m_eCurrentConversionDirection = ( HHC::eHangulToHanja == m_eCurrentConversionDirection ) ? HHC::eHanjaToHangul : HHC::eHangulToHanja; - bFoundAny = sal_True; + bFoundAny = true; } } } @@ -473,7 +473,7 @@ namespace editeng bool HangulHanjaConversion_Impl::implRetrieveNextPortion( ) { - sal_Bool bAllowImplicitChanges = m_eConvType == HHC::eConvSimplifiedTraditional; + const bool bAllowImplicitChanges = m_eConvType == HHC::eConvSimplifiedTraditional; m_sCurrentPortion = OUString(); m_nCurrentPortionLang = LANGUAGE_NONE; @@ -489,7 +489,7 @@ namespace editeng return bRet; } - sal_Bool HangulHanjaConversion_Impl::implNextConvertible( bool _bRepeatUnit ) + bool HangulHanjaConversion_Impl::implNextConvertible( bool _bRepeatUnit ) { if ( _bRepeatUnit || ( m_nCurrentEndIndex < m_sCurrentPortion.getLength() ) ) { @@ -498,7 +498,7 @@ namespace editeng ? ( IsByCharacter() ? m_nCurrentStartIndex : m_nCurrentStartIndex ) : m_nCurrentEndIndex ) ) - return sal_True; + return true; } // no convertible text in the current portion anymore @@ -510,13 +510,13 @@ namespace editeng { // there is a next portion // -> find the next convertible unit in the current portion if ( implNextConvertibleUnit( 0 ) ) - return sal_True; + return true; } } while ( !m_sCurrentPortion.isEmpty() ); // no more portions - return sal_False; + return false; } OUString HangulHanjaConversion_Impl::GetCurrentUnit() const @@ -532,24 +532,24 @@ namespace editeng return sCurrentUnit; } - sal_Bool HangulHanjaConversion_Impl::ContinueConversion( bool _bRepeatCurrentUnit ) + bool HangulHanjaConversion_Impl::ContinueConversion( bool _bRepeatCurrentUnit ) { - sal_Bool bNeedUserInteraction = sal_False; // when we leave here, do we need user interaction? - sal_Bool bDocumentDone = sal_False; // did we already check the whole document? + bool bNeedUserInteraction = false; // when we leave here, do we need user interaction? + bool bDocumentDone = false; // did we already check the whole document? while ( !bDocumentDone && !bNeedUserInteraction && implNextConvertible( _bRepeatCurrentUnit ) ) { OUString sCurrentUnit( GetCurrentUnit() ); // do we need to ignore it? - sal_Bool bAlwaysIgnoreThis = m_sIgnoreList.end() != m_sIgnoreList.find( sCurrentUnit ); + const bool bAlwaysIgnoreThis = m_sIgnoreList.end() != m_sIgnoreList.find( sCurrentUnit ); // do we need to change it? StringMap::const_iterator aChangeListPos = m_aChangeList.find( sCurrentUnit ); - sal_Bool bAlwaysChangeThis = m_aChangeList.end() != aChangeListPos; + const bool bAlwaysChangeThis = m_aChangeList.end() != aChangeListPos; // do we automatically change this? - sal_Bool bAutoChange = m_bAutoReplaceUnique && m_aCurrentSuggestions.getLength() == 1; + const bool bAutoChange = m_bAutoReplaceUnique && m_aCurrentSuggestions.getLength() == 1; if (!m_bIsInteractive) { @@ -577,7 +577,7 @@ namespace editeng // do not look for the next convertible: We have to wait for the user to interactivly // decide what happens with the current convertible - bNeedUserInteraction = sal_True; + bNeedUserInteraction = true; } } @@ -678,7 +678,7 @@ namespace editeng //always open dialog if at least having a hangul or hanja text portion createDialog(); if(m_pAntiImpl->IsUseSavedConversionDirectionState()) - ContinueConversion( sal_False ); + ContinueConversion( false ); else implUpdateData(); m_pConversionDialog->Execute(); @@ -687,9 +687,9 @@ namespace editeng else { #ifdef DBG_UTIL - sal_Bool bCompletelyDone = + const bool bCompletelyDone = #endif - ContinueConversion( sal_False ); + ContinueConversion( false ); DBG_ASSERT( bCompletelyDone, "HangulHanjaConversion_Impl::DoDocumentConversion: ContinueConversion should have returned true here!" ); } } @@ -717,7 +717,7 @@ namespace editeng if (m_eConvType == HHC::eConvHangulHanja) { // is the original we're about to change in Hangul? - sal_Bool bOriginalIsHangul = HHC::eHangulToHanja == m_eCurrentConversionDirection; + const bool bOriginalIsHangul = HHC::eHangulToHanja == m_eCurrentConversionDirection; switch ( m_eConversionFormat ) { @@ -832,7 +832,7 @@ namespace editeng IMPL_LINK_NOARG(HangulHanjaConversion_Impl, OnIgnore) { // simply ignore, and proceed - implProceed( sal_False ); + implProceed( false ); return 0L; } @@ -850,7 +850,7 @@ namespace editeng m_sIgnoreList.insert( sCurrentUnit ); // and proceed - implProceed( sal_False ); + implProceed( false ); } return 0L; @@ -863,7 +863,7 @@ namespace editeng if( m_pConversionDialog ) implChange( m_pConversionDialog->GetCurrentSuggestion( ) ); // and proceed - implProceed( sal_False ); + implProceed( false ); return 0L; } @@ -886,7 +886,7 @@ namespace editeng } // and proceed - implProceed( sal_False ); + implProceed( false ); } return 0L; @@ -897,7 +897,7 @@ namespace editeng m_bByCharacter = _pBox->IsChecked(); // continue conversion, without advancing to the next unit, but instead continuing with the current unit - implProceed( sal_True ); + implProceed( true ); return 0L; } @@ -968,15 +968,15 @@ namespace editeng return 0L; } - sal_Bool HangulHanjaConversion::m_bUseSavedValues = sal_False; - sal_Bool HangulHanjaConversion::m_bTryBothDirectionsSave = sal_False; + bool HangulHanjaConversion::m_bUseSavedValues = false; + bool HangulHanjaConversion::m_bTryBothDirectionsSave = false; HHC::ConversionDirection HangulHanjaConversion::m_ePrimaryConversionDirectionSave = HHC::eHangulToHanja; HangulHanjaConversion::HangulHanjaConversion( Window* _pUIParent, const Reference< XComponentContext >& rxContext, const Locale& _rSourceLocale, const Locale& _rTargetLocale, const Font* _pTargetFont, - sal_Int32 _nOptions, sal_Bool _bIsInteractive) + sal_Int32 _nOptions, bool _bIsInteractive) :m_pImpl( new HangulHanjaConversion_Impl( _pUIParent, rxContext, _rSourceLocale, _rTargetLocale, _pTargetFont, _nOptions, _bIsInteractive, this ) ) { } @@ -985,12 +985,12 @@ namespace editeng { } - void HangulHanjaConversion::SetUseSavedConversionDirectionState( sal_Bool bVal ) + void HangulHanjaConversion::SetUseSavedConversionDirectionState( bool bVal ) { m_bUseSavedValues = bVal; } - sal_Bool HangulHanjaConversion::IsUseSavedConversionDirectionState() + bool HangulHanjaConversion::IsUseSavedConversionDirectionState() { return m_bUseSavedValues; } @@ -1015,7 +1015,7 @@ namespace editeng return m_pImpl->GetConvOptions(); } - sal_Bool HangulHanjaConversion::IsInteractive( ) const + bool HangulHanjaConversion::IsInteractive( ) const { return m_pImpl->IsInteractive(); } |