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 /sw | |
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 'sw')
-rw-r--r-- | sw/inc/hhcwrp.hxx | 34 | ||||
-rw-r--r-- | sw/inc/splargs.hxx | 4 | ||||
-rw-r--r-- | sw/source/ui/inc/view.hxx | 4 | ||||
-rw-r--r-- | sw/source/ui/lingu/hhcwrp.cxx | 70 | ||||
-rw-r--r-- | sw/source/ui/lingu/sdrhhcwrap.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/lingu/sdrhhcwrap.hxx | 4 | ||||
-rw-r--r-- | sw/source/ui/uiview/viewling.cxx | 8 |
7 files changed, 64 insertions, 64 deletions
diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx index be20aa2f206c..81ad1f938c8d 100644 --- a/sw/inc/hhcwrp.hxx +++ b/sw/inc/hhcwrp.hxx @@ -46,22 +46,22 @@ class SwHHCWrapper : public editeng::HangulHanjaConversion sal_uInt16 m_nPageCount; ///< page count for progress bar sal_uInt16 m_nPageStart; ///< first checked page - sal_Bool m_bIsDrawObj; - sal_Bool m_bIsOtherCntnt; - sal_Bool m_bStartChk; - sal_Bool m_bIsSelection; ///< true if only the selected text should be converted - sal_Bool m_bStartDone; - sal_Bool m_bEndDone; + bool m_bIsDrawObj; + bool m_bIsOtherCntnt; + bool m_bStartChk; + bool m_bIsSelection; ///< true if only the selected text should be converted + bool m_bStartDone; + bool m_bEndDone; /// from SvxSpellWrapper copied and modified - sal_Bool ConvNext_impl(); ///< former SpellNext - sal_Bool FindConvText_impl(); ///< former FindSpellError + bool ConvNext_impl(); ///< former SpellNext + bool FindConvText_impl(); ///< former FindSpellError /// from SwSpellWrapper copied and modified - sal_Bool HasOtherCnt_impl(); + bool HasOtherCnt_impl(); void ConvStart_impl( SwConversionArgs *pConvArgs, SvxSpellArea eSpell ); ///< former SpellStart void ConvEnd_impl( SwConversionArgs *pConvArgs ); ///< former SpellEnd - sal_Bool ConvContinue_impl( SwConversionArgs *pConvArgs ); ///< former SpellContinue + bool ConvContinue_impl( SwConversionArgs *pConvArgs ); ///< former SpellContinue void SelectNewUnit_impl( const sal_Int32 nUnitStart, const sal_Int32 nUnitEnd ); @@ -69,15 +69,15 @@ class SwHHCWrapper : public editeng::HangulHanjaConversion const OUString& rOrigText, const ::com::sun::star::uno::Sequence< sal_Int32 > *pOffsets, SwPaM *pCrsr ); - void ChangeText_impl( const String &rNewText, sal_Bool bKeepAttributes ); + void ChangeText_impl( const String &rNewText, bool bKeepAttributes ); - inline sal_Bool IsDrawObj() { return m_bIsDrawObj; } - inline void SetDrawObj( sal_Bool bNew ) { m_bIsDrawObj = bNew; } + inline bool IsDrawObj() { return m_bIsDrawObj; } + inline void SetDrawObj( bool bNew ) { m_bIsDrawObj = bNew; } protected: virtual void GetNextPortion( OUString& rNextPortion, LanguageType& rLangOfPortion, - sal_Bool bAllowImplicitChangesForNotConvertibleText ); + bool bAllowImplicitChangesForNotConvertibleText ); virtual void HandleNewUnit( const sal_Int32 nUnitStart, const sal_Int32 nUnitEnd ); virtual void ReplaceUnit( @@ -88,7 +88,7 @@ protected: ReplacementAction eAction, LanguageType *pNewUnitLanguage ); - virtual sal_Bool HasRubySupport() const; + virtual bool HasRubySupport() const; public: SwHHCWrapper( @@ -96,8 +96,8 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext, LanguageType nSourceLanguage, LanguageType nTargetLanguage, const Font *pTargetFont, - sal_Int32 nConvOptions, sal_Bool bIsInteractive, - sal_Bool bStart, sal_Bool bOther, sal_Bool bSelection ); + sal_Int32 nConvOptions, bool bIsInteractive, + bool bStart, bool bOther, bool bSelection ); virtual ~SwHHCWrapper(); diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx index b9aae1ab8210..2c7d6af110b0 100644 --- a/sw/inc/splargs.hxx +++ b/sw/inc/splargs.hxx @@ -76,7 +76,7 @@ struct SwConversionArgs : SwArgsBase LanguageType nConvTargetLang; // target language of text to be changed const Font *pTargetFont; // target font of text to be changed // explicitly enables or disables application of the above two - sal_Bool bAllowImplicitChangesForNotConvertibleText; + bool bAllowImplicitChangesForNotConvertibleText; SwConversionArgs( LanguageType nLang, SwTxtNode* pStart, SwIndex& rStart, @@ -86,7 +86,7 @@ struct SwConversionArgs : SwArgsBase nConvTextLang( LANGUAGE_NONE ), nConvTargetLang( LANGUAGE_NONE ), pTargetFont( NULL ), - bAllowImplicitChangesForNotConvertibleText( sal_False ) + bAllowImplicitChangesForNotConvertibleText( false ) {} }; diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 62bbf1f52b9f..056ae0dd6a41 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -327,8 +327,8 @@ class SW_DLLPUBLIC SwView: public SfxViewShell SW_DLLPRIVATE void StartTextConversion( LanguageType nSourceLang, LanguageType nTargetLang, const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive ); // used for spell checking and text conversion - SW_DLLPRIVATE void SpellStart( SvxSpellArea eSpell, sal_Bool bStartDone, - sal_Bool bEndDone, SwConversionArgs *pConvArgs = 0 ); + SW_DLLPRIVATE void SpellStart( SvxSpellArea eSpell, bool bStartDone, + bool bEndDone, SwConversionArgs *pConvArgs = 0 ); SW_DLLPRIVATE void SpellEnd( SwConversionArgs *pConvArgs = 0 ); SW_DLLPRIVATE void HyphStart( SvxSpellArea eSpell ); diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx index 6daf340d03f9..5867e1207bd4 100644 --- a/sw/source/ui/lingu/hhcwrp.cxx +++ b/sw/source/ui/lingu/hhcwrp.cxx @@ -74,12 +74,12 @@ public: //!! hack to transport the current conversion direction state settings //!! into the next incarnation that iterates over the drawing objets //!! ( see SwHHCWrapper::~SwHHCWrapper() ) - editeng::HangulHanjaConversion::SetUseSavedConversionDirectionState( sal_True ); + editeng::HangulHanjaConversion::SetUseSavedConversionDirectionState( true ); } ~SwKeepConversionDirectionStateContext() { - editeng::HangulHanjaConversion::SetUseSavedConversionDirectionState( sal_False ); + editeng::HangulHanjaConversion::SetUseSavedConversionDirectionState( false ); } }; @@ -92,8 +92,8 @@ SwHHCWrapper::SwHHCWrapper( LanguageType nTargetLanguage, const Font *pTargetFont, sal_Int32 nConvOptions, - sal_Bool bIsInteractive, - sal_Bool bStart, sal_Bool bOther, sal_Bool bSelection ) + bool bIsInteractive, + bool bStart, bool bOther, bool bSelection ) : editeng::HangulHanjaConversion( &pSwView->GetEditWin(), rxContext, LanguageTag( nSourceLanguage ).getLocale(), LanguageTag( nTargetLanguage ).getLocale(), @@ -108,12 +108,12 @@ SwHHCWrapper::SwHHCWrapper( , m_nUnitOffset( 0 ) , m_nPageCount( 0 ) , m_nPageStart( 0 ) - , m_bIsDrawObj( sal_False ) + , m_bIsDrawObj( false ) , m_bIsOtherCntnt( bOther ) , m_bStartChk( bOther ) , m_bIsSelection( bSelection ) , m_bStartDone( bOther || bStart ) - , m_bEndDone( sal_False ) + , m_bEndDone( false ) { } @@ -170,7 +170,7 @@ SwHHCWrapper::~SwHHCWrapper() void SwHHCWrapper::GetNextPortion( OUString& rNextPortion, LanguageType& rLangOfPortion, - sal_Bool bAllowChanges ) + bool bAllowChanges ) { m_pConvArgs->bAllowImplicitChangesForNotConvertibleText = bAllowChanges; @@ -297,7 +297,7 @@ void SwHHCWrapper::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; @@ -327,12 +327,12 @@ void SwHHCWrapper::ChangeText( const String &rNewText, } else { - ChangeText_impl( rNewText, sal_False ); + ChangeText_impl( rNewText, false ); } } -void SwHHCWrapper::ChangeText_impl( const String &rNewText, sal_Bool bKeepAttributes ) +void SwHHCWrapper::ChangeText_impl( const String &rNewText, bool bKeepAttributes ) { if (bKeepAttributes) { @@ -401,7 +401,7 @@ void SwHHCWrapper::ReplaceUnit( OUString aNewTxt( rReplaceWith ); OSL_ENSURE( aOrigTxt == rOrigText, "!! text mismatch !!" ); SwFmtRuby *pRuby = 0; - sal_Bool bRubyBelow = sal_False; + bool bRubyBelow = false; String aNewOrigText; switch (eAction) { @@ -431,14 +431,14 @@ void SwHHCWrapper::ReplaceUnit( case eReplacementBelow : { pRuby = new SwFmtRuby( rReplaceWith ); - bRubyBelow = sal_True; + bRubyBelow = true; } break; case eOriginalBelow : { pRuby = new SwFmtRuby( aOrigTxt ); aNewOrigText = rReplaceWith; - bRubyBelow = sal_True; + bRubyBelow = true; } break; default: @@ -467,7 +467,7 @@ void SwHHCWrapper::ReplaceUnit( m_rWrtShell.Left( 0, sal_True, aNewOrigText.Len(), sal_True, sal_True ); } - pRuby->SetPosition( bRubyBelow ); + pRuby->SetPosition( static_cast<sal_uInt16>(bRubyBelow) ); pRuby->SetAdjustment( RubyAdjust_CENTER ); #if OSL_DEBUG_LEVEL > 1 @@ -485,7 +485,7 @@ void SwHHCWrapper::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() ); + const bool bIsChineseConversion = IsChinese( GetSourceLanguage() ); if (bIsChineseConversion) ChangeText( aNewTxt, rOrigText, &rOffsets, m_rWrtShell.GetCrsr() ); else @@ -536,9 +536,9 @@ void SwHHCWrapper::ReplaceUnit( } -sal_Bool SwHHCWrapper::HasRubySupport() const +bool SwHHCWrapper::HasRubySupport() const { - return sal_True; + return true; } @@ -586,7 +586,7 @@ void SwHHCWrapper::Convert() { m_pConvArgs->nConvTargetLang = GetTargetLanguage(); m_pConvArgs->pTargetFont = GetTargetFont(); - m_pConvArgs->bAllowImplicitChangesForNotConvertibleText = sal_True; + m_pConvArgs->bAllowImplicitChangesForNotConvertibleText = true; } // if it is not just a selection and we are about to begin @@ -631,7 +631,7 @@ void SwHHCWrapper::Convert() ConvStart_impl( m_pConvArgs, SVX_SPELL_OTHER ); else { - m_bStartChk = sal_False; + m_bStartChk = false; ConvStart_impl( m_pConvArgs, SVX_SPELL_BODY_END ); } @@ -641,28 +641,28 @@ void SwHHCWrapper::Convert() } -sal_Bool SwHHCWrapper::ConvNext_impl( ) +bool SwHHCWrapper::ConvNext_impl( ) { //! modified version of SvxSpellWrapper::SpellNext // no change of direction so the desired region is fully processed if( m_bStartChk ) - m_bStartDone = sal_True; + m_bStartDone = true; else - m_bEndDone = sal_True; + m_bEndDone = true; if( m_bIsOtherCntnt && m_bStartDone && m_bEndDone ) // document completely checked? { - return sal_False; + return false; } - sal_Bool bGoOn = sal_False; + bool bGoOn = false; if ( m_bIsOtherCntnt ) { - m_bStartChk = sal_False; + m_bStartChk = false; ConvStart_impl( m_pConvArgs, SVX_SPELL_BODY ); - bGoOn = sal_True; + bGoOn = true; } else if ( m_bStartDone && m_bEndDone ) { @@ -670,34 +670,34 @@ sal_Bool SwHHCWrapper::ConvNext_impl( ) if( HasOtherCnt_impl() ) { ConvStart_impl( m_pConvArgs, SVX_SPELL_OTHER ); - m_bIsOtherCntnt = bGoOn = sal_True; + m_bIsOtherCntnt = bGoOn = true; } } else { m_bStartChk = !m_bStartDone; ConvStart_impl( m_pConvArgs, m_bStartChk ? SVX_SPELL_BODY_START : SVX_SPELL_BODY_END ); - bGoOn = sal_True; + bGoOn = true; } return bGoOn; } -sal_Bool SwHHCWrapper::FindConvText_impl() +bool SwHHCWrapper::FindConvText_impl() { //! modified version of SvxSpellWrapper::FindSpellError - sal_Bool bFound = sal_False; + bool bFound = false; m_pWin->EnterWait(); - sal_Bool bConv = sal_True; + bool bConv = true; while ( bConv ) { bFound = ConvContinue_impl( m_pConvArgs ); if (bFound) { - bConv = sal_False; + bConv = false; } else { @@ -710,9 +710,9 @@ sal_Bool SwHHCWrapper::FindConvText_impl() } -sal_Bool SwHHCWrapper::HasOtherCnt_impl() +bool SwHHCWrapper::HasOtherCnt_impl() { - return m_bIsSelection ? sal_False : m_rWrtShell.HasOtherCnt(); + return m_bIsSelection ? false : m_rWrtShell.HasOtherCnt(); } @@ -729,7 +729,7 @@ void SwHHCWrapper::ConvEnd_impl( SwConversionArgs *pConversionArgs ) } -sal_Bool SwHHCWrapper::ConvContinue_impl( SwConversionArgs *pConversionArgs ) +bool SwHHCWrapper::ConvContinue_impl( SwConversionArgs *pConversionArgs ) { bool bProgress = !m_bIsDrawObj && !m_bIsSelection; pConversionArgs->aConvText = OUString(); diff --git a/sw/source/ui/lingu/sdrhhcwrap.cxx b/sw/source/ui/lingu/sdrhhcwrap.cxx index 3c55f5d45c2f..703cef2a4853 100644 --- a/sw/source/ui/lingu/sdrhhcwrap.cxx +++ b/sw/source/ui/lingu/sdrhhcwrap.cxx @@ -50,7 +50,7 @@ SdrHHCWrapper::SdrHHCWrapper( SwView* pVw, LanguageType nSourceLanguage, LanguageType nTargetLanguage, const Font* pTargetFnt, sal_Int32 nConvOptions, - sal_Bool bInteractive ) : + bool bInteractive ) : SdrOutliner(pVw->GetDocShell()->GetDoc()->GetDrawModel()-> GetDrawOutliner().GetEmptyItemSet().GetPool(), OUTLINERMODE_TEXTOBJECT ), @@ -104,7 +104,7 @@ SdrHHCWrapper::~SdrHHCWrapper() void SdrHHCWrapper::StartTextConversion() { - pOutlView->StartTextConversion( nSourceLang, nTargetLang, pTargetFont, nOptions, bIsInteractive, sal_True ); + pOutlView->StartTextConversion( nSourceLang, nTargetLang, pTargetFont, nOptions, static_cast<sal_Bool>(bIsInteractive), sal_True ); } diff --git a/sw/source/ui/lingu/sdrhhcwrap.hxx b/sw/source/ui/lingu/sdrhhcwrap.hxx index 86c9fc3af937..3932014c1b26 100644 --- a/sw/source/ui/lingu/sdrhhcwrap.hxx +++ b/sw/source/ui/lingu/sdrhhcwrap.hxx @@ -39,13 +39,13 @@ class SdrHHCWrapper : public SdrOutliner LanguageType nSourceLang; LanguageType nTargetLang; const Font* pTargetFont; - sal_Bool bIsInteractive; + bool bIsInteractive; public: SdrHHCWrapper( SwView* pVw, LanguageType nSourceLanguage, LanguageType nTargetLanguage, const Font* pTargetFnt, - sal_Int32 nConvOptions, sal_Bool bInteractive ); + sal_Int32 nConvOptions, bool bInteractive ); virtual ~SdrHHCWrapper(); diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx index b7f2fcfdfaa7..1e524c328833 100644 --- a/sw/source/ui/uiview/viewling.cxx +++ b/sw/source/ui/uiview/viewling.cxx @@ -243,11 +243,11 @@ void SwView::StartTextConversion( sal_Bool bOldIns = m_pWrtShell->IsInsMode(); m_pWrtShell->SetInsMode( sal_True ); - sal_Bool bSelection = ((SwCrsrShell*)m_pWrtShell)->HasSelection() || + const bool bSelection = ((SwCrsrShell*)m_pWrtShell)->HasSelection() || m_pWrtShell->GetCrsr() != m_pWrtShell->GetCrsr()->GetNext(); - sal_Bool bStart = bSelection || m_pWrtShell->IsStartOfDoc(); - sal_Bool bOther = !bSelection && !(m_pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY); + const bool bStart = bSelection || m_pWrtShell->IsStartOfDoc(); + const bool bOther = !bSelection && !(m_pWrtShell->GetFrmType(0,sal_True) & FRMTYPE_BODY); { const uno::Reference< uno::XComponentContext > xContext( @@ -267,7 +267,7 @@ void SwView::StartTextConversion( spellcheck and text conversion related stuff --------------------------------------------------------------------*/ void SwView::SpellStart( SvxSpellArea eWhich, - sal_Bool bStartDone, sal_Bool bEndDone, + bool bStartDone, bool bEndDone, SwConversionArgs *pConvArgs ) { Reference< beans::XPropertySet > xProp( ::GetLinguPropertySet() ); |