diff options
author | Noel Grandin <noel@peralex.com> | 2014-02-18 16:19:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-02-19 13:05:08 +0200 |
commit | ee5a85926203e81bc4f2cb1db158850b4773bd45 (patch) | |
tree | 9cc84acf000d789fa9f7413fd6b7bd2d1671b331 | |
parent | 87beef165ceca64a24f5d2699cf8e96ce3c21428 (diff) |
sal_Bool->bool
Change-Id: If54ff898eab251c44901de67280e6d7fcb491966
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/tabvwsh.hxx | 102 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/anyrefdg.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/navipi/content.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/pagedlg/tphfedit.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/undo/undotab.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/unoobj/viewuno.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh3.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh4.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/drawview.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsh2.cxx | 18 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsh3.cxx | 38 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsh4.cxx | 154 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsh5.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsha.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshb.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwshh.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun5.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun7.cxx | 4 |
20 files changed, 199 insertions, 199 deletions
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 9ce18b17d3ad..04e6aeb69e9d 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -261,7 +261,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : pInputHdl->SetMode( SC_INPUT_TABLE ); // Focus kommt eh nach unten } else if ( pViewSh ) - pViewSh->UpdateInputHandler( sal_True ); // unbedingtes Update + pViewSh->UpdateInputHandler( true ); // unbedingtes Update pImgMgr->RegisterToolBox( this ); SetAccessibleName(ScResId(STR_ACC_TOOLBAR_FORMULA)); diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index a60ca98a5d70..2b609e71520e 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -139,40 +139,40 @@ private: ScNavigatorSettings* pNavSettings; // used in first Activate - sal_Bool bFirstActivate; + bool bFirstActivate; - sal_Bool bActiveDrawSh; - sal_Bool bActiveDrawTextSh; - sal_Bool bActivePivotSh; - sal_Bool bActiveAuditingSh; - sal_Bool bActiveDrawFormSh; - sal_Bool bActiveOleObjectSh; - sal_Bool bActiveChartSh; - sal_Bool bActiveGraphicSh; - sal_Bool bActiveMediaSh; - sal_Bool bActiveEditSh; + bool bActiveDrawSh; + bool bActiveDrawTextSh; + bool bActivePivotSh; + bool bActiveAuditingSh; + bool bActiveDrawFormSh; + bool bActiveOleObjectSh; + bool bActiveChartSh; + bool bActiveGraphicSh; + bool bActiveMediaSh; + bool bActiveEditSh; - sal_Bool bFormShellAtTop; // does the FormShell need to be on top? + bool bFormShellAtTop; // does the FormShell need to be on top? - sal_Bool bDontSwitch; // Don't turn off EditShell - sal_Bool bInFormatDialog; // for GetSelectionText - sal_Bool bPrintSelected; // for result of SvxPrtQryBox + bool bDontSwitch; // Don't turn off EditShell + bool bInFormatDialog; // for GetSelectionText + bool bPrintSelected; // for result of SvxPrtQryBox - sal_Bool bReadOnly; // to detect status changes + bool bReadOnly; // to detect status changes - sal_Bool bIsActive; + bool bIsActive; SbxObject* pScSbxObject; - sal_Bool bChartAreaValid; // if chart is drawn - sal_Bool bForceFocusOnCurCell; // #i123629# + bool bChartAreaValid; // if chart is drawn + bool bForceFocusOnCurCell; // #i123629# OUString aEditChartName; ScRangeListRef aChartSource; Rectangle aChartPos; SCTAB nChartDestTab; - sal_uInt16 nCurRefDlgId; + sal_uInt16 nCurRefDlgId; SfxBroadcaster* pAccessibilityBroadcaster; @@ -250,10 +250,10 @@ public: void ExecuteInputDirect(); ScInputHandler* GetInputHandler() const; - void UpdateInputHandler( sal_Bool bForce = false, sal_Bool bStopEditing = sal_True ); + void UpdateInputHandler( bool bForce = false, bool bStopEditing = true ); void UpdateInputHandlerCellAdjust( SvxCellHorJustify eJust ); - sal_Bool TabKeyInput(const KeyEvent& rKEvt); - sal_Bool SfxKeyInput(const KeyEvent& rKEvt); + bool TabKeyInput(const KeyEvent& rKEvt); + bool SfxKeyInput(const KeyEvent& rKEvt); void SetActive(); @@ -300,32 +300,32 @@ public: void GetDrawOptState(SfxItemSet &rSet); void UpdateDrawShell(); - void SetDrawShell( sal_Bool bActive ); - void SetDrawTextShell( sal_Bool bActive ); + void SetDrawShell( bool bActive ); + void SetDrawTextShell( bool bActive ); - void SetPivotShell( sal_Bool bActive ); + void SetPivotShell( bool bActive ); ScArea* GetPivotSource(){return pPivotSource;} void SetPivotSource(ScArea* pSrc){pPivotSource=pSrc;} void SetDialogDPObject( const ScDPObject* pObj ); const ScDPObject* GetDialogDPObject() const { return pDialogDPObject; } - sal_Bool GetDontSwitch(){return bDontSwitch;} - void SetDontSwitch(sal_Bool bFlag){bDontSwitch=bFlag;} + bool GetDontSwitch(){return bDontSwitch;} + void SetDontSwitch(bool bFlag){bDontSwitch=bFlag;} - void SetAuditShell( sal_Bool bActive ); - void SetDrawFormShell( sal_Bool bActive ); - void SetEditShell(EditView* pView, sal_Bool bActive ); - void SetOleObjectShell( sal_Bool bActive ); - void SetChartShell( sal_Bool bActive ); - void SetGraphicShell( sal_Bool bActive ); - void SetMediaShell( sal_Bool bActive ); + void SetAuditShell( bool bActive ); + void SetDrawFormShell( bool bActive ); + void SetEditShell(EditView* pView, bool bActive ); + void SetOleObjectShell( bool bActive ); + void SetChartShell( bool bActive ); + void SetGraphicShell( bool bActive ); + void SetMediaShell( bool bActive ); void SetDrawShellOrSub(); - void SetCurSubShell( ObjectSelectionType eOST, sal_Bool bForce = false ); + void SetCurSubShell( ObjectSelectionType eOST, bool bForce = false ); - void SetFormShellAtTop( sal_Bool bSet ); + void SetFormShellAtTop( bool bSet ); ObjectSelectionType GetCurObjectSelectionType(); @@ -333,15 +333,15 @@ public: void StopEditShell(); - sal_Bool IsDrawTextShell() const; - sal_Bool IsAuditShell() const; + bool IsDrawTextShell() const; + bool IsAuditShell() const; void SetDrawTextUndo( ::svl::IUndoManager* pUndoMgr ); void FillFieldData( ScHeaderFieldData& rData ); void SetChartArea( const ScRangeListRef& rSource, const Rectangle& rDest ); - sal_Bool GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const; + bool GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const; void SetEditChartName(const OUString& aStr){aEditChartName=aStr;} @@ -351,14 +351,14 @@ public: // Drucken: virtual SfxPrinter* GetPrinter( sal_Bool bCreate = false ); - virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, + virtual sal_uInt16 SetPrinter( SfxPrinter* pNewPrinter, sal_uInt16 nDiffFlags = SFX_PRINTER_ALL, bool bIsApi=false ); virtual bool HasPrintOptionsPage() const; virtual SfxTabPage* CreatePrintOptionsPage( Window *pParent, const SfxItemSet &rOptions ); void ConnectObject( SdrOle2Obj* pObj ); - sal_Bool ActivateObject( SdrOle2Obj* pObj, long nVerb ); + bool ActivateObject( SdrOle2Obj* pObj, long nVerb ); void DeactivateOle(); @@ -381,10 +381,10 @@ public: const Point* pInsPos = NULL ); void InsertURLField( const OUString& rName, const OUString& rURL, const OUString& rTarget ); - sal_Bool SelectObject( const OUString& rName ); + bool SelectObject( const OUString& rName ); - void SetInFormatDialog(sal_Bool bFlag) {bInFormatDialog=bFlag;} - sal_Bool IsInFormatDialog() {return bInFormatDialog;} + void SetInFormatDialog(bool bFlag) {bInFormatDialog=bFlag;} + bool IsInFormatDialog() {return bInFormatDialog;} void ForceMove() { Move(); } @@ -394,10 +394,10 @@ public: void ExecuteCellFormatDlg ( SfxRequest& rReq, const OString &rTabPage = OString()); - sal_Bool GetFunction( OUString& rFuncStr, sal_uInt16 nErrCode = 0 ); + bool GetFunction( OUString& rFuncStr, sal_uInt16 nErrCode = 0 ); void StartSimpleRefDialog( const OUString& rTitle, const OUString& rInitVal, - sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection ); + bool bCloseOnButtonUp, bool bSingleCell, bool bMultiSelection ); void StopSimpleRefDialog(); void SetCurRefDlgId( sal_uInt16 nNew ); @@ -405,21 +405,21 @@ public: void AddAccessibilityObject( SfxListener& rObject ); void RemoveAccessibilityObject( SfxListener& rObject ); void BroadcastAccessibility( const SfxHint &rHint ); - sal_Bool HasAccessibilityObjects(); + bool HasAccessibilityObjects(); bool ExecuteRetypePassDlg(ScPasswordHash eDesiredHash); using ScTabView::ShowCursor; - sal_Bool IsActive() const { return bIsActive; } + bool IsActive() const { return bIsActive; } OUString GetFormula(ScAddress& rAddress); const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & GetForms() const; // ugly hack to call Define Names from Manage Names void SwitchBetweenRefDialogs(SfxModelessDialog* pDialog); // #i123629# - sal_Bool GetForceFocusOnCurCell() const { return bForceFocusOnCurCell; } - void SetForceFocusOnCurCell(sal_Bool bFlag) { bForceFocusOnCurCell=bFlag; } + bool GetForceFocusOnCurCell() const { return bForceFocusOnCurCell; } + void SetForceFocusOnCurCell(bool bFlag) { bForceFocusOnCurCell=bFlag; } }; //================================================================== diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index a89077eea7a2..0ed8c672ba18 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -803,7 +803,7 @@ bool ScRefHandler::EnterRefMode() { pScViewShell = PTR_CAST( ScTabViewShell, pMyViewFrm->GetViewShell() ); if( pScViewShell ) - pScViewShell->UpdateInputHandler(sal_True); + pScViewShell->UpdateInputHandler(true); pParentDoc = pMyViewFrm->GetObjectShell(); } } @@ -850,7 +850,7 @@ bool ScRefHandler::LeaveRefMode() ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell(); if( pScViewShell ) - pScViewShell->UpdateInputHandler(sal_True); + pScViewShell->UpdateInputHandler(true); lcl_InvalidateWindows(); diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index d01cc4834a5e..a181b5150199 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -513,7 +513,7 @@ void ScContentTree::KeyInput( const KeyEvent& rKEvt ) pBeginEntry = Next( pBeginEntry ); } if( !bHasMakredObject && pScTabViewShell) - pScTabViewShell->SetDrawShell(sal_False); + pScTabViewShell->SetDrawShell(false); ObjectFresh( nType,pEntry ); } } diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index 9906181bc5ef..58baf7cd97cd 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -209,7 +209,7 @@ void ScEditWindow::SetCharAttriutes() if ( pDocSh && pViewSh ) { - if(pTabViewSh!=NULL) pTabViewSh->SetInFormatDialog(sal_True); + if(pTabViewSh!=NULL) pTabViewSh->SetInFormatDialog(true); SfxItemSet aSet( pEdView->GetAttribs() ); diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx index d9babed7e522..a92284804fe5 100644 --- a/sc/source/ui/undo/undotab.cxx +++ b/sc/source/ui/undo/undotab.cxx @@ -1221,7 +1221,7 @@ void ScUndoDocProtect::DoProtect(bool bProtect) if (pViewShell) { pViewShell->UpdateLayerLocks(); - pViewShell->UpdateInputHandler(sal_True); // so that input can be immediately entered again + pViewShell->UpdateInputHandler(true); // so that input can be immediately entered again } pDocShell->PostPaintGridAll(); @@ -1293,7 +1293,7 @@ void ScUndoTabProtect::DoProtect(bool bProtect) if (pViewShell) { pViewShell->UpdateLayerLocks(); - pViewShell->UpdateInputHandler(sal_True); // so that input can be immediately entered again + pViewShell->UpdateInputHandler(true); // so that input can be immediately entered again } pDocShell->PostPaintGridAll(); diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index 62f7e8e5cca0..c2cfb4aa610b 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -871,7 +871,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) } if (bRet) - pViewSh->SetDrawShell(sal_True); + pViewSh->SetDrawShell(true); } } diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index 7b1a54f96340..f7f1a0b3953b 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -77,7 +77,7 @@ void ScCellShell::Execute( SfxRequest& rReq ) // inplace leads to trouble with EditShell ... //! cannot always be switched werden ???? if (!pTabViewShell->GetViewFrame()->GetFrame().IsInPlace()) - pTabViewShell->SetDontSwitch(sal_True); // do not switch off EditShell + pTabViewShell->SetDontSwitch(true); // do not switch off EditShell // no break case FID_CELL_FORMAT: diff --git a/sc/source/ui/view/cellsh4.cxx b/sc/source/ui/view/cellsh4.cxx index 410b4d4302db..99d2b0a433dd 100644 --- a/sc/source/ui/view/cellsh4.cxx +++ b/sc/source/ui/view/cellsh4.cxx @@ -121,9 +121,9 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq ) // #i123629# if( pTabViewShell->GetCurObjectSelectionType() == OST_Editing ) - pTabViewShell->SetForceFocusOnCurCell(sal_True); + pTabViewShell->SetForceFocusOnCurCell(true); else - pTabViewShell->SetForceFocusOnCurCell(sal_False); + pTabViewShell->SetForceFocusOnCurCell(false); //OS: once for all should do, however! pTabViewShell->ExecuteInputDirect(); diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index d0966c3c14e6..ffca2662ebad 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -404,15 +404,15 @@ void ScDrawView::MarkListHasChanged() { pOle2Obj = (SdrOle2Obj*) pObj; if (!pDoc->IsChart(pObj) ) - pViewSh->SetOleObjectShell(sal_True); + pViewSh->SetOleObjectShell(true); else - pViewSh->SetChartShell(sal_True); + pViewSh->SetChartShell(true); bSubShellSet = sal_True; } else if (pObj->GetObjIdentifier() == OBJ_GRAF) { pGrafObj = (SdrGrafObj*) pObj; - pViewSh->SetGraphicShell(sal_True); + pViewSh->SetGraphicShell(true); bSubShellSet = sal_True; } else if (pObj->GetObjIdentifier() == OBJ_MEDIA) @@ -423,7 +423,7 @@ void ScDrawView::MarkListHasChanged() else if (pObj->GetObjIdentifier() != OBJ_TEXT // Verhindern, das beim Anlegen || !pViewSh->IsDrawTextShell()) // eines TextObjekts auf die { // DrawShell umgeschaltet wird. - pViewSh->SetDrawShell(sal_True); //@#70206# + pViewSh->SetDrawShell(true); //@#70206# } } @@ -470,15 +470,15 @@ void ScDrawView::MarkListHasChanged() if(bOnlyControls) { - pViewSh->SetDrawFormShell(sal_True); // jetzt UNO-Controls + pViewSh->SetDrawFormShell(true); // jetzt UNO-Controls } else if(bOnlyGraf) { - pViewSh->SetGraphicShell(sal_True); + pViewSh->SetGraphicShell(true); } else if(nMarkCount>1) { - pViewSh->SetDrawShell(sal_True); + pViewSh->SetDrawShell(true); } } diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx index fc8fe9c04a76..a5f627d1bd80 100644 --- a/sc/source/ui/view/tabvwsh2.cxx +++ b/sc/source/ui/view/tabvwsh2.cxx @@ -162,15 +162,15 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) // CTRL-SID_OBJECT_SELECT is used to select the first object, // but not if SID_OBJECT_SELECT is the result of clicking a create function again, // so this must be tested before changing nNewId below. - sal_Bool bSelectFirst = ( nNewId == SID_OBJECT_SELECT && (rReq.GetModifier() & KEY_MOD1) ); + bool bSelectFirst = ( nNewId == SID_OBJECT_SELECT && (rReq.GetModifier() & KEY_MOD1) ); - sal_Bool bEx = IsDrawSelMode(); + bool bEx = IsDrawSelMode(); if ( rReq.GetModifier() & KEY_MOD1 ) { // always allow keyboard selection also on background layer // also allow creation of default objects if the same object type // was already active - bEx = sal_True; + bEx = true; } else if ( nNewId == nDrawSfxId && ( nNewId != SID_FM_CREATE_CONTROL || nNewFormId == nFormSfxId || nNewFormId == 0 ) && !bSwitchCustom ) @@ -192,7 +192,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) nNewId = SID_OBJECT_SELECT; } else - bEx = sal_True; + bEx = true; if ( nDrawSfxId == SID_FM_CREATE_CONTROL && nNewId != nDrawSfxId ) { @@ -228,7 +228,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) { if ( nNewId == SID_DRAW_TEXT || nNewId == SID_DRAW_TEXT_VERTICAL || nNewId == SID_DRAW_TEXT_MARQUEE || nNewId == SID_DRAW_NOTEEDIT ) - SetDrawTextShell( sal_True ); + SetDrawTextShell( true ); else { if ( bEx || pView->GetMarkedObjectList().GetMarkCount() != 0 ) @@ -293,7 +293,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq) break; case SID_FM_CREATE_CONTROL: - SetDrawFormShell(sal_True); + SetDrawFormShell(true); pTabView->SetDrawFuncPtr(new FuConstUnoControl(this, pWin, pView, pDoc, aNewReq)); nFormSfxId = nNewFormId; break; @@ -431,7 +431,7 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet) case SID_DRAW_CHART: { - sal_Bool bOle = GetViewFrame()->GetFrame().IsInPlace(); + bool bOle = GetViewFrame()->GetFrame().IsInPlace(); if ( bOle || !SvtModuleOptions().IsChart() ) rSet.DisableItem( nWhich ); } @@ -445,13 +445,13 @@ void ScTabViewShell::GetDrawState(SfxItemSet &rSet) } } -sal_Bool ScTabViewShell::SelectObject( const OUString& rName ) +bool ScTabViewShell::SelectObject( const OUString& rName ) { ScDrawView* pView = GetViewData()->GetScDrawView(); if (!pView) return false; - sal_Bool bFound = pView->SelectObject( rName ); + bool bFound = pView->SelectObject( rName ); // DrawShell etc. is handled in MarkListHasChanged return bFound; diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index c1b3e50e74e8..c84b95e3227c 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -125,7 +125,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) // als Link? - sal_Bool bAsLink = false; + bool bAsLink = false; if ( pReqArgs->GetItemState(FN_PARAM_2,sal_True,&pItem) == SFX_ITEM_SET ) bAsLink = ((const SfxBoolItem*)pItem)->GetValue(); @@ -152,7 +152,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) OUString aPrintStr; OUString aRowStr; OUString aColStr; - sal_Bool bEntire = false; + bool bEntire = false; const SfxPoolItem* pItem; if ( pReqArgs->GetItemState( SID_CHANGE_PRINTAREA, sal_True, &pItem ) == SFX_ITEM_SET ) aPrintStr = static_cast<const SfxStringItem*>(pItem)->GetValue(); @@ -173,7 +173,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) case SID_ADD_PRINTAREA: case SID_DEFINE_PRINTAREA: // Menue oder Basic { - sal_Bool bAdd = ( nSlot == SID_ADD_PRINTAREA ); + bool bAdd = ( nSlot == SID_ADD_PRINTAREA ); if ( pReqArgs ) { OUString aPrintStr; @@ -236,7 +236,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) // isn't set (for recorded macros, because IsAPI is no longer available). // ScGridWindow::MouseButtonUp no longer executes the slot for a single // cell if there is a multi selection. - sal_Bool bUnmark = ( nSlot == SID_CURRENTCELL ); + bool bUnmark = ( nSlot == SID_CURRENTCELL ); if ( pReqArgs->GetItemState( FN_PARAM_1, sal_True, &pItem ) == SFX_ITEM_SET ) bUnmark = ((const SfxBoolItem*)pItem)->GetValue(); @@ -252,7 +252,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) RTL_TEXTENCODING_UTF8 ); } - sal_Bool bFound = false; + bool bFound = false; ScViewData* pViewData = GetViewData(); ScDocument* pDoc = pViewData->GetDocument(); ScMarkData& rMark = pViewData->GetMarkData(); @@ -260,7 +260,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) ScAddress aScAddress; sal_uInt16 nResult = lcl_ParseRange(aScRange, aAddress, pDoc, nSlot); SCTAB nTab = pViewData->GetTabNo(); - sal_Bool bMark = sal_True; + bool bMark = true; // Is this a range ? if( nResult & SCA_VALID ) @@ -327,10 +327,10 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) // wir haben was gefunden if( nResult & SCA_VALID ) { - bFound = sal_True; + bFound = true; SCCOL nCol = aScRange.aStart.Col(); SCROW nRow = aScRange.aStart.Row(); - sal_Bool bNothing = ( pViewData->GetCurX()==nCol && pViewData->GetCurY()==nRow ); + bool bNothing = ( pViewData->GetCurX()==nCol && pViewData->GetCurY()==nRow ); // markieren if( bMark ) @@ -402,7 +402,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) SCTAB nNameTab; if ( pDoc->GetTable( aAddress, nNameTab ) ) { - bFound = sal_True; + bFound = true; if ( nNameTab != nTab ) SetTabNo( nNameTab ); } @@ -454,7 +454,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) SfxViewFrame* pViewFrame = NULL; ScDocShell* pDocSh = (ScDocShell*)SfxObjectShell::GetFirst(); - sal_Bool bFound = false; + bool bFound = false; // zu aktivierenden ViewFrame suchen @@ -533,7 +533,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { SetPagebreakMode( bWantPageBreak ); UpdatePageBreakData(); - SetCurSubShell( GetCurObjectSelectionType(), sal_True ); + SetCurSubShell( GetCurObjectSelectionType(), true ); PaintGrid(); PaintTop(); PaintLeft(); @@ -563,7 +563,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) case FID_TOGGLESYNTAX: { - sal_Bool bSet = !GetViewData()->IsSyntaxMode(); + bool bSet = !GetViewData()->IsSyntaxMode(); const SfxPoolItem* pItem; if ( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET ) bSet = ((const SfxBoolItem*)pItem)->GetValue(); @@ -576,7 +576,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) break; case FID_TOGGLEHEADERS: { - sal_Bool bSet = !GetViewData()->IsHeaderMode(); + bool bSet = !GetViewData()->IsHeaderMode(); const SfxPoolItem* pItem; if ( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET ) bSet = ((const SfxBoolItem*)pItem)->GetValue(); @@ -592,7 +592,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { ScViewData* pViewData = GetViewData(); const ScViewOptions& rOpts = pViewData->GetOptions(); - sal_Bool bFormulaMode = !rOpts.GetOption( VOPT_FORMULAS ); + bool bFormulaMode = !rOpts.GetOption( VOPT_FORMULAS ); const SfxPoolItem *pItem; if( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET ) bFormulaMode = ((const SfxBoolItem *)pItem)->GetValue(); @@ -613,7 +613,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) { sal_uInt16 nId = ScInputWindowWrapper::GetChildWindowId(); SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId ); - sal_Bool bSet = ( pWnd == NULL ); + bool bSet = ( pWnd == NULL ); const SfxPoolItem* pItem; if ( pReqArgs && pReqArgs->GetItemState(nSlot, sal_True, &pItem) == SFX_ITEM_SET ) bSet = ((const SfxBoolItem*)pItem)->GetValue(); @@ -635,7 +635,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) sal_uInt16 nOldZoom = (sal_uInt16)(( rOldY.GetNumerator() * 100 ) / rOldY.GetDenominator()); sal_uInt16 nZoom = nOldZoom; - sal_Bool bCancel = false; + bool bCancel = false; if ( pReqArgs ) { @@ -830,7 +830,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) SCTAB nFirstVisTab = 0; // special case: only hidden tables selected -> do nothing - sal_Bool bVisSelected = false; + bool bVisSelected = false; for( nSelIx = 0; !bVisSelected && (nSelIx < nSelCount); ++nSelIx ) bVisSelected = rDoc.IsVisible( nFirstVisTab = static_cast<SCTAB>(aIndexList[nSelIx]) ); if( !bVisSelected ) @@ -987,7 +987,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) ScDocProtection* pProtect = pDoc->GetDocProtection(); if (pProtect && pProtect->isProtected()) { - sal_Bool bCancel = false; + bool bCancel = false; OUString aPassword; if (pProtect->isProtectedWithPass()) @@ -1003,7 +1003,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) if (pDlg->Execute() == RET_OK) aPassword = pDlg->GetPassword(); else - bCancel = sal_True; + bCancel = true; delete pDlg; } if (!bCancel) diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index ba70fa495a5c..8f8331bf25cd 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -106,7 +106,7 @@ sal_uInt16 ScTabViewShell::nInsObjCtrlState = SID_INSERT_DIAGRAM; void ScTabViewShell::Activate(sal_Bool bMDI) { SfxViewShell::Activate(bMDI); - bIsActive = sal_True; + bIsActive = true; // hier kein GrabFocus, sonst gibt's Probleme wenn etwas inplace editiert wird! if ( bMDI ) @@ -156,7 +156,7 @@ void ScTabViewShell::Activate(sal_Bool bMDI) } } - UpdateInputHandler( sal_True ); + UpdateInputHandler( true ); if ( bFirstActivate ) { @@ -236,15 +236,15 @@ void ScTabViewShell::Deactivate(sal_Bool bMDI) } SfxViewShell::Deactivate(bMDI); - bIsActive = sal_False; + bIsActive = false; ScInputHandler* pHdl = SC_MOD()->GetInputHdl(this); if( bMDI ) { // during shell deactivation, shells must not be switched, or the loop // through the shell stack (in SfxDispatcher::DoDeactivate_Impl) will not work - sal_Bool bOldDontSwitch = bDontSwitch; - bDontSwitch = sal_True; + bool bOldDontSwitch = bDontSwitch; + bDontSwitch = true; DeActivateOlk( GetViewData() ); ActivateView( false, false ); @@ -436,7 +436,7 @@ void ScTabViewShell::QueryObjAreaPixel( Rectangle& rRect ) const SCCOL nCol = pViewData->GetPosX(WhichH(ePos)); SCROW nRow = pViewData->GetPosY(WhichV(ePos)); SCTAB nTab = pViewData->GetTabNo(); - sal_Bool bNegativePage = pDoc->IsNegativePage( nTab ); + bool bNegativePage = pDoc->IsNegativePage( nTab ); Rectangle aLogicRect = pDoc->GetMMRect( nCol, nRow, nCol, nRow, nTab ); if ( bNegativePage ) @@ -505,13 +505,13 @@ void ScTabViewShell::ReadUserDataSequence (const uno::Sequence < beans::Property void ScTabViewShell::DoReadUserDataSequence( const uno::Sequence < beans::PropertyValue >& rSettings ) { Window* pOldWin = GetActiveWin(); - sal_Bool bFocus = pOldWin && pOldWin->HasFocus(); + bool bFocus = pOldWin && pOldWin->HasFocus(); GetViewData()->ReadUserDataSequence(rSettings); SetTabNo( GetViewData()->GetTabNo(), true ); if ( GetViewData()->IsPagebreakMode() ) - SetCurSubShell( GetCurObjectSelectionType(), sal_True ); + SetCurSubShell( GetCurObjectSelectionType(), true ); Window* pNewWin = GetActiveWin(); if (pNewWin && pNewWin != pOldWin) @@ -540,13 +540,13 @@ void ScTabViewShell::DoReadUserDataSequence( const uno::Sequence < beans::Proper void ScTabViewShell::DoReadUserData( const OUString& rData ) { Window* pOldWin = GetActiveWin(); - sal_Bool bFocus = pOldWin && pOldWin->HasFocus(); + bool bFocus = pOldWin && pOldWin->HasFocus(); GetViewData()->ReadUserData(rData); SetTabNo( GetViewData()->GetTabNo(), true ); if ( GetViewData()->IsPagebreakMode() ) - SetCurSubShell( GetCurObjectSelectionType(), sal_True ); + SetCurSubShell( GetCurObjectSelectionType(), true ); Window* pNewWin = GetActiveWin(); if (pNewWin && pNewWin != pOldWin) @@ -584,7 +584,7 @@ void ScTabViewShell::UpdateDrawShell() void ScTabViewShell::SetDrawShellOrSub() { - bActiveDrawSh = sal_True; + bActiveDrawSh = true; if(bActiveDrawFormSh) { @@ -614,7 +614,7 @@ void ScTabViewShell::SetDrawShellOrSub() } } -void ScTabViewShell::SetDrawShell( sal_Bool bActive ) +void ScTabViewShell::SetDrawShell( bool bActive ) { if(bActive) { @@ -637,7 +637,7 @@ void ScTabViewShell::SetDrawShell( sal_Bool bActive ) bActiveChartSh=false; } - sal_Bool bWasDraw = bActiveDrawSh || bActiveDrawTextSh; + bool bWasDraw = bActiveDrawSh || bActiveDrawTextSh; bActiveDrawSh = bActive; bActiveDrawTextSh = false; @@ -656,7 +656,7 @@ void ScTabViewShell::SetDrawShell( sal_Bool bActive ) } } -void ScTabViewShell::SetDrawTextShell( sal_Bool bActive ) +void ScTabViewShell::SetDrawTextShell( bool bActive ) { bActiveDrawTextSh = bActive; if ( bActive ) @@ -674,7 +674,7 @@ void ScTabViewShell::SetDrawTextShell( sal_Bool bActive ) } -void ScTabViewShell::SetPivotShell( sal_Bool bActive ) +void ScTabViewShell::SetPivotShell( bool bActive ) { bActivePivotSh = bActive; @@ -698,7 +698,7 @@ void ScTabViewShell::SetPivotShell( sal_Bool bActive ) } } -void ScTabViewShell::SetAuditShell( sal_Bool bActive ) +void ScTabViewShell::SetAuditShell( bool bActive ) { bActiveAuditingSh = bActive; if ( bActive ) @@ -715,14 +715,14 @@ void ScTabViewShell::SetAuditShell( sal_Bool bActive ) SetCurSubShell(OST_Cell); } -void ScTabViewShell::SetDrawFormShell( sal_Bool bActive ) +void ScTabViewShell::SetDrawFormShell( bool bActive ) { bActiveDrawFormSh = bActive; if(bActiveDrawFormSh) SetCurSubShell(OST_DrawForm); } -void ScTabViewShell::SetChartShell( sal_Bool bActive ) +void ScTabViewShell::SetChartShell( bool bActive ) { bActiveChartSh = bActive; @@ -730,7 +730,7 @@ void ScTabViewShell::SetChartShell( sal_Bool bActive ) SetCurSubShell(OST_Chart); } -void ScTabViewShell::SetGraphicShell( sal_Bool bActive ) +void ScTabViewShell::SetGraphicShell( bool bActive ) { bActiveGraphicSh = bActive; @@ -738,7 +738,7 @@ void ScTabViewShell::SetGraphicShell( sal_Bool bActive ) SetCurSubShell(OST_Graphic); } -void ScTabViewShell::SetMediaShell( sal_Bool bActive ) +void ScTabViewShell::SetMediaShell( bool bActive ) { bActiveMediaSh = bActive; @@ -746,7 +746,7 @@ void ScTabViewShell::SetMediaShell( sal_Bool bActive ) SetCurSubShell(OST_Media); } -void ScTabViewShell::SetOleObjectShell( sal_Bool bActive ) +void ScTabViewShell::SetOleObjectShell( bool bActive ) { bActiveOleObjectSh = bActive; @@ -756,7 +756,7 @@ void ScTabViewShell::SetOleObjectShell( sal_Bool bActive ) SetCurSubShell(OST_Cell); } -void ScTabViewShell::SetEditShell(EditView* pView, sal_Bool bActive ) +void ScTabViewShell::SetEditShell(EditView* pView, bool bActive ) { if(bActive) { @@ -774,7 +774,7 @@ void ScTabViewShell::SetEditShell(EditView* pView, sal_Bool bActive ) bActiveEditSh = bActive; } -void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, sal_Bool bForce) +void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, bool bForce) { ScViewData* pViewData = GetViewData(); ScDocShell* pDocSh = pViewData->GetDocShell(); @@ -787,7 +787,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, sal_Bool bForce) pCellShell->SetRepeatTarget( &aTarget ); } - sal_Bool bPgBrk=pViewData->IsPagebreakMode(); + bool bPgBrk=pViewData->IsPagebreakMode(); if(bPgBrk && !pPageBreakShell) { @@ -798,8 +798,8 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, sal_Bool bForce) if ( eOST!=eCurOST || bForce ) { - sal_Bool bCellBrush = false; // "format paint brush" allowed for cells - sal_Bool bDrawBrush = false; // "format paint brush" allowed for drawing objects + bool bCellBrush = false; // "format paint brush" allowed for cells + bool bDrawBrush = false; // "format paint brush" allowed for drawing objects if(eCurOST!=OST_NONE) RemoveSubShell(); @@ -812,7 +812,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, sal_Bool bForce) { AddSubShell(*pCellShell); if(bPgBrk) AddSubShell(*pPageBreakShell); - bCellBrush = sal_True; + bCellBrush = true; } break; case OST_Editing: @@ -859,7 +859,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, sal_Bool bForce) pDrawShell->SetRepeatTarget( &aTarget ); } AddSubShell(*pDrawShell); - bDrawBrush = sal_True; + bDrawBrush = true; } break; @@ -872,7 +872,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, sal_Bool bForce) pDrawFormShell->SetRepeatTarget( &aTarget ); } AddSubShell(*pDrawFormShell); - bDrawBrush = sal_True; + bDrawBrush = true; } break; @@ -885,7 +885,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, sal_Bool bForce) pChartShell->SetRepeatTarget( &aTarget ); } AddSubShell(*pChartShell); - bDrawBrush = sal_True; + bDrawBrush = true; } break; @@ -898,7 +898,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, sal_Bool bForce) pOleObjectShell->SetRepeatTarget( &aTarget ); } AddSubShell(*pOleObjectShell); - bDrawBrush = sal_True; + bDrawBrush = true; } break; @@ -911,7 +911,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, sal_Bool bForce) pGraphicShell->SetRepeatTarget( &aTarget ); } AddSubShell(*pGraphicShell); - bDrawBrush = sal_True; + bDrawBrush = true; } break; @@ -938,7 +938,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, sal_Bool bForce) pPivotShell->SetRepeatTarget( &aTarget ); } AddSubShell(*pPivotShell); - bCellBrush = sal_True; + bCellBrush = true; } break; case OST_Auditing: @@ -954,7 +954,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, sal_Bool bForce) pAuditingShell->SetRepeatTarget( &aTarget ); } AddSubShell(*pAuditingShell); - bCellBrush = sal_True; + bCellBrush = true; } break; default: @@ -973,7 +973,7 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, sal_Bool bForce) } } -void ScTabViewShell::SetFormShellAtTop( sal_Bool bSet ) +void ScTabViewShell::SetFormShellAtTop( bool bSet ) { if ( pFormShell && !bSet ) pFormShell->ForgetActiveControl(); // let the FormShell know it no longer has the focus @@ -981,14 +981,14 @@ void ScTabViewShell::SetFormShellAtTop( sal_Bool bSet ) if ( bFormShellAtTop != bSet ) { bFormShellAtTop = bSet; - SetCurSubShell( GetCurObjectSelectionType(), sal_True ); + SetCurSubShell( GetCurObjectSelectionType(), true ); } } IMPL_LINK_NOARG(ScTabViewShell, FormControlActivated) { // a form control got the focus, so the form shell has to be on top - SetFormShellAtTop( sal_True ); + SetFormShellAtTop( true ); return 0; } @@ -1020,12 +1020,12 @@ SfxShell* ScTabViewShell::GetMySubShell() const } -sal_Bool ScTabViewShell::IsDrawTextShell() const +bool ScTabViewShell::IsDrawTextShell() const { return ( pDrawTextShell && ( GetMySubShell() == pDrawTextShell ) ); } -sal_Bool ScTabViewShell::IsAuditShell() const +bool ScTabViewShell::IsAuditShell() const { return ( pAuditingShell && ( GetMySubShell() == pAuditingShell ) ); } @@ -1154,7 +1154,7 @@ IMPL_LINK( ScTabViewShell, SimpleRefChange, OUString*, pResult ) void ScTabViewShell::StartSimpleRefDialog( const OUString& rTitle, const OUString& rInitVal, - sal_Bool bCloseOnButtonUp, sal_Bool bSingleCell, sal_Bool bMultiSelection ) + bool bCloseOnButtonUp, bool bSingleCell, bool bMultiSelection ) { SfxViewFrame* pViewFrm = GetViewFrame(); @@ -1203,7 +1203,7 @@ void ScTabViewShell::StopSimpleRefDialog() //------------------------------------------------------------------ -sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) +bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) { ScModule* pScMod = SC_MOD(); @@ -1212,20 +1212,20 @@ sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) return false; KeyCode aCode = rKEvt.GetKeyCode(); - sal_Bool bShift = aCode.IsShift(); - sal_Bool bControl = aCode.IsMod1(); - sal_Bool bAlt = aCode.IsMod2(); + bool bShift = aCode.IsShift(); + bool bControl = aCode.IsMod1(); + bool bAlt = aCode.IsMod2(); sal_uInt16 nCode = aCode.GetCode(); - sal_Bool bUsed = false; - sal_Bool bInPlace = pScMod->IsEditMode(); // Editengine bekommt alles - sal_Bool bAnyEdit = pScMod->IsInputMode(); // nur Zeichen & Backspace - sal_Bool bDraw = IsDrawTextEdit(); + bool bUsed = false; + bool bInPlace = pScMod->IsEditMode(); // Editengine bekommt alles + bool bAnyEdit = pScMod->IsInputMode(); // nur Zeichen & Backspace + bool bDraw = IsDrawTextEdit(); HideNoteMarker(); // Notiz-Anzeige // don't do extra HideCursor/ShowCursor calls if EnterHandler will switch to a different sheet - sal_Bool bOnRefSheet = ( GetViewData()->GetRefTabNo() == GetViewData()->GetTabNo() ); - sal_Bool bHideCursor = ( ( nCode == KEY_RETURN && bInPlace ) || nCode == KEY_TAB ) && bOnRefSheet; + bool bOnRefSheet = ( GetViewData()->GetRefTabNo() == GetViewData()->GetTabNo() ); + bool bHideCursor = ( ( nCode == KEY_RETURN && bInPlace ) || nCode == KEY_TAB ) && bOnRefSheet; if (bHideCursor) HideAllCursors(); @@ -1238,17 +1238,17 @@ sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) { bUsed = pScMod->InputKeyEvent( rKEvt ); // Eingabe if( !bUsed ) - bUsed = sal::static_int_cast<sal_Bool>(SfxViewShell::KeyInput( rKEvt )); // accelerators + bUsed = SfxViewShell::KeyInput( rKEvt ); // accelerators } else if( bAnyEdit ) { - sal_Bool bIsType = false; + bool bIsType = false; sal_uInt16 nModi = aCode.GetModifier(); sal_uInt16 nGroup = aCode.GetGroup(); if ( nGroup == KEYGROUP_NUM || nGroup == KEYGROUP_ALPHA || nGroup == 0 ) if ( !bControl && !bAlt ) - bIsType = sal_True; + bIsType = true; if ( nGroup == KEYGROUP_MISC ) switch ( nCode ) @@ -1270,14 +1270,14 @@ sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) bIsType = (nModi == 0); // nur ohne Modifier break; default: - bIsType = sal_True; + bIsType = true; } if( bIsType ) bUsed = pScMod->InputKeyEvent( rKEvt ); // Eingabe if( !bUsed ) - bUsed = sal::static_int_cast<sal_Bool>(SfxViewShell::KeyInput( rKEvt )); // accelerators + bUsed = SfxViewShell::KeyInput( rKEvt ); // accelerators if ( !bUsed && !bIsType && nCode != KEY_RETURN ) // Eingabe nochmal hinterher bUsed = pScMod->InputKeyEvent( rKEvt ); @@ -1295,17 +1295,17 @@ sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) !(eFunc == KEYFUNC_COPY && eMarkType == SC_MARK_SIMPLE_FILTERED) ) { ErrorMessage(STR_NOMULTISELECT); - bUsed = sal_True; + bUsed = true; } } if (!bUsed) - bUsed = sal::static_int_cast<sal_Bool>(SfxViewShell::KeyInput( rKEvt )); // accelerators + bUsed = SfxViewShell::KeyInput( rKEvt ); // accelerators // during inplace editing, some slots are handled by the // container app and are executed during Window::KeyInput. // -> don't pass keys to input handler that would be used there // but should call slots instead. - sal_Bool bParent = ( GetViewFrame()->GetFrame().IsInPlace() && eFunc != KEYFUNC_DONTKNOW ); + bool bParent = ( GetViewFrame()->GetFrame().IsInPlace() && eFunc != KEYFUNC_DONTKNOW ); if( !bUsed && !bDraw && nCode != KEY_RETURN && !bParent ) bUsed = pScMod->InputKeyEvent( rKEvt, true ); // Eingabe @@ -1317,7 +1317,7 @@ sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) { case KEY_RETURN: { - sal_Bool bNormal = !bControl && !bAlt; + bool bNormal = !bControl && !bAlt; if ( !bAnyEdit && bNormal ) { // je nach Optionen mit Enter in den Edit-Modus schalten @@ -1326,11 +1326,11 @@ sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) if ( rOpt.GetEnterEdit() ) { pScMod->SetInputMode( SC_INPUT_TABLE ); - bUsed = sal_True; + bUsed = true; } } - sal_Bool bEditReturn = bControl && !bShift; // An Edit-Engine weiter + bool bEditReturn = bControl && !bShift; // An Edit-Engine weiter if ( !bUsed && !bEditReturn ) { if ( bOnRefSheet ) @@ -1353,7 +1353,7 @@ sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD ); } else - UpdateInputHandler(sal_True); + UpdateInputHandler(true); if ( bOnRefSheet ) ShowAllCursors(); @@ -1362,7 +1362,7 @@ sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) // anderes Dokument diese ViewShell nicht die ist, auf der eingegeben // wird! - bUsed = sal_True; + bUsed = true; } } break; @@ -1378,19 +1378,19 @@ sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) { case KEY_UP: ModifyCellSize( DIR_TOP, bShift ); - bUsed = sal_True; + bUsed = true; break; case KEY_DOWN: ModifyCellSize( DIR_BOTTOM, bShift ); - bUsed = sal_True; + bUsed = true; break; case KEY_LEFT: ModifyCellSize( DIR_LEFT, bShift ); - bUsed = sal_True; + bUsed = true; break; case KEY_RIGHT: ModifyCellSize( DIR_RIGHT, bShift ); - bUsed = sal_True; + bUsed = true; break; case KEY_PAGEUP: nSlotId = bShift ? SID_CURSORPAGELEFT_SEL : SID_CURSORPAGELEFT_; @@ -1402,7 +1402,7 @@ sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) if ( nSlotId ) { GetViewData()->GetDispatcher().Execute( nSlotId, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD ); - bUsed = sal_True; + bUsed = true; } } @@ -1447,7 +1447,7 @@ sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) LockModifiers(KEY_MOD1); GetViewData()->GetDispatcher().Execute( nSlotId, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD ); LockModifiers(nMode); - bUsed = sal_True; + bUsed = true; } } if (bHideCursor) @@ -1456,9 +1456,9 @@ sal_Bool ScTabViewShell::TabKeyInput(const KeyEvent& rKEvt) return bUsed; } -sal_Bool ScTabViewShell::SfxKeyInput(const KeyEvent& rKeyEvent) +bool ScTabViewShell::SfxKeyInput(const KeyEvent& rKeyEvent) { - return sal::static_int_cast<sal_Bool>(SfxViewShell::KeyInput( rKeyEvent )); + return SfxViewShell::KeyInput( rKeyEvent ); } bool ScTabViewShell::KeyInput( const KeyEvent &rKeyEvent ) @@ -1524,7 +1524,7 @@ void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode ) ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); bReadOnly = pDocSh->IsReadOnly(); - bIsActive = sal_False; + bIsActive = false; EnableAutoSpell(pDoc->GetDocOptions().IsAutoSpell()); @@ -1541,7 +1541,7 @@ void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode ) StartListening(*pSfxApp,sal_True); // #i62045# #i62046# application is needed for Calc's own hints SfxViewFrame* pFirst = SfxViewFrame::GetFirst(pDocSh); - sal_Bool bFirstView = !pFirst + bool bFirstView = !pFirst || (pFirst == GetViewFrame() && !SfxViewFrame::GetNext(*pFirst,pDocSh)); if ( pDocSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED ) @@ -1556,7 +1556,7 @@ void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode ) pDoc->SetVisibleTab(nVisTab); } SetTabNo( nVisTab ); - sal_Bool bNegativePage = pDoc->IsNegativePage( nVisTab ); + bool bNegativePage = pDoc->IsNegativePage( nVisTab ); // show the right cells GetViewData()->SetScreenPos( bNegativePage ? aVisArea.TopRight() : aVisArea.TopLeft() ); @@ -1703,7 +1703,7 @@ void ScTabViewShell::Construct( sal_uInt8 nForceDesignMode ) // ScDispatchProviderInterceptor registers itself in ctor xDisProvInterceptor = new ScDispatchProviderInterceptor( this ); - bFirstActivate = sal_True; // NavigatorUpdate aufschieben bis Activate() + bFirstActivate = true; // NavigatorUpdate aufschieben bis Activate() // #105575#; update only in the first creation of the ViewShell pDocSh->SetUpdateEnabled(false); @@ -1860,13 +1860,13 @@ void ScTabViewShell::FillFieldData( ScHeaderFieldData& rData ) void ScTabViewShell::SetChartArea( const ScRangeListRef& rSource, const Rectangle& rDest ) { - bChartAreaValid = sal_True; + bChartAreaValid = true; aChartSource = rSource; aChartPos = rDest; nChartDestTab = GetViewData()->GetTabNo(); } -sal_Bool ScTabViewShell::GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const +bool ScTabViewShell::GetChartArea( ScRangeListRef& rSource, Rectangle& rDest, SCTAB& rTab ) const { rSource = aChartSource; rDest = aChartPos; diff --git a/sc/source/ui/view/tabvwsh5.cxx b/sc/source/ui/view/tabvwsh5.cxx index a49de5876cee..ae8205817c30 100644 --- a/sc/source/ui/view/tabvwsh5.cxx +++ b/sc/source/ui/view/tabvwsh5.cxx @@ -55,7 +55,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) case FID_REFMODECHANGED: { - sal_Bool bRefMode = SC_MOD()->IsFormulaMode(); + bool bRefMode = SC_MOD()->IsFormulaMode(); if (!bRefMode) StopRefMode(); else @@ -109,7 +109,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) // dieser Hint kommt, den Design-Modus immer dann umschalten, wenn der // ReadOnly-Status sich wirklich geaendert hat: - if ( GetViewData()->GetSfxDocShell()->IsReadOnly() != bReadOnly ) + if ( GetViewData()->GetSfxDocShell()->IsReadOnly() != (bReadOnly ? 1 : 0) ) { bReadOnly = GetViewData()->GetSfxDocShell()->IsReadOnly(); @@ -194,7 +194,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) EditView* pView = GetViewData()->GetEditView(eActive); // ist nicht 0 - SetEditShell(pView ,sal_True); + SetEditShell(pView, true); } } } @@ -287,7 +287,7 @@ void ScTabViewShell::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) if ( nNewTab >= pDoc->GetTableCount() ) nNewTab = pDoc->GetTableCount() - 1; - sal_Bool bForce = !bStayOnActiveTab; + bool bForce = !bStayOnActiveTab; SetTabNo( nNewTab, bForce, false, bStayOnActiveTab ); } else if (rHint.ISA(ScIndexHint)) diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index a666a3fe6195..9720363de200 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -60,7 +60,7 @@ using namespace com::sun::star; -sal_Bool ScTabViewShell::GetFunction( OUString& rFuncStr, sal_uInt16 nErrCode ) +bool ScTabViewShell::GetFunction( OUString& rFuncStr, sal_uInt16 nErrCode ) { OUString aStr; @@ -129,7 +129,7 @@ sal_Bool ScTabViewShell::GetFunction( OUString& rFuncStr, sal_uInt16 nErrCode ) } rFuncStr = aStr; - return sal_True; + return true; } return false; @@ -157,7 +157,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet ) sal_uInt16 nMyId = 0; SfxViewFrame* pThisFrame = GetViewFrame(); - sal_Bool bOle = GetViewFrame()->GetFrame().IsInPlace(); + bool bOle = GetViewFrame()->GetFrame().IsInPlace(); SCTAB nTabCount = pDoc->GetTableCount(); SCTAB nTabSelCount = rMark.GetSelectCount(); @@ -193,7 +193,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet ) if ( nTabSelCount > 1 ) { // #i22589# also take "Print Entire Sheet" into account here - sal_Bool bHas = false; + bool bHas = false; for (SCTAB i=0; !bHas && i<nTabCount; i++) bHas = rMark.GetTableSelect(i) && (pDoc->GetPrintRangeCount(i) || pDoc->IsPrintEntireSheet(i)); if (!bHas) @@ -336,7 +336,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet ) case FID_TOGGLEFORMULA: { const ScViewOptions& rOpts = pViewData->GetOptions(); - sal_Bool bFormulaMode = rOpts.GetOption( VOPT_FORMULAS ); + bool bFormulaMode = rOpts.GetOption( VOPT_FORMULAS ); rSet.Put(SfxBoolItem(nWhich, bFormulaMode )); } break; @@ -616,7 +616,7 @@ void ScTabViewShell::ExecuteInputDirect() //------------------------------------------------------------------ -void ScTabViewShell::UpdateInputHandler( sal_Bool bForce /* = sal_False */, sal_Bool bStopEditing /* = sal_True */ ) +void ScTabViewShell::UpdateInputHandler( bool bForce /* = sal_False */, bool bStopEditing /* = sal_True */ ) { ScInputHandler* pHdl = pInputHandler ? pInputHandler : SC_MOD()->GetInputHdl(); diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 3845a73ecaa5..d95ddaa3f5ae 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -99,7 +99,7 @@ void ScTabViewShell::ConnectObject( SdrOle2Obj* pObj ) } } -sal_Bool ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) +bool ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) { // Gueltigkeits-Hinweisfenster nicht ueber dem Objekt stehenlassen RemoveHintWindow(); @@ -107,7 +107,7 @@ sal_Bool ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) uno::Reference < embed::XEmbeddedObject > xObj = pObj->GetObjRef(); Window* pWin = GetActiveWin(); ErrCode nErr = ERRCODE_NONE; - sal_Bool bErrorShown = false; + bool bErrorShown = false; { SfxInPlaceClient* pClient = FindIPClient( xObj, pWin ); @@ -166,7 +166,7 @@ sal_Bool ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb ) ((ScClient*)pClient)->SetGrafEdit( NULL ); nErr = pClient->DoVerb( nVerb ); - bErrorShown = sal_True; + bErrorShown = true; // SfxViewShell::DoVerb zeigt seine Fehlermeldungen selber an // attach listener to selection changes in chart that affect cell @@ -431,8 +431,8 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet) { - sal_Bool bOle = GetViewFrame()->GetFrame().IsInPlace(); - sal_Bool bTabProt = GetViewData()->GetDocument()->IsTabProtected(GetViewData()->GetTabNo()); + bool bOle = GetViewFrame()->GetFrame().IsInPlace(); + bool bTabProt = GetViewData()->GetDocument()->IsTabProtected(GetViewData()->GetTabNo()); ScDocShell* pDocShell = ( GetViewData() ? GetViewData()->GetDocShell() : NULL ); bool bShared = ( pDocShell ? pDocShell->IsDocShared() : false ); @@ -504,7 +504,7 @@ void ScTabViewShell::ExecuteUndo(SfxRequest& rReq) case SID_REDO: if ( pUndoManager ) { - sal_Bool bIsUndo = ( nSlot == SID_UNDO ); + bool bIsUndo = ( nSlot == SID_UNDO ); sal_uInt16 nCount = 1; const SfxPoolItem* pItem; @@ -512,7 +512,7 @@ void ScTabViewShell::ExecuteUndo(SfxRequest& rReq) nCount = ((const SfxUInt16Item*)pItem)->GetValue(); // lock paint for more than one cell undo action (not for editing within a cell) - sal_Bool bLockPaint = ( nCount > 1 && pUndoManager == GetUndoManager() ); + bool bLockPaint = ( nCount > 1 && pUndoManager == GetUndoManager() ); if ( bLockPaint ) pDocSh->LockPaint(); @@ -561,7 +561,7 @@ void ScTabViewShell::GetUndoState(SfxItemSet &rSet) if ( pUndoManager ) { std::vector<OUString> &aList = aStrLst.GetList(); - sal_Bool bIsUndo = ( nWhich == SID_GETUNDOSTRINGS ); + bool bIsUndo = ( nWhich == SID_GETUNDOSTRINGS ); size_t nCount = bIsUndo ? pUndoManager->GetUndoActionCount() : pUndoManager->GetRedoActionCount(); for (size_t i=0; i<nCount; ++i) { diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx index 3dad53e34a50..faa7e91fc417 100644 --- a/sc/source/ui/view/tabvwshh.cxx +++ b/sc/source/ui/view/tabvwshh.cxx @@ -100,7 +100,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq ) case SID_OBJECT_WIDTH: case SID_OBJECT_HEIGHT: { - sal_Bool bDone = false; + bool bDone = false; const SfxPoolItem* pItem; if ( pReqArgs && pReqArgs->GetItemState( nSlotId, sal_True, &pItem ) == SFX_ITEM_SET ) { @@ -131,7 +131,7 @@ void ScTabViewShell::ExecuteObject( SfxRequest& rReq ) pDrView->ResizeMarkedObj( aRect.TopLeft(), Fraction( 1, 1 ), Fraction( nNewVal, aRect.GetHeight() ) ); - bDone = sal_True; + bDone = true; } } } @@ -254,7 +254,7 @@ void ScTabViewShell::BroadcastAccessibility( const SfxHint &rHint ) pAccessibilityBroadcaster->Broadcast( rHint ); } -sal_Bool ScTabViewShell::HasAccessibilityObjects() +bool ScTabViewShell::HasAccessibilityObjects() { return pAccessibilityBroadcaster != NULL; } diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 84bbb9a99475..4a6403677c48 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -1836,7 +1836,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam ) if ( RET_YES == nRetVal ) EnterValue( nDestCol, nDestRow, nDestTab, nSolveResult ); - GetViewData()->GetViewShell()->UpdateInputHandler( sal_True ); + GetViewData()->GetViewShell()->UpdateInputHandler( true ); } } diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index 26e543928a4f..aa128dfde9c8 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -448,7 +448,7 @@ sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId, pScDrawView->InsertObjectSafe(pObj, *pScDrawView->GetSdrPageView()); - GetViewData()->GetViewShell()->SetDrawShell( sal_True ); + GetViewData()->GetViewShell()->SetDrawShell( true ); bRet = sal_True; } } diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx index 02ea05f24c87..17ece9f2360f 100644 --- a/sc/source/ui/view/viewfun7.cxx +++ b/sc/source/ui/view/viewfun7.cxx @@ -352,7 +352,7 @@ sal_Bool ScViewFunc::PasteObject( const Point& rPos, const uno::Reference < embe SdrPageView* pPV = pDrView->GetSdrPageView(); pDrView->InsertObjectSafe( pSdrObj, *pPV ); // don't mark if OLE - GetViewData()->GetViewShell()->SetDrawShell( sal_True ); + GetViewData()->GetViewShell()->SetDrawShell( true ); return sal_True; } else @@ -430,7 +430,7 @@ sal_Bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic, if ( GetViewData()->GetDocument()->IsNegativePage( GetViewData()->GetTabNo() ) ) aPos.X() -= aSize.Width(); - GetViewData()->GetViewShell()->SetDrawShell( sal_True ); + GetViewData()->GetViewShell()->SetDrawShell( true ); Rectangle aRect(aPos, aSize); SdrGrafObj* pGrafObj = new SdrGrafObj(rGraphic, aRect); |