sw/source/ui/docvw/edtwin.cxx | 10 ++++---- sw/source/ui/inc/view.hxx | 8 +++--- sw/source/ui/index/cnttab.cxx | 4 +-- sw/source/ui/table/tautofmt.cxx | 18 +++++++-------- sw/source/ui/uiview/formatclipboard.cxx | 4 +-- sw/source/ui/uiview/pview.cxx | 37 ++++++++------------------------ sw/source/ui/uiview/srcview.cxx | 16 ++++++------- sw/source/ui/uiview/uivwimp.cxx | 4 +-- sw/source/ui/uiview/view.cxx | 4 +-- sw/source/ui/uiview/viewsrch.cxx | 12 +++++----- 10 files changed, 50 insertions(+), 67 deletions(-)
New commits: commit 03d5d88911111076b1c668d2eae30b5690bb564a Author: Takeshi Abe <t...@fixedpoint.jp> Date: Wed Feb 20 00:58:47 2013 +0900 sal_Bool to bool Change-Id: I87266c0b2aff04b888d7b201c00b36156d82fe93 diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 61a8c72..73b9331 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -4607,7 +4607,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) rSh.EnterStdMode(); rSh.SetVisCrsr(aDocPt); - pApplyTempl->bUndo = sal_True; + pApplyTempl->bUndo = true; bCallBase = false; aTemplateTimer.Stop(); } @@ -4628,7 +4628,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) & eSelection ) && !rSh.HasReadonlySel() ) { rSh.SetTxtFmtColl( pApplyTempl->aColl.pTxtColl ); - pApplyTempl->bUndo = sal_True; + pApplyTempl->bUndo = true; bCallBase = false; if ( pApplyTempl->aColl.pTxtColl ) aStyleName = pApplyTempl->aColl.pTxtColl->GetName(); @@ -4642,7 +4642,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) rSh.UnSetVisCrsr(); rSh.EnterStdMode(); rSh.SetVisCrsr(aDocPt); - pApplyTempl->bUndo = sal_True; + pApplyTempl->bUndo = true; bCallBase = false; if ( pApplyTempl->aColl.pCharFmt ) aStyleName = pApplyTempl->aColl.pCharFmt->GetName(); @@ -4654,7 +4654,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) if(PTR_CAST(SwFlyFrmFmt, pFmt)) { rSh.SetFrmFmt( pApplyTempl->aColl.pFrmFmt, false, &aDocPt ); - pApplyTempl->bUndo = sal_True; + pApplyTempl->bUndo = true; bCallBase = false; if( pApplyTempl->aColl.pFrmFmt ) aStyleName = pApplyTempl->aColl.pFrmFmt->GetName(); @@ -4675,7 +4675,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) false, pApplyTempl->aColl.pNumRule->GetDefaultListId() ); bCallBase = false; - pApplyTempl->bUndo = sal_True; + pApplyTempl->bUndo = true; if( pApplyTempl->aColl.pNumRule ) aStyleName = pApplyTempl->aColl.pNumRule->GetName(); } diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 70c0f08..71e1a17 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -133,13 +133,13 @@ struct SwApplyTemplate int eType; sal_uInt16 nColor; SwFormatClipboard* pFormatClipboard; - sal_Bool bUndo; + bool bUndo; SwApplyTemplate() : eType(0), nColor(0), pFormatClipboard(0), - bUndo(sal_False) + bUndo(false) { aColl.pTxtColl = 0; } @@ -166,9 +166,9 @@ class SW_DLLPUBLIC SwView: public SfxViewShell static sal_uInt16 nMoveType; // for buttons below the scrollbar (viewmdi) static sal_Int32 nActMark; // current jump mark for unknown mark - static sal_Bool bExtra; + static bool bExtra; static sal_Bool bFound; - static sal_Bool bJustOpened; + static bool bJustOpened; static SearchAttrItemList* pSrchList; static SearchAttrItemList* pReplList; diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 5702bd3..165fdb2 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -761,11 +761,11 @@ SwAddStylesDlg_Impl::SwAddStylesDlg_Impl(Window* pParent, if(rName.Len() > 0) { SvTreeListEntry* pEntry = rTLB.First(); - sal_Bool bFound = sal_False; + bool bFound = false; while(pEntry && !bFound) { if(rTLB.GetEntryText(pEntry) == rName) - bFound = sal_True; + bFound = true; pEntry = rTLB.Next(pEntry); } if(!bFound) diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index fcc3642..f15c30d 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -309,7 +309,7 @@ IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn ) IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl) { - sal_Bool bOk = sal_False, bFmtInserted = sal_False; + bool bOk = false, bFmtInserted = false; while( !bOk ) { SwStringInputDlg* pDlg = new SwStringInputDlg( this, @@ -344,7 +344,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl) pTableTbl->InsertAutoFmt(n, pNewData); m_pLbFormat->InsertEntry( aFormatName, nDfltStylePos + n ); m_pLbFormat->SelectEntryPos( nDfltStylePos + n ); - bFmtInserted = sal_True; + bFmtInserted = true; m_pBtnAdd->Enable( sal_False ); if ( !bCoreDataChanged ) { @@ -353,7 +353,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl) } SelFmtHdl( 0 ); - bOk = sal_True; + bOk = true; } } @@ -366,7 +366,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, AddHdl) } } else - bOk = sal_True; + bOk = true; delete pDlg; } return 0; @@ -413,7 +413,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RemoveHdl) IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl) { - sal_Bool bOk = sal_False; + bool bOk = false; while( !bOk ) { SwStringInputDlg* pDlg = new SwStringInputDlg( this, @@ -421,7 +421,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl) aEmptyStr ); if( pDlg->Execute() == RET_OK ) { - sal_Bool bFmtRenamed = sal_False; + bool bFmtRenamed = false; String aFormatName; pDlg->GetInputString( aFormatName ); @@ -459,8 +459,8 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl) } SelFmtHdl( 0 ); - bOk = sal_True; - bFmtRenamed = sal_True; + bOk = true; + bFmtRenamed = true; } } @@ -473,7 +473,7 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, RenameHdl) } } else - bOk = sal_True; + bOk = true; delete pDlg; } return 0; diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx index f07a1f3..5dd7ef2 100644 --- a/sw/source/ui/uiview/formatclipboard.cxx +++ b/sw/source/ui/uiview/formatclipboard.cxx @@ -149,7 +149,7 @@ void lcl_getTableAttributes( SfxItemSet& rSet, SwWrtShell &rSh ) void lcl_setTableAttributes( const SfxItemSet& rSet, SwWrtShell &rSh ) { const SfxPoolItem* pItem = 0; - sal_Bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) || + bool bBorder = ( SFX_ITEM_SET == rSet.GetItemState( RES_BOX ) || SFX_ITEM_SET == rSet.GetItemState( SID_ATTR_BORDER_INNER ) ); sal_Bool bBackground = SFX_ITEM_SET == rSet.GetItemState( RES_BACKGROUND, sal_False, &pItem ); const SfxPoolItem* pRowItem = 0, *pTableItem = 0; @@ -310,7 +310,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, SfxItemPool& rPool, bool bP SwPaM* pCrsr = rWrtShell.GetCrsr(); sal_Bool bHasSelection = pCrsr->HasMark(); - sal_Bool bForwardSelection = sal_False; + bool bForwardSelection = false; if(!bHasSelection && pCrsr->GetPrev() != pCrsr && pCrsr->GetPrev() != 0) { diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index 531e19d..74c92bb 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -435,7 +435,7 @@ void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt ) { const KeyCode& rKeyCode = rKEvt.GetKeyCode(); sal_uInt16 nKey = rKeyCode.GetCode(); - sal_Bool bHandled = sal_False; + bool bHandled = false; if(!rKeyCode.GetModifier()) { sal_uInt16 nSlot = 0; @@ -447,7 +447,7 @@ void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt ) } if(nSlot) { - bHandled = sal_True; + bHandled = true; mrView.GetViewFrame()->GetDispatcher()->Execute( nSlot, SFX_CALLMODE_ASYNCHRON ); } @@ -458,12 +458,12 @@ void SwPagePreViewWin::KeyInput( const KeyEvent &rKEvt ) void SwPagePreViewWin::Command( const CommandEvent& rCEvt ) { - sal_Bool bCallBase = sal_True; + bool bCallBase = true; switch( rCEvt.GetCommand() ) { case COMMAND_CONTEXTMENU: mrView.GetViewFrame()->GetDispatcher()->ExecutePopup(); - bCallBase = sal_False; + bCallBase = false; break; case COMMAND_WHEEL: @@ -693,7 +693,7 @@ void SwPagePreView::Execute( SfxRequest &rReq ) { int eMvMode; sal_uInt8 nRow = 1; - sal_Bool bRetVal = sal_False; + bool bRetVal = false; bool bRefresh = true; switch(rReq.GetSlot()) @@ -884,11 +884,11 @@ void SwPagePreView::Execute( SfxRequest &rReq ) case FN_START_OF_LINE: case FN_START_OF_DOCUMENT: aViewWin.SetSelectedPage( 1 ); - eMvMode = SwPagePreViewWin::MV_DOC_STT; bRetVal = sal_True; goto MOVEPAGE; + eMvMode = SwPagePreViewWin::MV_DOC_STT; bRetVal = true; goto MOVEPAGE; case FN_END_OF_LINE: case FN_END_OF_DOCUMENT: aViewWin.SetSelectedPage( mnPageCount ); - eMvMode = SwPagePreViewWin::MV_DOC_END; bRetVal = sal_True; goto MOVEPAGE; + eMvMode = SwPagePreViewWin::MV_DOC_END; bRetVal = true; goto MOVEPAGE; MOVEPAGE: { int nRet = ChgPage( eMvMode, sal_True ); @@ -1705,8 +1705,8 @@ sal_uInt16 SwPagePreView::SetPrinter( SfxPrinter *pNew, sal_uInt16 nDiffFlags, if ( ( nDiffFlags & SFX_PRINTER_OPTIONS ) == SFX_PRINTER_OPTIONS ) ::SetPrinter( rSh.getIDocumentDeviceAccess(), pNew, sal_False ); - const sal_Bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? sal_True : sal_False; - const sal_Bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? sal_True : sal_False; + const bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION; + const bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE; if ( bChgOri || bChgSize ) { rESh.StartAllAction(); diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index 2d077b0..d78e59c 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -537,7 +537,7 @@ void SwSrcView::GetState(SfxItemSet& rSet) TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( &aEditWin) ); - sal_Bool bDisable = !aDataHelper.GetXTransferable().is() || + bool bDisable = !aDataHelper.GetXTransferable().is() || 0 == aDataHelper.GetFormatCount(); if( bDisable ) rSet.DisableItem(nWhich); @@ -573,7 +573,7 @@ sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, TextPaM aPaM; sal_Bool bForward = !rSearchItem.GetBackward(); - sal_Bool bAtStart = pTextView->GetSelection() == TextSelection( aPaM, aPaM ); + bool bAtStart = pTextView->GetSelection() == TextSelection( aPaM, aPaM ); if( !bForward ) aPaM = TextPaM( (sal_uLong)-1, (sal_uInt16)-1 ); @@ -607,7 +607,7 @@ sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, if( !nFound ) { - sal_Bool bNotFoundMessage = sal_False; + bool bNotFoundMessage = false; if(!bRecursive) { if(!bFromStart) @@ -616,13 +616,13 @@ sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, } else { - bNotFoundMessage = sal_True; + bNotFoundMessage = true; pTextView->SetSelection( aSel ); } } else if(bAtStart) { - bNotFoundMessage = sal_True; + bNotFoundMessage = true; } @@ -656,8 +656,8 @@ sal_uInt16 SwSrcView::SetPrinter(SfxPrinter* pNew, sal_uInt16 nDiffFlags, bool ) if ( nDiffFlags & SFX_PRINTER_OPTIONS ) ::SetPrinter( pDocSh->getIDocumentDeviceAccess(), pNew, sal_True ); - const sal_Bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION ? sal_True : sal_False; - const sal_Bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE ? sal_True : sal_False; + const bool bChgOri = nDiffFlags & SFX_PRINTER_CHG_ORIENTATION; + const bool bChgSize= nDiffFlags & SFX_PRINTER_CHG_SIZE; if ( bChgOri || bChgSize ) { pDocSh->SetModified(); @@ -776,7 +776,7 @@ void SwSrcView::Load(SwDocShell* pDocShell) SfxMedium* pMedium = pDocShell->GetMedium(); const SfxFilter* pFilter = pMedium->GetFilter(); - sal_Bool bHtml = pFilter && pFilter->GetUserData() == "HTML"; + bool bHtml = pFilter && pFilter->GetUserData() == "HTML"; sal_Bool bDocModified = pDocShell->IsModified(); if(bHtml && !bDocModified && pDocShell->HasName()) { diff --git a/sw/source/ui/uiview/uivwimp.cxx b/sw/source/ui/uiview/uivwimp.cxx index e0e0385..cfc208c 100644 --- a/sw/source/ui/uiview/uivwimp.cxx +++ b/sw/source/ui/uiview/uivwimp.cxx @@ -153,7 +153,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq ) case SID_TWAIN_TRANSFER: { - sal_Bool bDone = sal_False; + bool bDone = false; Reference< XScannerManager2 > xScanMgr = SW_MOD()->GetScannerManager(); if( xScanMgr.is() ) @@ -166,7 +166,7 @@ void SwView_Impl::ExecuteScan( SfxRequest& rReq ) { Reference< XEventListener > xLstner = &rListener; xScanMgr->startScan( aContexts.getConstArray()[ 0 ], xLstner ); - bDone = sal_True; + bDone = true; } } catch(...) diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 4ac403d..c2443cc 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -130,9 +130,9 @@ sal_uInt16 SwView::nInsertCtrlState = FN_INSERT_TABLE; sal_uInt16 SwView::nWebInsertCtrlState = FN_INSERT_TABLE; sal_uInt16 SwView::nInsertObjectCtrlState = SID_INSERT_DIAGRAM; -sal_Bool SwView::bExtra = sal_False; +bool SwView::bExtra = false; sal_Bool SwView::bFound = sal_False; -sal_Bool SwView::bJustOpened = sal_False; +bool SwView::bJustOpened = false; SvxSearchDialog* SwView::pSrchDlg = 0; SearchAttrItemList* SwView::pSrchList = 0; diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx index 8e1f9c3..6adf115 100644 --- a/sw/source/ui/uiview/viewsrch.cxx +++ b/sw/source/ui/uiview/viewsrch.cxx @@ -138,7 +138,7 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage) break; case FID_SEARCH_ON: - bJustOpened = sal_True; + bJustOpened = true; GetViewFrame()->GetBindings().Invalidate(SID_SEARCH_ITEM); break; @@ -472,10 +472,10 @@ sal_Bool SwView::SearchAndWrap(sal_Bool bApi) // Suchen in den Sonderbereichen, wenn keine // Suche in Selektionen vorliegt. Bei Suche in Selektionen // wird ohnehin in diesen Sonderbereichen gesucht - sal_Bool bHasSrchInOther = bExtra; + bool bHasSrchInOther = bExtra; if (!pSrchItem->GetSelection() && !bExtra ) { - bExtra = sal_True; + bExtra = true; if( FUNC_Search( aOpts ) ) { bFound = sal_True; @@ -483,7 +483,7 @@ sal_Bool SwView::SearchAndWrap(sal_Bool bApi) pWrtShell->EndAllAction(); return sal_True; } - bExtra = sal_False; + bExtra = false; } else bExtra = !bExtra; @@ -566,7 +566,7 @@ sal_Bool SwView::SearchAll(sal_uInt16* pFound) else pWrtShell->SttDoc(); } - bExtra = sal_False; + bExtra = false; sal_uInt16 nFound = (sal_uInt16)FUNC_Search( aOpts ); if(pFound) *pFound = nFound; @@ -825,7 +825,7 @@ void SwView::StateSearch(SfxItemSet &rSet) pSrchItem->SetSelection( sal_True ); } - bJustOpened = sal_False; + bJustOpened = false; rSet.Put( *pSrchItem ); } break; commit 8e12daed4f79f4835dc2d8b83609e306617837ca Author: Takeshi Abe <t...@fixedpoint.jp> Date: Tue Feb 19 23:41:06 2013 +0900 bZoomEnable was always true This completes dc9ce37f90da7f845e38547bd12d53bea646beae. Change-Id: I0a840d01a40942016e32ec0547618bc44d94c48d diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index c2256f8..531e19d 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -962,8 +962,6 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) sal_uInt16 nWhich = aIter.FirstWhich(); OSL_ENSURE(nWhich, "empty set"); SwPagePreviewLayout* pPagePrevwLay = GetViewShell()->PagePreviewLayout(); - // zoom has to be disabled if Accessibility support is switched on - sal_Bool bZoomEnabled = sal_True; // !Application::GetSettings().GetMiscSettings().GetEnableATToolSupport(); while(nWhich) { @@ -1008,8 +1006,6 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) case SID_ATTR_ZOOM: case FN_STAT_ZOOM: { - if(bZoomEnabled) - { const SwViewOption* pVOpt = GetViewShell()->GetViewOptions(); SvxZoomItem aZoom((SvxZoomType)pVOpt->GetZoomType(), pVOpt->GetZoom()); @@ -1020,41 +1016,28 @@ void SwPagePreView::GetState( SfxItemSet& rSet ) SVX_ZOOM_ENABLE_150| SVX_ZOOM_ENABLE_200); rSet.Put( aZoom ); - } - else - rSet.DisableItem(nWhich); } break; case SID_ATTR_ZOOMSLIDER : { - if(bZoomEnabled) - { const SwViewOption* pVOpt = GetViewShell()->GetViewOptions(); const sal_uInt16 nCurrentZoom = pVOpt->GetZoom(); SvxZoomSliderItem aZoomSliderItem( nCurrentZoom, MINZOOM, MAXZOOM ); aZoomSliderItem.AddSnappingPoint( 100 ); rSet.Put( aZoomSliderItem ); - } - else - rSet.DisableItem(nWhich); } break; case FN_PREVIEW_ZOOM: { - if(bZoomEnabled) - { const SwViewOption* pVOpt = GetViewShell()->GetViewOptions(); rSet.Put(SfxUInt16Item(nWhich, pVOpt->GetZoom())); - } - else - rSet.DisableItem(nWhich); } break; case SID_ZOOM_IN: case SID_ZOOM_OUT: { const SwViewOption* pVOpt = GetViewShell()->GetViewOptions(); - if(!bZoomEnabled || (SID_ZOOM_OUT == nWhich && pVOpt->GetZoom() >= MAX_PREVIEW_ZOOM)|| + if((SID_ZOOM_OUT == nWhich && pVOpt->GetZoom() >= MAX_PREVIEW_ZOOM)|| (SID_ZOOM_IN == nWhich && pVOpt->GetZoom() <= MIN_PREVIEW_ZOOM)) { rSet.DisableItem(nWhich); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits