summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-13 12:28:36 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-10-15 04:52:52 +0200
commit8fb84ee62409dec8eb02982c9cf78fb42bf1747e (patch)
tree740ee81058114738da1e53082a0db1be3edab360 /sc/source
parentd342c9bebe446cb16285b203f207b4b215b5941a (diff)
sal_Bool to bool in anyrefdg.[ch]xx
Change-Id: I4efa09c0185e7825d5b705ca0171f52b8aae17df
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/inc/anyrefdg.hxx24
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx46
2 files changed, 35 insertions, 35 deletions
diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index 247edc018a24..8b66f68f2a05 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -62,7 +62,7 @@ class ScFormulaReferenceHelper
SfxBindings* m_pBindings;
::std::auto_ptr<Accelerator>
pAccel; // for Enter/Escape
- sal_Bool* pHiddenMarks; // Mark field for hidden Controls
+ bool* pHiddenMarks; // Mark field for hidden Controls
SCTAB nRefTab; // used for ShowReference
String sOldDialogText; // Original title of the dialog window
@@ -72,9 +72,9 @@ class ScFormulaReferenceHelper
Point aOldButtonPos; // Original position of the button
Window* mpOldEditParent; // Original parent of the edit field and the button
- sal_Bool bEnableColorRef;
- sal_Bool bHighLightRef;
- sal_Bool bAccInserted;
+ bool bEnableColorRef;
+ bool bHighLightRef;
+ bool bAccInserted;
DECL_LINK( AccelSelectHdl, Accelerator* );
@@ -89,25 +89,25 @@ public:
void ShowReference( const XubString& rStr );
void ReleaseFocus( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
- void HideReference( sal_Bool bDoneRefMode = sal_True );
+ void HideReference( bool bDoneRefMode = true );
void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
- void RefInputDone( sal_Bool bForced = false );
+ void RefInputDone( bool bForced = false );
void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
inline void SetWindow(Window* _pWindow) { m_pWindow = _pWindow; }
- sal_Bool DoClose( sal_uInt16 nId );
- void SetDispatcherLock( sal_Bool bLock );
- void EnableSpreadsheets( sal_Bool bFlag = sal_True, sal_Bool bChildren = sal_True );
+ bool DoClose( sal_uInt16 nId );
+ void SetDispatcherLock( bool bLock );
+ void EnableSpreadsheets( bool bFlag = true, bool bChildren = true );
void ViewShellChanged( ScTabViewShell* pScViewShell );
- static void enableInput(sal_Bool _bInput);
+ static void enableInput(bool _bInput);
protected:
Window * GetWindow(){ return m_pWindow; }
public:
bool CanInputStart( const formula::RefEdit *pEdit ){ return !!pEdit; }
- bool CanInputDone( sal_Bool bForced ){ return pRefEdit && (bForced || !pRefBtn); }
+ bool CanInputDone( bool bForced ){ return pRefEdit && (bForced || !pRefBtn); }
};
//============================================================================
@@ -139,7 +139,7 @@ private:
protected:
virtual sal_Bool DoClose( sal_uInt16 nId );
- void SetDispatcherLock( sal_Bool bLock );
+ void SetDispatcherLock( bool bLock );
//Overwrite TWindow will implemented by ScRefHdlrImplBase
//virtual long PreNotify( NotifyEvent& rNEvt );
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 8ebb1c3e21ca..3b4e9a485ac6 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -76,14 +76,14 @@ ScFormulaReferenceHelper::~ScFormulaReferenceHelper()
// common cleanup for ScAnyRefDlg and ScFormulaDlg is done here
HideReference();
- enableInput( sal_True );
+ enableInput( true );
ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl();
if ( pInputHdl )
pInputHdl->ResetDelayTimer(); // stop the timer for disabling the input line
}
// -----------------------------------------------------------------------------
-void ScFormulaReferenceHelper::enableInput( sal_Bool bEnable )
+void ScFormulaReferenceHelper::enableInput( bool bEnable )
{
TypeId aType(TYPE(ScDocShell));
ScDocShell* pDocShell = (ScDocShell*)SfxObjectShell::GetFirst(&aType);
@@ -105,8 +105,8 @@ void ScFormulaReferenceHelper::enableInput( sal_Bool bEnable )
Window *pParent=pWin->GetParent();
if(pParent)
{
- pParent->EnableInput(bEnable,sal_True /* sal_False */);
- if(sal_True /*bChildren*/)
+ pParent->EnableInput(bEnable,true /* sal_False */);
+ if(true /*bChildren*/)
pViewSh->EnableRefInput(bEnable);
}
}
@@ -123,7 +123,7 @@ void ScFormulaReferenceHelper::ShowSimpleReference( const XubString& rStr )
{
if( bEnableColorRef )
{
- bHighLightRef=sal_True;
+ bHighLightRef=true;
ScViewData* pViewData=ScDocShell::GetViewData();
if ( pViewData )
{
@@ -183,7 +183,7 @@ void ScFormulaReferenceHelper::ShowFormulaReference( const XubString& rStr )
{
if( /*!pRefEdit &&*/ bEnableColorRef)
{
- bHighLightRef=sal_True;
+ bHighLightRef=true;
ScViewData* pViewData=ScDocShell::GetViewData();
if ( pViewData && pRefComp.get() )
{
@@ -208,7 +208,7 @@ void ScFormulaReferenceHelper::ShowFormulaReference( const XubString& rStr )
while(pToken!=NULL)
{
- sal_Bool bDoubleRef=(pToken->GetType()==formula::svDoubleRef);
+ bool bDoubleRef=(pToken->GetType()==formula::svDoubleRef);
if(pToken->GetType()==formula::svSingleRef || bDoubleRef)
@@ -240,7 +240,7 @@ void ScFormulaReferenceHelper::ShowFormulaReference( const XubString& rStr )
}
}
// -----------------------------------------------------------------------------
-void ScFormulaReferenceHelper::HideReference( sal_Bool bDoneRefMode )
+void ScFormulaReferenceHelper::HideReference( bool bDoneRefMode )
{
ScViewData* pViewData=ScDocShell::GetViewData();
@@ -310,7 +310,7 @@ void ScFormulaReferenceHelper::ReleaseFocus( formula::RefEdit* pEdit, formula::R
pViewShell->MoveCursorAbs( pRange->aStart.Col(),
pRange->aStart.Row(), SC_FOLLOW_JUMP, false, false );
pViewShell->MoveCursorAbs( pRange->aEnd.Col(),
- pRange->aEnd.Row(), SC_FOLLOW_JUMP, sal_True, false );
+ pRange->aEnd.Row(), SC_FOLLOW_JUMP, true, false );
m_pDlg->SetReference( *pRange, pDoc );
}
}
@@ -333,7 +333,7 @@ void ScFormulaReferenceHelper::Init()
pRefCell.reset( new ScFormulaCell( pDoc, aCursorPos, rStrExp ) );
pRefComp.reset( new ScCompiler( pDoc, aCursorPos) );
pRefComp->SetGrammar( pDoc->GetGrammar() );
- pRefComp->SetCompileForFAP(sal_True);
+ pRefComp->SetCompileForFAP(true);
nRefTab = nTab;
}
@@ -350,13 +350,13 @@ IMPL_LINK( ScFormulaReferenceHelper, AccelSelectHdl, Accelerator *, pSelAccel )
case KEY_ESCAPE:
if( pRefEdit )
pRefEdit->GrabFocus();
- m_pDlg->RefInputDone( sal_True );
+ m_pDlg->RefInputDone( true );
break;
}
- return sal_True;
+ return true;
}
//----------------------------------------------------------------------------
-void ScFormulaReferenceHelper::RefInputDone( sal_Bool bForced )
+void ScFormulaReferenceHelper::RefInputDone( bool bForced )
{
if ( CanInputDone( bForced ) )
{
@@ -428,7 +428,7 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula::
// Alle Elemente ausser EditCell und Button verstecken
sal_uInt16 nChildren = m_pWindow->GetChildCount();
- pHiddenMarks = new sal_Bool [nChildren];
+ pHiddenMarks = new bool [nChildren];
for (sal_uInt16 i = 0; i < nChildren; i++)
{
pHiddenMarks[i] = false;
@@ -442,7 +442,7 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula::
; // do nothing
else if (pWin->IsVisible())
{
- pHiddenMarks[i] = sal_True;
+ pHiddenMarks[i] = true;
pWin->Hide();
}
}
@@ -498,11 +498,11 @@ void ScFormulaReferenceHelper::ToggleCollapsed( formula::RefEdit* pEdit, formula
if( pRefEdit == pEdit ) // is this the active ref edit field?
{
pRefEdit->GrabFocus(); // before RefInputDone()
- m_pDlg->RefInputDone( sal_True ); // finish ref input
+ m_pDlg->RefInputDone( true ); // finish ref input
}
else
{
- m_pDlg->RefInputDone( sal_True ); // another active ref edit?
+ m_pDlg->RefInputDone( true ); // another active ref edit?
m_pDlg->RefInputStart( pEdit, pButton ); // start ref input
// pRefEdit might differ from pEdit after RefInputStart() (i.e. ScFormulaDlg)
if( pRefEdit )
@@ -511,7 +511,7 @@ void ScFormulaReferenceHelper::ToggleCollapsed( formula::RefEdit* pEdit, formula
}
}
// -----------------------------------------------------------------------------
-sal_Bool ScFormulaReferenceHelper::DoClose( sal_uInt16 nId )
+bool ScFormulaReferenceHelper::DoClose( sal_uInt16 nId )
{
SfxApplication* pSfxApp = SFX_APP();
@@ -545,11 +545,11 @@ sal_Bool ScFormulaReferenceHelper::DoClose( sal_uInt16 nId )
ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell();
if ( pScViewShell )
- pScViewShell->UpdateInputHandler(sal_True);
+ pScViewShell->UpdateInputHandler(true);
- return sal_True;
+ return true;
}
-void ScFormulaReferenceHelper::SetDispatcherLock( sal_Bool bLock )
+void ScFormulaReferenceHelper::SetDispatcherLock( bool bLock )
{
// lock / unlock only the dispatchers of Calc documents
@@ -580,7 +580,7 @@ void ScFormulaReferenceHelper::ViewShellChanged(ScTabViewShell* /* pScViewShell
EnableSpreadsheets();
}
-void ScFormulaReferenceHelper::EnableSpreadsheets(sal_Bool bFlag, sal_Bool bChildren)
+void ScFormulaReferenceHelper::EnableSpreadsheets(bool bFlag, bool bChildren)
{
TypeId aType(TYPE(ScDocShell));
ScDocShell* pDocShell = (ScDocShell*)SfxObjectShell::GetFirst(&aType);
@@ -824,7 +824,7 @@ sal_Bool ScRefHandler::DoClose( sal_uInt16 nId )
return sal_True;
}
-void ScRefHandler::SetDispatcherLock( sal_Bool bLock )
+void ScRefHandler::SetDispatcherLock( bool bLock )
{
m_aHelper.SetDispatcherLock( bLock );
}