Kaydet (Commit) 2c4621c8 authored tarafından Noel Grandin's avatar Noel Grandin

editeng: sal_Bool->bool

Change-Id: I659497b79fe809865639429f2744d815f2a1f3e2
üst fdf28427
...@@ -106,7 +106,7 @@ void EditSpellWrapper::SpellStart( SvxSpellArea eArea ) ...@@ -106,7 +106,7 @@ void EditSpellWrapper::SpellStart( SvxSpellArea eArea )
} }
} }
sal_Bool EditSpellWrapper::SpellContinue() bool EditSpellWrapper::SpellContinue()
{ {
SetLast( pEditView->GetImpEditEngine()->ImpSpell( pEditView ) ); SetLast( pEditView->GetImpEditEngine()->ImpSpell( pEditView ) );
return GetLast().is(); return GetLast().is();
...@@ -118,12 +118,12 @@ void EditSpellWrapper::SpellEnd() ...@@ -118,12 +118,12 @@ void EditSpellWrapper::SpellEnd()
SvxSpellWrapper::SpellEnd(); SvxSpellWrapper::SpellEnd();
} }
sal_Bool EditSpellWrapper::HasOtherCnt() bool EditSpellWrapper::HasOtherCnt()
{ {
return false; return false;
} }
sal_Bool EditSpellWrapper::SpellMore() bool EditSpellWrapper::SpellMore()
{ {
EditEngine* pEE = pEditView->GetEditEngine(); EditEngine* pEE = pEditView->GetEditEngine();
ImpEditEngine* pImpEE = pEditView->GetImpEditEngine(); ImpEditEngine* pImpEE = pEditView->GetImpEditEngine();
......
...@@ -46,11 +46,11 @@ private: ...@@ -46,11 +46,11 @@ private:
protected: protected:
virtual void SpellStart( SvxSpellArea eArea ); virtual void SpellStart( SvxSpellArea eArea );
virtual sal_Bool SpellContinue(); // Check area virtual bool SpellContinue(); // Check area
virtual void ReplaceAll( const OUString &rNewText, sal_Int16 nLanguage ); virtual void ReplaceAll( const OUString &rNewText, sal_Int16 nLanguage );
virtual void SpellEnd(); virtual void SpellEnd();
virtual sal_Bool SpellMore(); virtual bool SpellMore();
virtual sal_Bool HasOtherCnt(); virtual bool HasOtherCnt();
virtual void ScrollArea(); virtual void ScrollArea();
virtual void ChangeWord( const OUString& rNewWord, const sal_uInt16 nLang ); virtual void ChangeWord( const OUString& rNewWord, const sal_uInt16 nLang );
virtual void ChangeThesWord( const OUString& rNewWord ); virtual void ChangeThesWord( const OUString& rNewWord );
......
...@@ -147,22 +147,22 @@ SvxSpellWrapper::~SvxSpellWrapper() ...@@ -147,22 +147,22 @@ SvxSpellWrapper::~SvxSpellWrapper()
SvxSpellWrapper::SvxSpellWrapper( Window* pWn, SvxSpellWrapper::SvxSpellWrapper( Window* pWn,
Reference< XSpellChecker1 > &xSpellChecker, Reference< XSpellChecker1 > &xSpellChecker,
const sal_Bool bStart, const sal_Bool bIsAllRight, const bool bStart, const bool bIsAllRight,
const sal_Bool bOther, const sal_Bool bRevAllow ) : const bool bOther, const bool bRevAllow ) :
pWin ( pWn ), pWin ( pWn ),
xSpell ( xSpellChecker ), xSpell ( xSpellChecker ),
mpTextObj( NULL), mpTextObj( NULL),
bOtherCntnt ( bOther ), bOtherCntnt ( bOther ),
bDialog ( sal_False ), bDialog ( false ),
bHyphen ( sal_False ), bHyphen ( false ),
bAuto ( sal_False ), bAuto ( false ),
bStartChk ( bOther ), bStartChk ( bOther ),
bRevAllowed ( bRevAllow ), bRevAllowed ( bRevAllow ),
bAllRight ( bIsAllRight ) bAllRight ( bIsAllRight )
{ {
Reference< linguistic2::XLinguProperties > xProp( SvxGetLinguPropertySet() ); Reference< linguistic2::XLinguProperties > xProp( SvxGetLinguPropertySet() );
sal_Bool bWrapReverse = xProp.is() ? xProp->getIsWrapReverse() : sal_False; bool bWrapReverse = xProp.is() && xProp->getIsWrapReverse();
bReverse = bRevAllow && bWrapReverse; bReverse = bRevAllow && bWrapReverse;
bStartDone = bOther || ( !bReverse && bStart ); bStartDone = bOther || ( !bReverse && bStart );
bEndDone = bReverse && bStart && !bOther; bEndDone = bReverse && bStart && !bOther;
...@@ -172,20 +172,20 @@ SvxSpellWrapper::SvxSpellWrapper( Window* pWn, ...@@ -172,20 +172,20 @@ SvxSpellWrapper::SvxSpellWrapper( Window* pWn,
SvxSpellWrapper::SvxSpellWrapper( Window* pWn, SvxSpellWrapper::SvxSpellWrapper( Window* pWn,
Reference< XHyphenator > &xHyphenator, Reference< XHyphenator > &xHyphenator,
const sal_Bool bStart, const sal_Bool bOther ) : const bool bStart, const bool bOther ) :
pWin ( pWn ), pWin ( pWn ),
xHyph ( xHyphenator ), xHyph ( xHyphenator ),
mpTextObj( NULL), mpTextObj( NULL),
bOtherCntnt ( bOther ), bOtherCntnt ( bOther ),
bDialog ( sal_False ), bDialog ( false ),
bHyphen ( sal_False ), bHyphen ( false ),
bAuto ( sal_False ), bAuto ( false ),
bReverse ( sal_False ), bReverse ( false ),
bStartDone ( bOther || ( !bReverse && bStart ) ), bStartDone ( bOther || ( !bReverse && bStart ) ),
bEndDone ( bReverse && bStart && !bOther ), bEndDone ( bReverse && bStart && !bOther ),
bStartChk ( bOther ), bStartChk ( bOther ),
bRevAllowed ( sal_False ), bRevAllowed ( false ),
bAllRight ( sal_True ) bAllRight ( true )
{ {
} }
...@@ -251,17 +251,17 @@ void SvxSpellWrapper::SpellStart( SvxSpellArea /*eSpell*/ ) ...@@ -251,17 +251,17 @@ void SvxSpellWrapper::SpellStart( SvxSpellArea /*eSpell*/ )
sal_Bool SvxSpellWrapper::HasOtherCnt() bool SvxSpellWrapper::HasOtherCnt()
{ {
return sal_False; // Is there a special area? return false; // Is there a special area?
} }
sal_Bool SvxSpellWrapper::SpellMore() bool SvxSpellWrapper::SpellMore()
{ {
return sal_False; // Should additional documents be examined? return false; // Should additional documents be examined?
} }
...@@ -277,9 +277,9 @@ void SvxSpellWrapper::SpellEnd() ...@@ -277,9 +277,9 @@ void SvxSpellWrapper::SpellEnd()
sal_Bool SvxSpellWrapper::SpellContinue() bool SvxSpellWrapper::SpellContinue()
{ {
return sal_False; return false;
} }
...@@ -360,7 +360,7 @@ void SvxSpellWrapper::SpellDocument( ) ...@@ -360,7 +360,7 @@ void SvxSpellWrapper::SpellDocument( )
{ {
if ( bOtherCntnt ) if ( bOtherCntnt )
{ {
bReverse = sal_False; bReverse = false;
SpellStart( SVX_SPELL_OTHER ); SpellStart( SVX_SPELL_OTHER );
} }
else else
...@@ -375,7 +375,7 @@ void SvxSpellWrapper::SpellDocument( ) ...@@ -375,7 +375,7 @@ void SvxSpellWrapper::SpellDocument( )
Reference< XHyphenatedWord > xHyphWord( GetLast(), UNO_QUERY ); Reference< XHyphenatedWord > xHyphWord( GetLast(), UNO_QUERY );
Window *pOld = pWin; Window *pOld = pWin;
bDialog = sal_True; bDialog = true;
if (xHyphWord.is()) if (xHyphWord.is())
{ {
EditAbstractDialogFactory* pFact = EditAbstractDialogFactory::Create(); EditAbstractDialogFactory* pFact = EditAbstractDialogFactory::Create();
...@@ -387,7 +387,7 @@ void SvxSpellWrapper::SpellDocument( ) ...@@ -387,7 +387,7 @@ void SvxSpellWrapper::SpellDocument( )
pDlg->Execute(); pDlg->Execute();
delete pDlg; delete pDlg;
} }
bDialog = sal_False; bDialog = false;
pWin = pOld; pWin = pOld;
}; };
} }
...@@ -396,27 +396,27 @@ void SvxSpellWrapper::SpellDocument( ) ...@@ -396,27 +396,27 @@ void SvxSpellWrapper::SpellDocument( )
// Select the next area // Select the next area
sal_Bool SvxSpellWrapper::SpellNext( ) bool SvxSpellWrapper::SpellNext( )
{ {
Reference< linguistic2::XLinguProperties > xProp( SvxGetLinguPropertySet() ); Reference< linguistic2::XLinguProperties > xProp( SvxGetLinguPropertySet() );
sal_Bool bWrapReverse = xProp.is() ? xProp->getIsWrapReverse() : sal_False; bool bWrapReverse = xProp.is() && xProp->getIsWrapReverse();
sal_Bool bActRev = bRevAllowed && bWrapReverse; bool bActRev = bRevAllowed && bWrapReverse;
// bActRev is the direction after Spell checking, bReverse is the one // bActRev is the direction after Spell checking, bReverse is the one
// at the beginning. // at the beginning.
if( bActRev == bReverse ) if( bActRev == bReverse )
{ // No change of direction, thus is the { // No change of direction, thus is the
if( bStartChk ) // desired area ( bStartChk ) if( bStartChk ) // desired area ( bStartChk )
bStartDone = sal_True; // completely processed. bStartDone = true; // completely processed.
else else
bEndDone = sal_True; bEndDone = true;
} }
else if( bReverse == bStartChk ) //For a change of direction, an area can else if( bReverse == bStartChk ) //For a change of direction, an area can
{ // be processed during certain circumstances { // be processed during certain circumstances
if( bStartChk ) // If the firdt part is spell checked in backwards if( bStartChk ) // If the firdt part is spell checked in backwards
bEndDone = sal_True; // and this is reversed in the process, then bEndDone = true; // and this is reversed in the process, then
else // then the end part is processed (and vice-versa). else // then the end part is processed (and vice-versa).
bStartDone = sal_True; bStartDone = true;
} }
bReverse = bActRev; bReverse = bActRev;
...@@ -424,39 +424,39 @@ sal_Bool SvxSpellWrapper::SpellNext( ) ...@@ -424,39 +424,39 @@ sal_Bool SvxSpellWrapper::SpellNext( )
{ {
if ( SpellMore() ) // spell check another document? if ( SpellMore() ) // spell check another document?
{ {
bOtherCntnt = sal_False; bOtherCntnt = false;
bStartDone = !bReverse; bStartDone = !bReverse;
bEndDone = bReverse; bEndDone = bReverse;
SpellStart( SVX_SPELL_BODY ); SpellStart( SVX_SPELL_BODY );
return sal_True; return true;
} }
return sal_False; return false;
} }
sal_Bool bGoOn = sal_False; bool bGoOn = false;
if ( bOtherCntnt ) if ( bOtherCntnt )
{ {
bStartChk = sal_False; bStartChk = false;
SpellStart( SVX_SPELL_BODY ); SpellStart( SVX_SPELL_BODY );
bGoOn = sal_True; bGoOn = true;
} }
else if ( bStartDone && bEndDone ) else if ( bStartDone && bEndDone )
{ {
sal_Bool bIsSpellSpecial = xProp.is() ? xProp->getIsSpellSpecial() : sal_False; bool bIsSpellSpecial = xProp.is() && xProp->getIsSpellSpecial();
// Body area done, ask for special area // Body area done, ask for special area
if( !IsHyphen() && bIsSpellSpecial && HasOtherCnt() ) if( !IsHyphen() && bIsSpellSpecial && HasOtherCnt() )
{ {
SpellStart( SVX_SPELL_OTHER ); SpellStart( SVX_SPELL_OTHER );
bOtherCntnt = bGoOn = sal_True; bOtherCntnt = bGoOn = true;
} }
else if ( SpellMore() ) // check another document? else if ( SpellMore() ) // check another document?
{ {
bOtherCntnt = sal_False; bOtherCntnt = false;
bStartDone = !bReverse; bStartDone = !bReverse;
bEndDone = bReverse; bEndDone = bReverse;
SpellStart( SVX_SPELL_BODY ); SpellStart( SVX_SPELL_BODY );
return sal_True; return true;
} }
} }
else else
...@@ -470,14 +470,14 @@ sal_Bool SvxSpellWrapper::SpellNext( ) ...@@ -470,14 +470,14 @@ sal_Bool SvxSpellWrapper::SpellNext( )
{ {
// sacrifice the other area if necessary ask for special area // sacrifice the other area if necessary ask for special area
WAIT_ON(); WAIT_ON();
bStartDone = bEndDone = sal_True; bStartDone = bEndDone = true;
return SpellNext(); return SpellNext();
} }
else else
{ {
bStartChk = !bStartDone; bStartChk = !bStartDone;
SpellStart( bStartChk ? SVX_SPELL_BODY_START : SVX_SPELL_BODY_END ); SpellStart( bStartChk ? SVX_SPELL_BODY_START : SVX_SPELL_BODY_END );
bGoOn = sal_True; bGoOn = true;
} }
WAIT_ON(); WAIT_ON();
} }
...@@ -530,14 +530,14 @@ Reference< XDictionary > SvxSpellWrapper::GetAllRightDic() const ...@@ -530,14 +530,14 @@ Reference< XDictionary > SvxSpellWrapper::GetAllRightDic() const
sal_Bool SvxSpellWrapper::FindSpellError() bool SvxSpellWrapper::FindSpellError()
{ {
ShowLanguageErrors(); ShowLanguageErrors();
Reference< XInterface > xRef; Reference< XInterface > xRef;
WAIT_ON(); WAIT_ON();
sal_Bool bSpell = sal_True; bool bSpell = true;
Reference< XDictionary > xAllRightDic; Reference< XDictionary > xAllRightDic;
if (IsAllRight()) if (IsAllRight())
...@@ -572,11 +572,11 @@ sal_Bool SvxSpellWrapper::FindSpellError() ...@@ -572,11 +572,11 @@ sal_Bool SvxSpellWrapper::FindSpellError()
LanguageTag( xAlt->getLocale() ).getLanguageType() ); LanguageTag( xAlt->getLocale() ).getLanguageType() );
} }
else else
bSpell = sal_False; bSpell = false;
} }
} }
else if (xHyphWord.is()) else if (xHyphWord.is())
bSpell = sal_False; bSpell = false;
else else
{ {
SpellEnd(); SpellEnd();
......
...@@ -56,31 +56,31 @@ private: ...@@ -56,31 +56,31 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XHyphenator > xHyph; ::com::sun::star::linguistic2::XHyphenator > xHyph;
SdrObject* mpTextObj; SdrObject* mpTextObj;
sal_Bool bOtherCntnt : 1; // set => Check special sections initially bool bOtherCntnt : 1; // set => Check special sections initially
sal_Bool bDialog : 1; // Is pWin the Svx...Dialog? bool bDialog : 1; // Is pWin the Svx...Dialog?
sal_Bool bHyphen : 1; // Split instead of spell checking bool bHyphen : 1; // Split instead of spell checking
sal_Bool bAuto : 1; // AutoCorrect available? bool bAuto : 1; // AutoCorrect available?
sal_Bool bReverse : 1; // Reverse spell check bool bReverse : 1; // Reverse spell check
sal_Bool bStartDone : 1; // Beginning already corrected bool bStartDone : 1; // Beginning already corrected
sal_Bool bEndDone : 1; // End part already corrected bool bEndDone : 1; // End part already corrected
sal_Bool bStartChk : 1; // Examine the beginning bool bStartChk : 1; // Examine the beginning
sal_Bool bRevAllowed : 1; // Reverse spell check prohibited bool bRevAllowed : 1; // Reverse spell check prohibited
sal_Bool bAllRight : 1; // Record wrong words in the dedicated bool bAllRight : 1; // Record wrong words in the dedicated
// dictionary and do not start the dialog. // dictionary and do not start the dialog.
EDITENG_DLLPRIVATE sal_Bool SpellNext(); // select next area EDITENG_DLLPRIVATE bool SpellNext(); // select next area
sal_Bool FindSpellError(); // Check for errors (over areas) bool FindSpellError(); // Check for errors (over areas)
public: public:
SvxSpellWrapper( Window* pWn, SvxSpellWrapper( Window* pWn,
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XSpellChecker1 > &xSpellChecker, ::com::sun::star::linguistic2::XSpellChecker1 > &xSpellChecker,
const sal_Bool bStart = sal_False, const sal_Bool bIsAllRight = sal_False, const bool bStart = false, const bool bIsAllRight = false,
const sal_Bool bOther = sal_False, const sal_Bool bRevAllow = sal_True ); const bool bOther = false, const bool bRevAllow = true );
SvxSpellWrapper( Window* pWn, SvxSpellWrapper( Window* pWn,
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XHyphenator > &xHyphenator, ::com::sun::star::linguistic2::XHyphenator > &xHyphenator,
const sal_Bool bStart = sal_False, const sal_Bool bOther = sal_False ); const bool bStart = false, const bool bOther = false );
virtual ~SvxSpellWrapper(); virtual ~SvxSpellWrapper();
...@@ -96,21 +96,21 @@ public: ...@@ -96,21 +96,21 @@ public:
static void ShowLanguageErrors(); static void ShowLanguageErrors();
void SpellDocument(); // Perform Spell Checking void SpellDocument(); // Perform Spell Checking
inline sal_Bool IsStartDone(){ return bStartDone; } inline bool IsStartDone(){ return bStartDone; }
inline sal_Bool IsEndDone(){ return bEndDone; } inline bool IsEndDone(){ return bEndDone; }
inline sal_Bool IsReverse(){ return bReverse; } inline bool IsReverse(){ return bReverse; }
inline sal_Bool IsDialog(){ return bDialog; } // SvxSpellCheckDialog OnScreen inline bool IsDialog(){ return bDialog; } // SvxSpellCheckDialog OnScreen
inline sal_Bool IsHyphen(){ return bHyphen; } // Split instead of Spell check inline bool IsHyphen(){ return bHyphen; } // Split instead of Spell check
inline void SetHyphen( const sal_Bool bNew = sal_True ){ bHyphen = bNew; } inline void SetHyphen( const bool bNew = true ){ bHyphen = bNew; }
inline ::com::sun::star::uno::Reference< inline ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XSpellChecker1 > ::com::sun::star::linguistic2::XSpellChecker1 >
GetXSpellChecker() { return xSpell; } GetXSpellChecker() { return xSpell; }
inline ::com::sun::star::uno::Reference< inline ::com::sun::star::uno::Reference<
::com::sun::star::linguistic2::XHyphenator > ::com::sun::star::linguistic2::XHyphenator >
GetXHyphenator() { return xHyph; } GetXHyphenator() { return xHyph; }
inline sal_Bool IsAllRight() { return bAllRight; } inline bool IsAllRight() { return bAllRight; }
inline Window* GetWin() { return pWin; } inline Window* GetWin() { return pWin; }
inline void EnableAutoCorrect() { bAuto = sal_True; } inline void EnableAutoCorrect() { bAuto = true; }
protected: protected:
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
...@@ -119,10 +119,10 @@ protected: ...@@ -119,10 +119,10 @@ protected:
void SetLast(const ::com::sun::star::uno::Reference< void SetLast(const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > &xNewLast) ::com::sun::star::uno::XInterface > &xNewLast)
{ xLast = xNewLast; } { xLast = xNewLast; }
virtual sal_Bool SpellMore(); // examine further documents? virtual bool SpellMore(); // examine further documents?
virtual sal_Bool HasOtherCnt(); // Are there any special areas? virtual bool HasOtherCnt(); // Are there any special areas?
virtual void SpellStart( SvxSpellArea eSpell ); // Preparing the area virtual void SpellStart( SvxSpellArea eSpell ); // Preparing the area
virtual sal_Bool SpellContinue(); // Check Areas virtual bool SpellContinue(); // Check Areas
// Result available through GetLast // Result available through GetLast
virtual void ReplaceAll( const OUString &rNewText, sal_Int16 nLanguage ); //Replace word from the replace list virtual void ReplaceAll( const OUString &rNewText, sal_Int16 nLanguage ); //Replace word from the replace list
virtual void StartThesaurus( const OUString &rWord, sal_uInt16 nLang ); virtual void StartThesaurus( const OUString &rWord, sal_uInt16 nLang );
......
...@@ -40,9 +40,9 @@ private: ...@@ -40,9 +40,9 @@ private:
protected: protected:
virtual void SpellStart( SvxSpellArea eSpell ); virtual void SpellStart( SvxSpellArea eSpell );
virtual sal_Bool SpellContinue(); virtual bool SpellContinue();
virtual void SpellEnd( ); virtual void SpellEnd( );
virtual sal_Bool SpellMore(); virtual bool SpellMore();
virtual void InsertHyphen( const sal_uInt16 nPos ); // insert hyphen virtual void InsertHyphen( const sal_uInt16 nPos ); // insert hyphen
public: public:
......
...@@ -76,7 +76,7 @@ void SwHyphWrapper::SpellStart( SvxSpellArea eSpell ) ...@@ -76,7 +76,7 @@ void SwHyphWrapper::SpellStart( SvxSpellArea eSpell )
sal_Bool SwHyphWrapper::SpellContinue() bool SwHyphWrapper::SpellContinue()
{ {
// for automatic separation, make actions visible only at the end // for automatic separation, make actions visible only at the end
boost::scoped_ptr<SwWait> pWait; boost::scoped_ptr<SwWait> pWait;
...@@ -109,12 +109,12 @@ void SwHyphWrapper::SpellEnd() ...@@ -109,12 +109,12 @@ void SwHyphWrapper::SpellEnd()
} }
sal_Bool SwHyphWrapper::SpellMore() bool SwHyphWrapper::SpellMore()
{ {
PSH->Push(); PSH->Push();
bInfoBox = sal_True; bInfoBox = sal_True;
PSH->Combine(); PSH->Combine();
return sal_False; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment