summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2013-04-21 16:55:25 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-04-22 07:16:25 +0000
commite0067f8451402f84093836e000acd09fe3ab820d (patch)
tree4afd4f60cd6f52f5bc3ed4c79861fa57d149469e
parent43c422ebb7a7c1431d179ed1b9572fabf9845aa8 (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>
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx10
-rw-r--r--cui/source/factory/dlgfact.cxx8
-rw-r--r--cui/source/factory/dlgfact.hxx8
-rw-r--r--cui/source/inc/hangulhanjadlg.hxx8
-rw-r--r--editeng/inc/editeng/edtdlg.hxx8
-rw-r--r--editeng/inc/editeng/hangulhanja.hxx28
-rw-r--r--editeng/source/editeng/impedit.hxx10
-rw-r--r--editeng/source/editeng/impedit4.cxx10
-rw-r--r--editeng/source/editeng/textconv.cxx76
-rw-r--r--editeng/source/editeng/textconv.hxx26
-rw-r--r--editeng/source/misc/hangulhanja.cxx86
-rw-r--r--sw/inc/hhcwrp.hxx34
-rw-r--r--sw/inc/splargs.hxx4
-rw-r--r--sw/source/ui/inc/view.hxx4
-rw-r--r--sw/source/ui/lingu/hhcwrp.cxx70
-rw-r--r--sw/source/ui/lingu/sdrhhcwrap.cxx4
-rw-r--r--sw/source/ui/lingu/sdrhhcwrap.hxx4
-rw-r--r--sw/source/ui/uiview/viewling.cxx8
18 files changed, 203 insertions, 203 deletions
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index ebf3a471a2e2..6d1eb8292de7 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -828,15 +828,15 @@ namespace svx
}
//-------------------------------------------------------------------------
- void HangulHanjaConversionDialog::SetByCharacter( sal_Bool _bByCharacter )
+ void HangulHanjaConversionDialog::SetByCharacter( bool _bByCharacter )
{
- m_aReplaceByChar.Check( _bByCharacter );
+ m_aReplaceByChar.Check( static_cast<sal_Bool>(_bByCharacter) );
m_aSuggestions.DisplayListBox( !_bByCharacter );
}
//-------------------------------------------------------------------------
void HangulHanjaConversionDialog::SetConversionDirectionState(
- sal_Bool _bTryBothDirections,
+ bool _bTryBothDirections,
HHC::ConversionDirection _ePrimaryConversionDirection )
{
// default state: try both direction
@@ -855,7 +855,7 @@ namespace svx
}
//-------------------------------------------------------------------------
- sal_Bool HangulHanjaConversionDialog::GetUseBothDirections( ) const
+ bool HangulHanjaConversionDialog::GetUseBothDirections( ) const
{
return !m_aHangulOnly.IsChecked() && !m_aHanjaOnly.IsChecked();
}
@@ -912,7 +912,7 @@ namespace svx
}
//-------------------------------------------------------------------------
- void HangulHanjaConversionDialog::EnableRubySupport( sal_Bool bVal )
+ void HangulHanjaConversionDialog::EnableRubySupport( bool bVal )
{
m_pHanjaAbove->Enable( bVal );
m_pHanjaBelow->Enable( bVal );
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 041557df8f5c..1bc939928a4b 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -255,17 +255,17 @@ void AbstractHangulHanjaConversionDialog_Impl::EndDialog(long nResult)
pDlg->EndDialog(nResult);
}
-void AbstractHangulHanjaConversionDialog_Impl::EnableRubySupport( sal_Bool _bVal )
+void AbstractHangulHanjaConversionDialog_Impl::EnableRubySupport( bool _bVal )
{
pDlg->EnableRubySupport(_bVal);
}
-void AbstractHangulHanjaConversionDialog_Impl::SetByCharacter( sal_Bool _bByCharacter )
+void AbstractHangulHanjaConversionDialog_Impl::SetByCharacter( bool _bByCharacter )
{
pDlg->SetByCharacter(_bByCharacter);
}
-void AbstractHangulHanjaConversionDialog_Impl::SetConversionDirectionState( sal_Bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection )
+void AbstractHangulHanjaConversionDialog_Impl::SetConversionDirectionState( bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection )
{
pDlg->SetConversionDirectionState(_bTryBothDirections, _ePrimaryConversionDirection);
}
@@ -314,7 +314,7 @@ void AbstractHangulHanjaConversionDialog_Impl::SetFindHdl( const Link& _rHdl )
pDlg->SetFindHdl(_rHdl );
}
-sal_Bool AbstractHangulHanjaConversionDialog_Impl::GetUseBothDirections( ) const
+bool AbstractHangulHanjaConversionDialog_Impl::GetUseBothDirections( ) const
{
return pDlg->GetUseBothDirections();
}
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index cf29bdf3cac0..34c4913e2900 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -148,9 +148,9 @@ class AbstractHangulHanjaConversionDialog_Impl: public AbstractHangulHanjaConver
{
DECL_ABSTDLG_BASE(AbstractHangulHanjaConversionDialog_Impl,HangulHanjaConversionDialog)
virtual void EndDialog(long nResult = 0);
- virtual void EnableRubySupport( sal_Bool _bVal );
- virtual void SetByCharacter( sal_Bool _bByCharacter ) ;
- virtual void SetConversionDirectionState( sal_Bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection );
+ virtual void EnableRubySupport( bool _bVal );
+ virtual void SetByCharacter( bool _bByCharacter ) ;
+ virtual void SetConversionDirectionState( bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection );
virtual void SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType );
virtual void SetOptionsChangedHdl( const Link& _rHdl );
virtual void SetIgnoreHdl( const Link& _rHdl );
@@ -160,7 +160,7 @@ class AbstractHangulHanjaConversionDialog_Impl: public AbstractHangulHanjaConver
virtual void SetClickByCharacterHdl( const Link& _rHdl ) ;
virtual void SetConversionFormatChangedHdl( const Link& _rHdl ) ;
virtual void SetFindHdl( const Link& _rHdl );
- virtual sal_Bool GetUseBothDirections( ) const;
+ virtual bool GetUseBothDirections( ) const;
virtual editeng::HangulHanjaConversion::ConversionDirection GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const;
virtual void SetCurrentString(
const String& _rNewString,
diff --git a/cui/source/inc/hangulhanjadlg.hxx b/cui/source/inc/hangulhanjadlg.hxx
index 5927c53106e5..48284bc5165a 100644
--- a/cui/source/inc/hangulhanjadlg.hxx
+++ b/cui/source/inc/hangulhanjadlg.hxx
@@ -168,18 +168,18 @@ namespace svx
void SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType );
editeng::HangulHanjaConversion::ConversionFormat GetConversionFormat( ) const;
- void SetByCharacter( sal_Bool _bByCharacter );
- void SetConversionDirectionState( sal_Bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection );
+ void SetByCharacter( bool _bByCharacter );
+ void SetConversionDirectionState( bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection );
/// should text which does not match the primary conversion direction be ignored?
- sal_Bool GetUseBothDirections( ) const;
+ bool GetUseBothDirections( ) const;
/** get current conversion direction to use
(return argument if GetUseBothDirections is true) */
editeng::HangulHanjaConversion::ConversionDirection GetDirection( editeng::HangulHanjaConversion::ConversionDirection eDefaultDirection ) const;
/// enables or disbales the checkboxes for ruby formatted replacements
- void EnableRubySupport( sal_Bool bVal );
+ void EnableRubySupport( bool bVal );
private:
DECL_LINK( OnClose, void* );
diff --git a/editeng/inc/editeng/edtdlg.hxx b/editeng/inc/editeng/edtdlg.hxx
index a663d409985d..7c998dfa637b 100644
--- a/editeng/inc/editeng/edtdlg.hxx
+++ b/editeng/inc/editeng/edtdlg.hxx
@@ -57,9 +57,9 @@ public:
class AbstractHangulHanjaConversionDialog : public VclAbstractTerminatedDialog
{
public:
- virtual void EnableRubySupport( sal_Bool _bVal ) = 0;
- virtual void SetByCharacter( sal_Bool _bByCharacter ) = 0;
- virtual void SetConversionDirectionState( sal_Bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ) = 0;
+ virtual void EnableRubySupport( bool _bVal ) = 0;
+ virtual void SetByCharacter( bool _bByCharacter ) = 0;
+ virtual void SetConversionDirectionState( bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ) = 0;
virtual void SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType ) = 0;
virtual void SetOptionsChangedHdl( const Link& _rHdl ) = 0;
virtual void SetIgnoreHdl( const Link& _rHdl ) = 0;
@@ -69,7 +69,7 @@ class AbstractHangulHanjaConversionDialog : public VclAbstractTerminatedDialog
virtual void SetClickByCharacterHdl( const Link& _rHdl ) = 0;
virtual void SetConversionFormatChangedHdl( const Link& _rHdl ) = 0;
virtual void SetFindHdl( const Link& _rHdl ) = 0;
- virtual sal_Bool GetUseBothDirections( ) const= 0;
+ virtual bool GetUseBothDirections() const= 0;
virtual editeng::HangulHanjaConversion::ConversionDirection GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const = 0;
virtual void SetCurrentString(
const String& _rNewString,
diff --git a/editeng/inc/editeng/hangulhanja.hxx b/editeng/inc/editeng/hangulhanja.hxx
index e48b31bcf972..014dc3e229a9 100644
--- a/editeng/inc/editeng/hangulhanja.hxx
+++ b/editeng/inc/editeng/hangulhanja.hxx
@@ -99,8 +99,8 @@ namespace editeng
SAL_WNODEPRECATED_DECLARATIONS_POP
// used to set initial values of m_pImpl object from saved ones
- static sal_Bool m_bUseSavedValues; // defines if the followng two values should be used for initialization
- static sal_Bool m_bTryBothDirectionsSave;
+ static bool m_bUseSavedValues; // defines if the followng two values should be used for initialization
+ static bool m_bTryBothDirectionsSave;
static ConversionDirection m_ePrimaryConversionDirectionSave;
// Forbidden and not implemented.
@@ -115,7 +115,7 @@ namespace editeng
const ::com::sun::star::lang::Locale& _rTargetLocale,
const Font* _pTargetFont,
sal_Int32 nOptions,
- sal_Bool _bIsInteractive
+ bool _bIsInteractive
);
virtual ~HangulHanjaConversion( );
@@ -127,20 +127,20 @@ namespace editeng
LanguageType GetTargetLanguage() const;
const Font * GetTargetFont() const;
sal_Int32 GetConversionOptions() const;
- sal_Bool IsInteractive() const;
+ bool IsInteractive() const;
// chinese text conversion
- static inline sal_Bool IsSimplified( LanguageType nLang );
- static inline sal_Bool IsTraditional( LanguageType nLang );
- static inline sal_Bool IsChinese( LanguageType nLang );
+ static inline bool IsSimplified( LanguageType nLang );
+ static inline bool IsTraditional( LanguageType nLang );
+ static inline bool IsChinese( LanguageType nLang );
// used to specify that the conversion direction states from the
// last incarnation should be used as
// initial conversion direction for the next incarnation.
// (A hack used to transport a state information from
// one incarnation to the next. Used in Writers text conversion...)
- static void SetUseSavedConversionDirectionState( sal_Bool bVal );
- static sal_Bool IsUseSavedConversionDirectionState();
+ static void SetUseSavedConversionDirectionState( bool bVal );
+ static bool IsUseSavedConversionDirectionState();
protected:
/** retrieves the next text portion which is to be analyzed
@@ -158,7 +158,7 @@ namespace editeng
virtual void GetNextPortion(
OUString& /* [out] */ _rNextPortion,
LanguageType& /* [out] */ _rLangOfPortion,
- sal_Bool /* [in] */ _bAllowImplicitChangesForNotConvertibleText ) = 0;
+ bool /* [in] */ _bAllowImplicitChangesForNotConvertibleText ) = 0;
/** announces a new "current unit"
@@ -262,20 +262,20 @@ namespace editeng
@return
<TRUE/> if rubies are supported.
*/
- virtual sal_Bool HasRubySupport() const = 0;
+ virtual bool HasRubySupport() const = 0;
};
- sal_Bool HangulHanjaConversion::IsSimplified( LanguageType nLang )
+ bool HangulHanjaConversion::IsSimplified( LanguageType nLang )
{
return MsLangId::isSimplifiedChinese(nLang);
}
- sal_Bool HangulHanjaConversion::IsTraditional( LanguageType nLang )
+ bool HangulHanjaConversion::IsTraditional( LanguageType nLang )
{
return MsLangId::isTraditionalChinese(nLang);
}
- sal_Bool HangulHanjaConversion::IsChinese( LanguageType nLang )
+ bool HangulHanjaConversion::IsChinese( LanguageType nLang )
{
return MsLangId::isChinese(nLang);
}
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();
}
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() );