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

sal_Bool->bool

Change-Id: Ia6ab58e93218d91a364a7e6fbe616af8383bd3cf
üst cabf650a
...@@ -183,8 +183,8 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO ...@@ -183,8 +183,8 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO
static void GetSpellSettings( sal_uInt16& rDefLang, sal_uInt16& rCjkLang, sal_uInt16& rCtlLang, static void GetSpellSettings( sal_uInt16& rDefLang, sal_uInt16& rCjkLang, sal_uInt16& rCtlLang,
bool& rAutoSpell ); bool& rAutoSpell );
static void SetAutoSpellProperty( sal_Bool bSet ); static void SetAutoSpellProperty( bool bSet );
static sal_Bool HasThesaurusLanguage( sal_uInt16 nLang ); static bool HasThesaurusLanguage( sal_uInt16 nLang );
sal_uInt16 GetOptDigitLanguage(); // from CTL options sal_uInt16 GetOptDigitLanguage(); // from CTL options
...@@ -198,15 +198,15 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO ...@@ -198,15 +198,15 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO
void ModifyOptions( const SfxItemSet& rOptSet ); void ModifyOptions( const SfxItemSet& rOptSet );
// InputHandler: // InputHandler:
sal_Bool IsEditMode(); // not for SC_INPUT_TYPE bool IsEditMode(); // not for SC_INPUT_TYPE
sal_Bool IsInputMode(); // also for SC_INPUT_TYPE bool IsInputMode(); // also for SC_INPUT_TYPE
void SetInputMode( ScInputMode eMode ); void SetInputMode( ScInputMode eMode );
sal_Bool InputKeyEvent( const KeyEvent& rKEvt, sal_Bool bStartEdit = false ); bool InputKeyEvent( const KeyEvent& rKEvt, bool bStartEdit = false );
SC_DLLPUBLIC void InputEnterHandler( sal_uInt8 nBlockMode = 0 ); SC_DLLPUBLIC void InputEnterHandler( sal_uInt8 nBlockMode = 0 );
void InputCancelHandler(); void InputCancelHandler();
void InputSelection( EditView* pView ); void InputSelection( EditView* pView );
void InputChanged( EditView* pView ); void InputChanged( EditView* pView );
ScInputHandler* GetInputHdl( ScTabViewShell* pViewSh = NULL, sal_Bool bUseRef = sal_True ); ScInputHandler* GetInputHdl( ScTabViewShell* pViewSh = NULL, bool bUseRef = true );
void SetRefInputHdl( ScInputHandler* pNew ); void SetRefInputHdl( ScInputHandler* pNew );
ScInputHandler* GetRefInputHdl(); ScInputHandler* GetRefInputHdl();
...@@ -220,18 +220,18 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO ...@@ -220,18 +220,18 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO
void InputTurnOffWinEngine(); void InputTurnOffWinEngine();
OUString InputGetFormulaStr(); OUString InputGetFormulaStr();
void ActivateInputWindow( const OUString* pStr = NULL, void ActivateInputWindow( const OUString* pStr = NULL,
sal_Bool bMatrix = false ); bool bMatrix = false );
void InitFormEditData(); void InitFormEditData();
void ClearFormEditData(); void ClearFormEditData();
ScFormEditData* GetFormEditData() { return pFormEditData; } ScFormEditData* GetFormEditData() { return pFormEditData; }
// input of reference: // input of reference:
SC_DLLPUBLIC void SetRefDialog( sal_uInt16 nId, sal_Bool bVis, SfxViewFrame* pViewFrm = NULL ); SC_DLLPUBLIC void SetRefDialog( sal_uInt16 nId, bool bVis, SfxViewFrame* pViewFrm = NULL );
sal_Bool IsModalMode(SfxObjectShell* pDocSh = NULL); bool IsModalMode(SfxObjectShell* pDocSh = NULL);
sal_Bool IsFormulaMode(); bool IsFormulaMode();
sal_Bool IsRefDialogOpen(); bool IsRefDialogOpen();
sal_Bool IsTableLocked(); bool IsTableLocked();
void SetReference( const ScRange& rRef, ScDocument* pDoc, void SetReference( const ScRange& rRef, ScDocument* pDoc,
const ScMarkData* pMarkData = NULL ); const ScMarkData* pMarkData = NULL );
void AddRefEntry(); void AddRefEntry();
...@@ -248,9 +248,9 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO ...@@ -248,9 +248,9 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO
void SetInSharedDocSaving( bool bNew ) { mbIsInSharedDocSaving = bNew; } void SetInSharedDocSaving( bool bNew ) { mbIsInSharedDocSaving = bNew; }
bool IsInSharedDocSaving() const { return mbIsInSharedDocSaving; } bool IsInSharedDocSaving() const { return mbIsInSharedDocSaving; }
SC_DLLPUBLIC sal_Bool RegisterRefWindow( sal_uInt16 nSlotId, Window *pWnd ); SC_DLLPUBLIC bool RegisterRefWindow( sal_uInt16 nSlotId, Window *pWnd );
SC_DLLPUBLIC sal_Bool UnregisterRefWindow( sal_uInt16 nSlotId, Window *pWnd ); SC_DLLPUBLIC bool UnregisterRefWindow( sal_uInt16 nSlotId, Window *pWnd );
SC_DLLPUBLIC sal_Bool IsAliveRefDlg( sal_uInt16 nSlotId, Window *pWnd ); SC_DLLPUBLIC bool IsAliveRefDlg( sal_uInt16 nSlotId, Window *pWnd );
SC_DLLPUBLIC Window * Find1RefWindow( sal_uInt16 nSlotId, Window *pWndAncestor ); SC_DLLPUBLIC Window * Find1RefWindow( sal_uInt16 nSlotId, Window *pWndAncestor );
ScAnyRefModalDlg* GetCurrentAnyRefDlg(); ScAnyRefModalDlg* GetCurrentAnyRefDlg();
......
...@@ -1422,7 +1422,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) ...@@ -1422,7 +1422,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
// //
//------------------------------------------------------------------ //------------------------------------------------------------------
ScInputHandler* ScModule::GetInputHdl( ScTabViewShell* pViewSh, sal_Bool bUseRef ) ScInputHandler* ScModule::GetInputHdl( ScTabViewShell* pViewSh, bool bUseRef )
{ {
if ( pRefInputHandler && bUseRef ) if ( pRefInputHandler && bUseRef )
return pRefInputHandler; return pRefInputHandler;
...@@ -1461,19 +1461,19 @@ void ScModule::SetInputMode( ScInputMode eMode ) ...@@ -1461,19 +1461,19 @@ void ScModule::SetInputMode( ScInputMode eMode )
pHdl->SetMode( eMode ); pHdl->SetMode( eMode );
} }
sal_Bool ScModule::IsEditMode() bool ScModule::IsEditMode()
{ {
ScInputHandler* pHdl = GetInputHdl(); ScInputHandler* pHdl = GetInputHdl();
return pHdl && pHdl->IsEditMode(); return pHdl && pHdl->IsEditMode();
} }
sal_Bool ScModule::IsInputMode() bool ScModule::IsInputMode()
{ {
ScInputHandler* pHdl = GetInputHdl(); ScInputHandler* pHdl = GetInputHdl();
return pHdl && pHdl->IsInputMode(); return pHdl && pHdl->IsInputMode();
} }
sal_Bool ScModule::InputKeyEvent( const KeyEvent& rKEvt, sal_Bool bStartEdit ) bool ScModule::InputKeyEvent( const KeyEvent& rKEvt, bool bStartEdit )
{ {
ScInputHandler* pHdl = GetInputHdl(); ScInputHandler* pHdl = GetInputHdl();
return ( pHdl ? pHdl->KeyInput( rKEvt, bStartEdit ) : false ); return ( pHdl ? pHdl->KeyInput( rKEvt, bStartEdit ) : false );
...@@ -1567,7 +1567,7 @@ OUString ScModule::InputGetFormulaStr() ...@@ -1567,7 +1567,7 @@ OUString ScModule::InputGetFormulaStr()
return aStr; return aStr;
} }
void ScModule::ActivateInputWindow( const OUString* pStrFormula, sal_Bool bMatrix ) void ScModule::ActivateInputWindow( const OUString* pStrFormula, bool bMatrix )
{ {
ScInputHandler* pHdl = GetInputHdl(); ScInputHandler* pHdl = GetInputHdl();
if ( pHdl ) if ( pHdl )
...@@ -1607,7 +1607,7 @@ void ScModule::ActivateInputWindow( const OUString* pStrFormula, sal_Bool bMatri ...@@ -1607,7 +1607,7 @@ void ScModule::ActivateInputWindow( const OUString* pStrFormula, sal_Bool bMatri
// //
//------------------------------------------------------------------ //------------------------------------------------------------------
void ScModule::SetRefDialog( sal_uInt16 nId, sal_Bool bVis, SfxViewFrame* pViewFrm ) void ScModule::SetRefDialog( sal_uInt16 nId, bool bVis, SfxViewFrame* pViewFrm )
{ {
//! move reference dialog handling to view //! move reference dialog handling to view
//! (only keep function autopilot here for references to other documents) //! (only keep function autopilot here for references to other documents)
...@@ -1671,12 +1671,12 @@ static SfxChildWindow* lcl_GetChildWinFromAnyView( sal_uInt16 nId ) ...@@ -1671,12 +1671,12 @@ static SfxChildWindow* lcl_GetChildWinFromAnyView( sal_uInt16 nId )
return NULL; // none found return NULL; // none found
} }
sal_Bool ScModule::IsModalMode(SfxObjectShell* pDocSh) bool ScModule::IsModalMode(SfxObjectShell* pDocSh)
{ {
//! move reference dialog handling to view //! move reference dialog handling to view
//! (only keep function autopilot here for references to other documents) //! (only keep function autopilot here for references to other documents)
sal_Bool bIsModal = false; bool bIsModal = false;
if ( nCurRefDlgId ) if ( nCurRefDlgId )
{ {
...@@ -1697,7 +1697,7 @@ sal_Bool ScModule::IsModalMode(SfxObjectShell* pDocSh) ...@@ -1697,7 +1697,7 @@ sal_Bool ScModule::IsModalMode(SfxObjectShell* pDocSh)
// in 592 and above, the dialog isn't visible in other views // in 592 and above, the dialog isn't visible in other views
// if the dialog is open but can't be accessed, disable input // if the dialog is open but can't be accessed, disable input
bIsModal = sal_True; bIsModal = true;
} }
// pChildWnd kann 0 sein, wenn der Dialog nach dem Umschalten // pChildWnd kann 0 sein, wenn der Dialog nach dem Umschalten
...@@ -1713,12 +1713,12 @@ sal_Bool ScModule::IsModalMode(SfxObjectShell* pDocSh) ...@@ -1713,12 +1713,12 @@ sal_Bool ScModule::IsModalMode(SfxObjectShell* pDocSh)
return bIsModal; return bIsModal;
} }
sal_Bool ScModule::IsTableLocked() bool ScModule::IsTableLocked()
{ {
//! move reference dialog handling to view //! move reference dialog handling to view
//! (only keep function autopilot here for references to other documents) //! (only keep function autopilot here for references to other documents)
sal_Bool bLocked = false; bool bLocked = false;
// bisher nur bei ScAnyRefDlg // bisher nur bei ScAnyRefDlg
...@@ -1731,18 +1731,18 @@ sal_Bool ScModule::IsTableLocked() ...@@ -1731,18 +1731,18 @@ sal_Bool ScModule::IsTableLocked()
else if( pModalDlg ) else if( pModalDlg )
bLocked = pModalDlg->IsTableLocked(); bLocked = pModalDlg->IsTableLocked();
else else
bLocked = sal_True; // for other views, see IsModalMode bLocked = true; // for other views, see IsModalMode
} }
return bLocked; return bLocked;
} }
sal_Bool ScModule::IsRefDialogOpen() bool ScModule::IsRefDialogOpen()
{ {
//! move reference dialog handling to view //! move reference dialog handling to view
//! (only keep function autopilot here for references to other documents) //! (only keep function autopilot here for references to other documents)
sal_Bool bIsOpen = false; bool bIsOpen = false;
if ( nCurRefDlgId ) if ( nCurRefDlgId )
{ {
...@@ -1753,18 +1753,18 @@ sal_Bool ScModule::IsRefDialogOpen() ...@@ -1753,18 +1753,18 @@ sal_Bool ScModule::IsRefDialogOpen()
else if(pModalDlg) else if(pModalDlg)
bIsOpen = pModalDlg->IsVisible(); bIsOpen = pModalDlg->IsVisible();
else else
bIsOpen = sal_True; // for other views, see IsModalMode bIsOpen = true; // for other views, see IsModalMode
} }
return bIsOpen; return bIsOpen;
} }
sal_Bool ScModule::IsFormulaMode() bool ScModule::IsFormulaMode()
{ {
//! move reference dialog handling to view //! move reference dialog handling to view
//! (only keep function autopilot here for references to other documents) //! (only keep function autopilot here for references to other documents)
sal_Bool bIsFormula = false; bool bIsFormula = false;
if ( nCurRefDlgId ) if ( nCurRefDlgId )
{ {
...@@ -1790,7 +1790,7 @@ sal_Bool ScModule::IsFormulaMode() ...@@ -1790,7 +1790,7 @@ sal_Bool ScModule::IsFormulaMode()
} }
if (bIsInEditCommand) if (bIsInEditCommand)
bIsFormula = sal_True; bIsFormula = true;
return bIsFormula; return bIsFormula;
} }
...@@ -2277,20 +2277,20 @@ IMPL_LINK( ScModule, CalcFieldValueHdl, EditFieldInfo*, pInfo ) ...@@ -2277,20 +2277,20 @@ IMPL_LINK( ScModule, CalcFieldValueHdl, EditFieldInfo*, pInfo )
return 0; return 0;
} }
sal_Bool ScModule::RegisterRefWindow( sal_uInt16 nSlotId, Window *pWnd ) bool ScModule::RegisterRefWindow( sal_uInt16 nSlotId, Window *pWnd )
{ {
std::list<Window*> & rlRefWindow = m_mapRefWindow[nSlotId]; std::list<Window*> & rlRefWindow = m_mapRefWindow[nSlotId];
if( std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd ) == rlRefWindow.end() ) if( std::find( rlRefWindow.begin(), rlRefWindow.end(), pWnd ) == rlRefWindow.end() )
{ {
rlRefWindow.push_back( pWnd ); rlRefWindow.push_back( pWnd );
return sal_True; return true;
} }
return false; return false;
} }
sal_Bool ScModule::UnregisterRefWindow( sal_uInt16 nSlotId, Window *pWnd ) bool ScModule::UnregisterRefWindow( sal_uInt16 nSlotId, Window *pWnd )
{ {
std::map<sal_uInt16, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId ); std::map<sal_uInt16, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
...@@ -2309,10 +2309,10 @@ sal_Bool ScModule::UnregisterRefWindow( sal_uInt16 nSlotId, Window *pWnd ) ...@@ -2309,10 +2309,10 @@ sal_Bool ScModule::UnregisterRefWindow( sal_uInt16 nSlotId, Window *pWnd )
if( rlRefWindow.empty() ) if( rlRefWindow.empty() )
m_mapRefWindow.erase( nSlotId ); m_mapRefWindow.erase( nSlotId );
return sal_True; return true;
} }
sal_Bool ScModule::IsAliveRefDlg( sal_uInt16 nSlotId, Window *pWnd ) bool ScModule::IsAliveRefDlg( sal_uInt16 nSlotId, Window *pWnd )
{ {
std::map<sal_uInt16, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId ); std::map<sal_uInt16, std::list<Window*> >::iterator iSlot = m_mapRefWindow.find( nSlotId );
...@@ -2417,7 +2417,7 @@ void ScModule::GetSpellSettings( sal_uInt16& rDefLang, sal_uInt16& rCjkLang, sal ...@@ -2417,7 +2417,7 @@ void ScModule::GetSpellSettings( sal_uInt16& rDefLang, sal_uInt16& rCjkLang, sal
rAutoSpell = aOptions.bIsSpellAuto; rAutoSpell = aOptions.bIsSpellAuto;
} }
void ScModule::SetAutoSpellProperty( sal_Bool bSet ) void ScModule::SetAutoSpellProperty( bool bSet )
{ {
// use SvtLinguConfig instead of service LinguProperties to avoid // use SvtLinguConfig instead of service LinguProperties to avoid
// loading the linguistic component // loading the linguistic component
...@@ -2428,12 +2428,12 @@ void ScModule::SetAutoSpellProperty( sal_Bool bSet ) ...@@ -2428,12 +2428,12 @@ void ScModule::SetAutoSpellProperty( sal_Bool bSet )
aConfig.SetProperty( OUString( LINGUPROP_AUTOSPELL ), aAny ); aConfig.SetProperty( OUString( LINGUPROP_AUTOSPELL ), aAny );
} }
sal_Bool ScModule::HasThesaurusLanguage( sal_uInt16 nLang ) bool ScModule::HasThesaurusLanguage( sal_uInt16 nLang )
{ {
if ( nLang == LANGUAGE_NONE ) if ( nLang == LANGUAGE_NONE )
return false; return false;
sal_Bool bHasLang = false; bool bHasLang = false;
try try
{ {
uno::Reference< linguistic2::XThesaurus > xThes(LinguMgr::GetThesaurus()); uno::Reference< linguistic2::XThesaurus > xThes(LinguMgr::GetThesaurus());
......
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