From 5e456cc3b30f2e099429f7075eda23e86871621e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 5 Mar 2014 11:16:02 +0200 Subject: svx: sal_Bool->bool Change-Id: I061f1e15c816f8077c0fbb0abbc1474eb286796b --- svx/source/dialog/_contdlg.cxx | 6 +- svx/source/dialog/contwnd.cxx | 2 +- svx/source/dialog/graphctl.cxx | 20 ++-- svx/source/dialog/imapdlg.cxx | 4 +- svx/source/fmcomp/fmgridcl.cxx | 18 ++-- svx/source/fmcomp/fmgridif.cxx | 4 +- svx/source/fmcomp/gridctrl.cxx | 206 +++++++++++++++++++-------------------- svx/source/gallery2/galbrws1.cxx | 2 +- svx/source/gallery2/galbrws2.cxx | 2 +- svx/source/gallery2/galctrl.cxx | 6 +- svx/source/gallery2/galexpl.cxx | 54 +++++----- svx/source/gallery2/gallery1.cxx | 56 ++++++----- svx/source/gallery2/galmisc.cxx | 40 ++++---- svx/source/gallery2/galtheme.cxx | 98 +++++++++---------- 14 files changed, 260 insertions(+), 258 deletions(-) (limited to 'svx') diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 8a1fb17830bd..9095ce0c1a8f 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -454,7 +454,7 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx ) case( TBI_SELECT ): { pTbx->CheckItem( nNewItemId, true ); - aContourWnd.SetEditMode( sal_True ); + aContourWnd.SetEditMode( true ); } break; @@ -509,7 +509,7 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx ) aRedoGraphic = aGraphic; aGraphic = aUndoGraphic; aUndoGraphic = Graphic(); - aContourWnd.SetGraphic( aGraphic, sal_False ); + aContourWnd.SetGraphic( aGraphic, false ); } break; @@ -519,7 +519,7 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx ) aUndoGraphic = aGraphic; aGraphic = aRedoGraphic; aRedoGraphic = Graphic(); - aContourWnd.SetGraphic( aGraphic, sal_False ); + aContourWnd.SetGraphic( aGraphic, false ); } break; diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx index e562116030d5..ab9b980452e2 100644 --- a/svx/source/dialog/contwnd.cxx +++ b/svx/source/dialog/contwnd.cxx @@ -152,7 +152,7 @@ void ContourWindow::MouseButtonDown( const MouseEvent& rMEvt ) SetPolyPolygon( PolyPolygon() ); aWorkRect = Rectangle( aLogPt, aLogPt ); Paint( Rectangle( Point(), GetGraphicSize() ) ); - SetEditMode( sal_True ); + SetEditMode( true ); } if ( !bPipetteMode ) diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index d4c61d63715a..d0a769ba58c9 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -61,9 +61,9 @@ GraphCtrl::GraphCtrl( Window* pParent, const ResId& rResId ) : nWinStyle ( 0 ), eObjKind ( OBJ_NONE ), nPolyEdit ( 0 ), - bEditMode ( sal_False ), - bSdrMode ( sal_False ), - bAnim ( sal_False ), + bEditMode ( false ), + bSdrMode ( false ), + bAnim ( false ), mpAccContext ( NULL ), pModel ( NULL ), pView ( NULL ) @@ -81,9 +81,9 @@ GraphCtrl::GraphCtrl( Window* pParent, WinBits nStyle ) : nWinStyle ( 0 ), eObjKind ( OBJ_NONE ), nPolyEdit ( 0 ), - bEditMode ( sal_False ), - bSdrMode ( sal_False ), - bAnim ( sal_False ), + bEditMode ( false ), + bSdrMode ( false ), + bAnim ( false ), mpAccContext ( NULL ), pModel ( NULL ), pView ( NULL ) @@ -179,7 +179,7 @@ void GraphCtrl::InitSdrModel() mpAccContext->setModelAndView (pModel, pView); } -void GraphCtrl::SetGraphic( const Graphic& rGraphic, sal_Bool bNewModel ) +void GraphCtrl::SetGraphic( const Graphic& rGraphic, bool bNewModel ) { // If possible we dither bitmaps for the display if ( !bAnim && ( rGraphic.GetType() == GRAPHIC_BITMAP ) ) @@ -718,7 +718,7 @@ SdrObject* GraphCtrl::GetSelectedSdrObject() const return pSdrObj; } -void GraphCtrl::SetEditMode( const sal_Bool _bEditMode ) +void GraphCtrl::SetEditMode( const bool _bEditMode ) { if ( bSdrMode ) { @@ -728,7 +728,7 @@ void GraphCtrl::SetEditMode( const sal_Bool _bEditMode ) pView->SetCurrentObj( sal::static_int_cast< sal_uInt16 >( eObjKind ) ); } else - bEditMode = sal_False; + bEditMode = false; } void GraphCtrl::SetPolyEditMode( const sal_uInt16 _nPolyEdit ) @@ -746,7 +746,7 @@ void GraphCtrl::SetObjKind( const SdrObjKind _eObjKind ) { if ( bSdrMode ) { - bEditMode = sal_False; + bEditMode = false; pView->SetEditMode( bEditMode ); eObjKind = _eObjKind; pView->SetCurrentObj( sal::static_int_cast< sal_uInt16 >( eObjKind ) ); diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 1f78f78116df..e0c8971f5d68 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -348,7 +348,7 @@ IMPL_LINK( SvxIMapDlg, TbxClickHdl, ToolBox*, pTbx ) case( TBI_SELECT ): { pTbx->CheckItem( nNewItemId, true ); - pIMapWnd->SetEditMode( sal_True ); + pIMapWnd->SetEditMode( true ); if( pTbx->IsKeyEvent() ) { if((pTbx->GetKeyModifier() & KEY_MOD1) != 0) @@ -737,7 +737,7 @@ IMPL_LINK_NOARG(SvxIMapDlg, UpdateHdl) // After changes => default selection aTbxIMapDlg1.CheckItem( TBI_SELECT, true ); - pIMapWnd->SetEditMode( sal_True ); + pIMapWnd->SetEditMode( true ); } // Delete the copied list again in the Update method diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 61cdb3be6a3a..b425b7b70b1a 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -1045,7 +1045,7 @@ void FmGridControl::propertyChange(const ::com::sun::star::beans::PropertyChange if (evt.PropertyName == FM_PROP_ROWCOUNT) { // if we're not in the main thread call AdjustRows asynchronously - implAdjustInSolarThread(sal_True); + implAdjustInSolarThread(true); return; } @@ -1169,7 +1169,7 @@ void FmGridControl::DeleteSelectedRows() OSL_FAIL("Exception caught while deleting rows!"); } // An den DatenCursor anpassen - AdjustDataSource(sal_True); + AdjustDataSource(true); EndCursorAction(); SetUpdateMode(sal_True); } @@ -1201,7 +1201,7 @@ void FmGridControl::DeleteSelectedRows() // there is a next row to position on if (SeekCursor(nIdx)) { - GetSeekRow()->SetState(m_pSeekCursor, sal_True); + GetSeekRow()->SetState(m_pSeekCursor, true); bNewPos = sal_True; // if it's not the row for inserting we keep the bookmark @@ -1215,7 +1215,7 @@ void FmGridControl::DeleteSelectedRows() nIdx = FirstSelectedRow() - 1; if (nIdx >= 0 && SeekCursor(nIdx)) { - GetSeekRow()->SetState(m_pSeekCursor, sal_True); + GetSeekRow()->SetState(m_pSeekCursor, true); bNewPos = sal_True; aBookmark = m_pSeekCursor->getBookmark(); @@ -1318,7 +1318,7 @@ void FmGridControl::DeleteSelectedRows() } // An den DatenCursor anpassen - AdjustDataSource(sal_True); + AdjustDataSource(true); // es konnten nicht alle Zeilen geloescht werden // da nie nicht geloeschten wieder selektieren @@ -1382,7 +1382,7 @@ void FmGridControl::positioned(const ::com::sun::star::lang::EventObject& /*rEve { SAL_INFO("svx.fmcmop", "FmGridControl::positioned"); // position on the data source (force it to be done in the main thread) - implAdjustInSolarThread(sal_False); + implAdjustInSolarThread(false); } sal_Bool FmGridControl::commit() @@ -1407,8 +1407,8 @@ void FmGridControl::inserted(const ::com::sun::star::lang::EventObject& /*rEvent return; // Zeile ist eingefuegt worden, dann den status und mode zuruecksetzen - xRow->SetState(m_pDataCursor, sal_False); - xRow->SetNew(sal_False); + xRow->SetState(m_pDataCursor, false); + xRow->SetNew(false); } @@ -1832,7 +1832,7 @@ Sequence< Any> FmGridControl::getSelectionBookmarks() // Zunaechst den DatenCursor auf den selektierten Satz pos. if (SeekCursor(nIdx)) { - GetSeekRow()->SetState(m_pSeekCursor, sal_True); + GetSeekRow()->SetState(m_pSeekCursor, true); pBookmarks[i] = m_pSeekCursor->getBookmark(); } diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 29c7a8a662a4..65ddd98f37f3 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -2418,10 +2418,10 @@ void FmXGridPeer::setMode(const OUString& Mode) throw( NoSupportException, Runti FmGridControl* pGrid = (FmGridControl*) GetWindow(); if ( Mode == "FilterMode" ) - pGrid->SetFilterMode(sal_True); + pGrid->SetFilterMode(true); else { - pGrid->SetFilterMode(sal_False); + pGrid->SetFilterMode(false); pGrid->setDataSource(m_xCursor); } } diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 82ff2bcd7522..9fd0bde2350f 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -108,7 +108,7 @@ private: { pSeek->moveToBookmark(*pIter); // get the data - rSeekRow->SetState(pSeek, sal_True); + rSeekRow->SetState(pSeek, true); sal_Int32 nSeekPos = pSeek->getRow() - 1; m_pControl->SetSeekPos(nSeekPos,aAccess); m_pControl->RowModified(nSeekPos); @@ -239,7 +239,7 @@ static const sal_uInt16 ControlMap[] = 0 }; -sal_Bool CompareBookmark(const Any& aLeft, const Any& aRight) +bool CompareBookmark(const Any& aLeft, const Any& aRight) { return ::comphelper::compare(aLeft, aRight); } @@ -322,9 +322,9 @@ void DbGridControl::NavigationBar::PositionDataSource(sal_Int32 nRecord) return; // the MoveToPosition may cause a LoseFocus which would lead to a second MoveToPosition, // so protect against this recursion - m_bPositioning = sal_True; + m_bPositioning = true; ((DbGridControl*)GetParent())->MoveToPosition(nRecord - 1); - m_bPositioning = sal_False; + m_bPositioning = false; } DbGridControl::NavigationBar::NavigationBar(Window* pParent, WinBits nStyle) @@ -340,7 +340,7 @@ DbGridControl::NavigationBar::NavigationBar(Window* pParent, WinBits nStyle) ,m_aNewBtn(this, WB_RECTSTYLE|WB_NOPOINTERFOCUS) ,m_nDefaultWidth(0) ,m_nCurrentPos(-1) - ,m_bPositioning(sal_False) + ,m_bPositioning(false) { m_aFirstBtn.SetSymbol(SYMBOL_FIRST); m_aPrevBtn.SetSymbol(SYMBOL_PREV); @@ -511,7 +511,7 @@ IMPL_LINK(DbGridControl::NavigationBar, OnClick, Button *, pButton ) return 0; } -void DbGridControl::NavigationBar::InvalidateAll(sal_Int32 nCurrentPos, sal_Bool bAll) +void DbGridControl::NavigationBar::InvalidateAll(sal_Int32 nCurrentPos, bool bAll) { if (m_nCurrentPos != nCurrentPos || nCurrentPos < 0 || bAll) { @@ -541,13 +541,13 @@ void DbGridControl::NavigationBar::InvalidateAll(sal_Int32 nCurrentPos, sal_Bool } } -sal_Bool DbGridControl::NavigationBar::GetState(sal_uInt16 nWhich) const +bool DbGridControl::NavigationBar::GetState(sal_uInt16 nWhich) const { DbGridControl* pParent = (DbGridControl*)GetParent(); if (!pParent->IsOpen() || pParent->IsDesignMode() || !pParent->IsEnabled() || pParent->IsFilterMode() ) - return sal_False; + return false; else { // check if we have a master state provider @@ -558,7 +558,7 @@ sal_Bool DbGridControl::NavigationBar::GetState(sal_uInt16 nWhich) const return (nState>0); } - sal_Bool bAvailable = sal_True; + bool bAvailable = true; switch (nWhich) { @@ -755,8 +755,8 @@ void DbGridControl::NavigationBar::StateChanged( StateChangedType nType ) } } -DbGridRow::DbGridRow(CursorWrapper* pCur, sal_Bool bPaintCursor) - :m_bIsNew(sal_False) +DbGridRow::DbGridRow(CursorWrapper* pCur, bool bPaintCursor) + :m_bIsNew(false) { if (pCur && pCur->Is()) @@ -810,14 +810,14 @@ DbGridRow::~DbGridRow() m_aVariants.clear(); } -void DbGridRow::SetState(CursorWrapper* pCur, sal_Bool bPaintCursor) +void DbGridRow::SetState(CursorWrapper* pCur, bool bPaintCursor) { if (pCur && pCur->Is()) { if (pCur->rowDeleted()) { m_eStatus = GRS_DELETED; - m_bIsNew = sal_False; + m_bIsNew = false; } else { @@ -832,7 +832,7 @@ void DbGridRow::SetState(CursorWrapper* pCur, sal_Bool bPaintCursor) m_bIsNew = ::comphelper::getBOOL(xSet->getPropertyValue(FM_PROP_ISNEW)); } else - m_bIsNew = sal_False; + m_bIsNew = false; } try @@ -847,14 +847,14 @@ void DbGridRow::SetState(CursorWrapper* pCur, sal_Bool bPaintCursor) DBG_UNHANDLED_EXCEPTION(); m_aBookmark = Any(); m_eStatus = GRS_INVALID; - m_bIsNew = sal_False; + m_bIsNew = false; } } else { m_aBookmark = Any(); m_eStatus = GRS_INVALID; - m_bIsNew = sal_False; + m_bIsNew = false; } } @@ -883,19 +883,19 @@ DbGridControl::DbGridControl( ,m_nOptionMask(OPT_INSERT | OPT_UPDATE | OPT_DELETE) ,m_nLastColId((sal_uInt16)-1) ,m_nLastRowId(-1) - ,m_bDesignMode(sal_False) - ,m_bRecordCountFinal(sal_False) - ,m_bMultiSelection(sal_True) - ,m_bNavigationBar(sal_True) - ,m_bSynchDisplay(sal_True) - ,m_bForceROController(sal_False) - ,m_bHandle(sal_True) - ,m_bFilterMode(sal_False) - ,m_bWantDestruction(sal_False) - ,m_bInAdjustDataSource(sal_False) - ,m_bPendingAdjustRows(sal_False) - ,m_bHideScrollbars( sal_False ) - ,m_bUpdating(sal_False) + ,m_bDesignMode(false) + ,m_bRecordCountFinal(false) + ,m_bMultiSelection(true) + ,m_bNavigationBar(true) + ,m_bSynchDisplay(true) + ,m_bForceROController(false) + ,m_bHandle(true) + ,m_bFilterMode(false) + ,m_bWantDestruction(false) + ,m_bInAdjustDataSource(false) + ,m_bPendingAdjustRows(false) + ,m_bHideScrollbars( false ) + ,m_bUpdating(false) { OUString sName(SVX_RESSTR(RID_STR_NAVIGATIONBAR)); @@ -930,7 +930,7 @@ DbGridControl::~DbGridControl() RemoveColumns(); { - m_bWantDestruction = sal_True; + m_bWantDestruction = true; osl::MutexGuard aGuard(m_aDestructionSafety); if (m_pFieldListeners) DisconnectFromFields(); @@ -1065,7 +1065,7 @@ void DbGridControl::ImplInitWindow( const InitWindowFacet _eInitWhat ) } } -void DbGridControl::RemoveRows(sal_Bool bNewCursor) +void DbGridControl::RemoveRows(bool bNewCursor) { // Did the data cursor change? if (!bNewCursor) @@ -1075,7 +1075,7 @@ void DbGridControl::RemoveRows(sal_Bool bNewCursor) m_nCurrentPos = m_nSeekPos = -1; m_nOptions = OPT_READONLY; - RowRemoved(0, GetRowCount(), sal_False); + RowRemoved(0, GetRowCount(), false); m_nTotalCount = -1; } else @@ -1104,7 +1104,7 @@ void DbGridControl::RemoveRows() // reset number of sentences to zero in the browser DbGridControl_Base::RemoveRows(); - m_aBar.InvalidateAll(m_nCurrentPos, sal_True); + m_aBar.InvalidateAll(m_nCurrentPos, true); } void DbGridControl::ArrangeControls(sal_uInt16& nX, sal_uInt16 nY) @@ -1118,7 +1118,7 @@ void DbGridControl::ArrangeControls(sal_uInt16& nX, sal_uInt16 nY) } } -void DbGridControl::EnableHandle(sal_Bool bEnable) +void DbGridControl::EnableHandle(bool bEnable) { if (m_bHandle == bEnable) return; @@ -1163,7 +1163,7 @@ namespace } } -void DbGridControl::EnableNavigationBar(sal_Bool bEnable) +void DbGridControl::EnableNavigationBar(bool bEnable) { if (m_bNavigationBar == bEnable) return; @@ -1174,7 +1174,7 @@ void DbGridControl::EnableNavigationBar(sal_Bool bEnable) { m_aBar.Show(); m_aBar.Enable(); - m_aBar.InvalidateAll(m_nCurrentPos, sal_True); + m_aBar.InvalidateAll(m_nCurrentPos, true); if ( adjustModeForScrollbars( m_nMode, m_bNavigationBar, m_bHideScrollbars ) ) SetMode( m_nMode ); @@ -1259,14 +1259,14 @@ sal_uInt16 DbGridControl::SetOptions(sal_uInt16 nOpt) if (m_nOptions & OPT_INSERT) { // the insert option is to be set m_xEmptyRow = new DbGridRow(); - RowInserted(GetRowCount(), 1, sal_True); + RowInserted(GetRowCount(), 1, true); } else { // the insert option is to be reset m_xEmptyRow = NULL; if ((GetCurRow() == GetRowCount() - 1) && (GetCurRow() > 0)) GoToRowColumnId(GetCurRow() - 1, GetCurColumnId()); - RowRemoved(GetRowCount(), 1, sal_True); + RowRemoved(GetRowCount(), 1, true); } } @@ -1277,7 +1277,7 @@ sal_uInt16 DbGridControl::SetOptions(sal_uInt16 nOpt) return m_nOptions; } -void DbGridControl::ForceHideScrollbars( sal_Bool _bForce ) +void DbGridControl::ForceHideScrollbars( bool _bForce ) { if ( m_bHideScrollbars == _bForce ) return; @@ -1288,7 +1288,7 @@ void DbGridControl::ForceHideScrollbars( sal_Bool _bForce ) SetMode( m_nMode ); } -void DbGridControl::EnablePermanentCursor(sal_Bool bEnable) +void DbGridControl::EnablePermanentCursor(bool bEnable) { if (IsPermanentCursorEnabled() == bEnable) return; @@ -1315,7 +1315,7 @@ void DbGridControl::EnablePermanentCursor(sal_Bool bEnable) ActivateCell(); } -sal_Bool DbGridControl::IsPermanentCursorEnabled() const +bool DbGridControl::IsPermanentCursorEnabled() const { return ((m_nMode & BROWSER_CURSOR_WO_FOCUS) != 0) && ((m_nMode & BROWSER_HIDECURSOR) == 0); } @@ -1509,9 +1509,9 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt } if (nRecordCount) { - m_xPaintRow = m_xSeekRow = new DbGridRow(m_pSeekCursor, sal_True); - m_xDataRow = new DbGridRow(m_pDataCursor, sal_False); - RowInserted(0, nRecordCount, sal_False); + m_xPaintRow = m_xSeekRow = new DbGridRow(m_pSeekCursor, true); + m_xDataRow = new DbGridRow(m_pDataCursor, false); + RowInserted(0, nRecordCount, false); if (m_xSeekRow->IsValid()) try @@ -1554,9 +1554,9 @@ void DbGridControl::setDataSource(const Reference< XRowSet >& _xCursor, sal_uInt // RecalcRows was already called while resizing if (!IsResizing() && GetRowCount()) - RecalcRows(GetTopRow(), GetVisibleRows(), sal_True); + RecalcRows(GetTopRow(), GetVisibleRows(), true); - m_aBar.InvalidateAll(m_nCurrentPos, sal_True); + m_aBar.InvalidateAll(m_nCurrentPos, true); SetUpdateMode(sal_True); // start listening on the seek cursor @@ -1754,7 +1754,7 @@ sal_Bool DbGridControl::SeekRow(long nRow) m_xPaintRow = m_xEmptyRow; else { - m_xSeekRow->SetState( m_pSeekCursor, sal_True ); + m_xSeekRow->SetState( m_pSeekCursor, true ); m_xPaintRow = m_xSeekRow; } } @@ -1767,10 +1767,10 @@ sal_Bool DbGridControl::SeekRow(long nRow) // Is called whenever the visible amount of data changes void DbGridControl::VisibleRowsChanged( long nNewTopRow, sal_uInt16 nLinesOnScreen ) { - RecalcRows(nNewTopRow, nLinesOnScreen , sal_False); + RecalcRows(nNewTopRow, nLinesOnScreen, false); } -void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_Bool bUpdateCursor) +void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, bool bUpdateCursor) { // Wenn kein Cursor -> keine Rows im Browser. if (!m_pSeekCursor) @@ -1802,7 +1802,7 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B aCacheSize <<= sal_Int32(nLinesOnScreen*2); xSet->setPropertyValue(FM_PROP_FETCHSIZE, aCacheSize); // here we need to update the cursor for sure - bUpdateCursor = sal_True; + bUpdateCursor = true; bCacheAligned = true; nLimit = nLinesOnScreen; } @@ -1814,11 +1814,11 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B // the cache was updated and no rowcount yet if (nDelta < nLimit && (nDelta > 0 || (bCacheAligned && m_nTotalCount < 0)) ) - SeekCursor(nNewTopRow + nLinesOnScreen - 1, sal_False); + SeekCursor(nNewTopRow + nLinesOnScreen - 1, false); else if (nDelta < 0 && std::abs(nDelta) < nLimit) - SeekCursor(nNewTopRow, sal_False); + SeekCursor(nNewTopRow, false); else if (nDelta != 0 || bUpdateCursor) - SeekCursor(nNewTopRow, sal_True); + SeekCursor(nNewTopRow, true); AdjustRows(); @@ -1826,7 +1826,7 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B EnablePaint(true); } -void DbGridControl::RowInserted(long nRow, long nNumRows, sal_Bool bDoPaint, sal_Bool bKeepSelection) +void DbGridControl::RowInserted(long nRow, long nNumRows, bool bDoPaint, bool bKeepSelection) { if (nNumRows) { @@ -1846,7 +1846,7 @@ void DbGridControl::RowInserted(long nRow, long nNumRows, sal_Bool bDoPaint, sal } } -void DbGridControl::RowRemoved(long nRow, long nNumRows, sal_Bool bDoPaint) +void DbGridControl::RowRemoved(long nRow, long nNumRows, bool bDoPaint) { if (nNumRows) { @@ -1898,7 +1898,7 @@ void DbGridControl::AdjustRows() long nDelta = GetRowCount() - (long)nRecordCount; if (nDelta > 0) // too many { - RowRemoved(GetRowCount() - nDelta, nDelta, sal_False); + RowRemoved(GetRowCount() - nDelta, nDelta, false); // some rows are gone, thus, repaint starting at the current position Invalidate(); @@ -1911,11 +1911,11 @@ void DbGridControl::AdjustRows() if (nRecordCount) GoToRowColumnId(nNewPos, GetColumnId(GetCurColumnId())); if (!IsResizing() && GetRowCount()) - RecalcRows(GetTopRow(), GetVisibleRows(), sal_True); - m_aBar.InvalidateAll(m_nCurrentPos, sal_True); + RecalcRows(GetTopRow(), GetVisibleRows(), true); + m_aBar.InvalidateAll(m_nCurrentPos, true); } else // too few - RowInserted(GetRowCount(), -nDelta, sal_True); + RowInserted(GetRowCount(), -nDelta, true); } if (m_bRecordCountFinal && m_nTotalCount < 0) @@ -1996,7 +1996,7 @@ sal_Bool DbGridControl::CursorMoving(long nNewRow, sal_uInt16 nNewCol) return sal_True; } -sal_Bool DbGridControl::SetCurrent(long nNewRow) +bool DbGridControl::SetCurrent(long nNewRow) { // Each movement of the datacursor must start with BeginCursorAction and end with // EndCursorAction to block all notifications during the movement @@ -2041,12 +2041,12 @@ sal_Bool DbGridControl::SetCurrent(long nNewRow) if (!m_pDataCursor->moveToBookmark(aBookmark)) { EndCursorAction(); - return sal_False; + return false; } } } } - m_xDataRow->SetState(m_pDataCursor, sal_False); + m_xDataRow->SetState(m_pDataCursor, false); m_xCurrentRow = m_xDataRow; long nPaintPos = -1; @@ -2067,18 +2067,18 @@ sal_Bool DbGridControl::SetCurrent(long nNewRow) { OSL_FAIL("DbGridControl::SetCurrent : SeekRow failed !"); EndCursorAction(); - return sal_False; + return false; } } catch ( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); EndCursorAction(); - return sal_False; + return false; } EndCursorAction(); - return sal_True; + return true; } void DbGridControl::CursorMoved() @@ -2120,17 +2120,17 @@ void DbGridControl::onColumnChange() m_pGridListener->columnChanged(); } -void DbGridControl::setDisplaySynchron(sal_Bool bSync) +void DbGridControl::setDisplaySynchron(bool bSync) { if (bSync != m_bSynchDisplay) { m_bSynchDisplay = bSync; if (m_bSynchDisplay) - AdjustDataSource(sal_False); + AdjustDataSource(false); } } -void DbGridControl::AdjustDataSource(sal_Bool bFull) +void DbGridControl::AdjustDataSource(bool bFull) { SAL_INFO("svx.fmcomp", "DbGridControl::AdjustDataSource"); SolarMutexGuard aGuard; @@ -2177,7 +2177,7 @@ void DbGridControl::AdjustDataSource(sal_Bool bFull) if (nNewPos < 0)// could not find any position return; - m_bInAdjustDataSource = sal_True; + m_bInAdjustDataSource = true; if (nNewPos != m_nCurrentPos) { if (m_bSynchDisplay) @@ -2195,7 +2195,7 @@ void DbGridControl::AdjustDataSource(sal_Bool bFull) SetCurrent(nNewPos); RowModified(nNewPos); } - m_bInAdjustDataSource = sal_False; + m_bInAdjustDataSource = false; // if the data cursor was moved from outside, this section is voided SetNoSelection(); @@ -2253,7 +2253,7 @@ sal_Int32 DbGridControl::AlignSeekCursor() return m_nSeekPos; } -sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) +bool DbGridControl::SeekCursor(long nRow, bool bAbsolute) { // position SeekCursor onto the data cursor, no data transmission @@ -2261,11 +2261,11 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) if (IsFilterRow(nRow)) { m_nSeekPos = 0; - return sal_True; + return true; } if (!m_pSeekCursor) - return sal_False; + return false; // is this an insertion? if (IsValid(m_xCurrentRow) && m_xCurrentRow->IsNew() && @@ -2286,7 +2286,7 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) m_nSeekPos = nRow; else { - sal_Bool bSuccess=sal_False; + bool bSuccess = false; long nSteps = 0; try { @@ -2295,7 +2295,7 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) // somebody deleted the current row of the seek cursor. Move it away from this row. m_pSeekCursor->next(); if ( m_pSeekCursor->isAfterLast() || m_pSeekCursor->isBeforeFirst() ) - bAbsolute = sal_True; + bAbsolute = true; } if ( !bAbsolute ) @@ -2317,7 +2317,7 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) if (nSteps > 0) // position onto the last needed data set { if (m_pSeekCursor->isAfterLast()) - bSuccess = sal_False; + bSuccess = false; else if (m_pSeekCursor->isBeforeFirst()) bSuccess = m_pSeekCursor->absolute(nSteps); else @@ -2326,7 +2326,7 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) else if (nSteps < 0) { if (m_pSeekCursor->isBeforeFirst()) - bSuccess = sal_False; + bSuccess = false; else if (m_pSeekCursor->isAfterLast()) bSuccess = m_pSeekCursor->absolute(nSteps); else @@ -2335,7 +2335,7 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) else { m_nSeekPos = nRow; - return sal_True; + return true; } } } @@ -2351,14 +2351,14 @@ sal_Bool DbGridControl::SeekCursor(long nRow, sal_Bool bAbsolute) if (bAbsolute || nSteps > 0) { if (m_pSeekCursor->isLast()) - bSuccess=sal_True; + bSuccess = true; else bSuccess = m_pSeekCursor->last(); } else { if (m_pSeekCursor->isFirst()) - bSuccess = sal_True; + bSuccess = true; else bSuccess = m_pSeekCursor->first(); } @@ -2547,11 +2547,11 @@ void DbGridControl::SetDesignMode(bool bMode) GetDataWindow().SetMouseTransparent(bMode); SetMouseTransparent(bMode); - m_aBar.InvalidateAll(m_nCurrentPos, sal_True); + m_aBar.InvalidateAll(m_nCurrentPos, true); } } -void DbGridControl::SetFilterMode(sal_Bool bMode) +void DbGridControl::SetFilterMode(bool bMode) { if (IsFilterMode() != bMode) { @@ -2564,7 +2564,7 @@ void DbGridControl::SetFilterMode(sal_Bool bMode) // there is no cursor anymore if (IsEditing()) DeactivateCell(); - RemoveRows(sal_False); + RemoveRows(false); m_xEmptyRow = new DbGridRow(); @@ -2577,7 +2577,7 @@ void DbGridControl::SetFilterMode(sal_Bool bMode) } // one row for filtering - RowInserted(0, 1, sal_True); + RowInserted(0, 1, true); SetUpdateMode(sal_True); } else @@ -2680,7 +2680,7 @@ void DbGridControl::DataSourcePropertyChanged(const PropertyChangeEvent& evt) th // -> we've to add a new grid row if ((nRecordCount == GetRowCount() - 1) && m_xCurrentRow->IsNew()) { - RowInserted(GetRowCount(), 1, sal_True); + RowInserted(GetRowCount(), 1, true); InvalidateStatusCell(m_nCurrentPos); m_aBar.InvalidateAll(m_nCurrentPos); } @@ -2692,7 +2692,7 @@ void DbGridControl::DataSourcePropertyChanged(const PropertyChangeEvent& evt) th // one is about to be cleaned, too, the second one is obsolet now. if (m_xCurrentRow->IsNew() && nRecordCount == (GetRowCount() - 2)) { - RowRemoved(GetRowCount() - 1, 1, sal_True); + RowRemoved(GetRowCount() - 1, 1, true); InvalidateStatusCell(m_nCurrentPos); m_aBar.InvalidateAll(m_nCurrentPos); } @@ -2728,7 +2728,7 @@ void DbGridControl::StartDrag( sal_Int8 /*nAction*/, const Point& rPosPixel ) } } -sal_Bool DbGridControl::canCopyCellText(sal_Int32 _nRow, sal_Int16 _nColId) +bool DbGridControl::canCopyCellText(sal_Int32 _nRow, sal_Int16 _nColId) { return (_nRow >= 0) && (_nRow < GetRowCount()) @@ -2908,14 +2908,14 @@ void DbGridControl::CellModified() if (m_nCurrentPos == GetRowCount() - 1) { // increment RowCount - RowInserted(GetRowCount(), 1, sal_True); + RowInserted(GetRowCount(), 1, true); InvalidateStatusCell(m_nCurrentPos); m_aBar.InvalidateAll(m_nCurrentPos); } } else if (m_xCurrentRow->GetStatus() != GRS_MODIFIED) { - m_xCurrentRow->SetState(m_pDataCursor, sal_False); + m_xCurrentRow->SetState(m_pDataCursor, false); SAL_INFO("svx.fmcomp", "current row is not new, after SetState, new state: " << ROWSTATUS(m_xCurrentRow)); m_xCurrentRow->SetStatus(GRS_MODIFIED); SAL_INFO("svx.fmcomp", "current row is not new, new state: MODIFIED"); @@ -2981,7 +2981,7 @@ void DbGridControl::Undo() EndCursorAction(); - m_xDataRow->SetState(m_pDataCursor, sal_False); + m_xDataRow->SetState(m_pDataCursor, false); if (&m_xPaintRow == &m_xCurrentRow) m_xPaintRow = m_xCurrentRow = m_xDataRow; else @@ -2992,7 +2992,7 @@ void DbGridControl::Undo() if (m_nCurrentPos == GetRowCount() - 2) { // maybe we already removed it (in resetCurrentRow, called if the above moveToInsertRow // caused our data source form to be reset - which should be the usual case ....) - RowRemoved(GetRowCount() - 1, 1, sal_True); + RowRemoved(GetRowCount() - 1, 1, true); m_aBar.InvalidateAll(m_nCurrentPos); } @@ -3019,14 +3019,14 @@ void DbGridControl::resetCurrentRow() { if (m_nCurrentPos == GetRowCount() - 2) { - RowRemoved(GetRowCount() - 1, 1, sal_True); + RowRemoved(GetRowCount() - 1, 1, true); m_aBar.InvalidateAll(m_nCurrentPos); } } } // update the rows - m_xDataRow->SetState(m_pDataCursor, sal_False); + m_xDataRow->SetState(m_pDataCursor, false); if (&m_xPaintRow == &m_xCurrentRow) m_xPaintRow = m_xCurrentRow = m_xDataRow; else @@ -3052,12 +3052,12 @@ sal_Bool DbGridControl::IsModified() const return !IsFilterMode() && IsValid(m_xCurrentRow) && (m_xCurrentRow->IsModified() || DbGridControl_Base::IsModified()); } -sal_Bool DbGridControl::IsCurrentAppending() const +bool DbGridControl::IsCurrentAppending() const { return m_xCurrentRow.Is() && m_xCurrentRow->IsNew(); } -sal_Bool DbGridControl::IsInsertionRow(long nRow) const +bool DbGridControl::IsInsertionRow(long nRow) const { return (m_nOptions & OPT_INSERT) && m_nTotalCount >= 0 && (nRow == GetRowCount() - 1); } @@ -3093,7 +3093,7 @@ sal_Bool DbGridControl::SaveModified() if ( IsValid(m_xCurrentRow) ) { - m_xCurrentRow->SetState(m_pDataCursor, sal_False); + m_xCurrentRow->SetState(m_pDataCursor, false); SAL_INFO("svx.fmcomp", "explicit SetState, new state: " << ROWSTATUS(m_xCurrentRow)); InvalidateStatusCell( m_nCurrentPos ); } @@ -3123,7 +3123,7 @@ sal_Bool DbGridControl::SaveRow() if (!SaveModified()) return sal_False; } - m_bUpdating = sal_True; + m_bUpdating = true; BeginCursorAction(); sal_Bool bAppending = m_xCurrentRow->IsNew(); @@ -3140,7 +3140,7 @@ sal_Bool DbGridControl::SaveRow() catch(SQLException&) { EndCursorAction(); - m_bUpdating = sal_False; + m_bUpdating = false; return sal_False; } @@ -3150,9 +3150,9 @@ sal_Bool DbGridControl::SaveRow() { // if we are appending we still sit on the insert row // we don't move just clear the flags not to move on the current row - m_xCurrentRow->SetState(m_pDataCursor, sal_False); + m_xCurrentRow->SetState(m_pDataCursor, false); SAL_INFO("svx.fmcomp", "explicit SetState after a successful update, new state: " << ROWSTATUS(m_xCurrentRow)); - m_xCurrentRow->SetNew(sal_False); + m_xCurrentRow->SetNew(false); // adjust the seekcursor if it is on the same position as the datacursor if (m_nSeekPos == m_nCurrentPos || bAppending) @@ -3162,7 +3162,7 @@ sal_Bool DbGridControl::SaveRow() Any aBookmark = bAppending ? m_pDataCursor->getBookmark() : m_pSeekCursor->getBookmark(); m_pSeekCursor->moveToBookmark(aBookmark); // get the data - m_xSeekRow->SetState(m_pSeekCursor, sal_True); + m_xSeekRow->SetState(m_pSeekCursor, true); m_nSeekPos = m_pSeekCursor->getRow() - 1; } } @@ -3173,7 +3173,7 @@ sal_Bool DbGridControl::SaveRow() { } - m_bUpdating = sal_False; + m_bUpdating = false; EndCursorAction(); // The old code returned (nRecords != 0) here. @@ -3399,7 +3399,7 @@ sal_uInt16 DbGridControl::GetModelColumnPos( sal_uInt16 nId ) const return GRID_COLUMN_NOT_FOUND; } -void DbGridControl::implAdjustInSolarThread(sal_Bool _bRows) +void DbGridControl::implAdjustInSolarThread(bool _bRows) { SAL_INFO("svx.fmcomp", "DbGridControl::implAdjustInSolarThread"); ::osl::MutexGuard aGuard(m_aAdjustSafety); diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index d10332a8ef3a..81632b074947 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -427,7 +427,7 @@ void GalleryBrowser1::ImplExecute( sal_uInt16 nId ) DBG_ASSERT(aDlg, "Dialogdiet fail!"); if( aDlg->Execute() == RET_OK ) - pTheme->SetId( aDlg->GetId(), sal_True ); + pTheme->SetId( aDlg->GetId(), true ); delete aDlg; } } diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 90e735c1acf6..3a148984d4f5 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -603,7 +603,7 @@ sal_Int8 GalleryBrowser2::ExecuteDrop( DropTargetHelper&, const ExecuteDropEvent if( mpCurTheme->IsDragging() ) mpCurTheme->ChangeObjectPos( mpCurTheme->GetDragPos(), nInsertPos ); else - nRet = mpCurTheme->InsertTransferable( rEvt.maDropEvent.Transferable, nInsertPos ); + nRet = mpCurTheme->InsertTransferable( rEvt.maDropEvent.Transferable, nInsertPos ) ? 1 : 0; } return nRet; diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index 9259f0fe37f6..4c7d32ac961f 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -102,11 +102,11 @@ void GalleryPreview::DataChanged( const DataChangedEvent& rDCEvt ) Window::DataChanged( rDCEvt ); } -sal_Bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const +bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rectangle& rResultRect ) const { const Size aWinSize( GetOutputSizePixel() ); Size aNewSize( LogicToPixel( rGraphic.GetPrefSize(), rGraphic.GetPrefMapMode() ) ); - sal_Bool bRet = sal_False; + bool bRet = false; if( aNewSize.Width() && aNewSize.Height() ) { @@ -129,7 +129,7 @@ sal_Bool GalleryPreview::ImplGetGraphicCenterRect( const Graphic& rGraphic, Rect ( aWinSize.Height() - aNewSize.Height() ) >> 1 ); rResultRect = Rectangle( aNewPos, aNewSize ); - bRet = sal_True; + bRet = true; } return bRet; diff --git a/svx/source/gallery2/galexpl.cxx b/svx/source/gallery2/galexpl.cxx index a6c0b434d10b..3a3c53be7cfb 100644 --- a/svx/source/gallery2/galexpl.cxx +++ b/svx/source/gallery2/galexpl.cxx @@ -52,7 +52,7 @@ bool GalleryExplorer::FillThemeList( std::vector& rThemeList ) return !rThemeList.empty(); } -sal_Bool GalleryExplorer::FillObjList( const OUString& rThemeName, std::vector &rObjList ) +bool GalleryExplorer::FillObjList( const OUString& rThemeName, std::vector &rObjList ) { Gallery* pGal = ::Gallery::GetGalleryInstance(); @@ -83,7 +83,7 @@ bool GalleryExplorer::FillObjList( const sal_uInt32 nThemeId, std::vectorGetThemeName( nThemeId ), rObjList ); } -sal_Bool GalleryExplorer::FillObjListTitle( const sal_uInt32 nThemeId, std::vector< OUString >& rList ) +bool GalleryExplorer::FillObjListTitle( const sal_uInt32 nThemeId, std::vector< OUString >& rList ) { Gallery* pGal = ::Gallery::GetGalleryInstance(); if( pGal ) @@ -109,10 +109,10 @@ sal_Bool GalleryExplorer::FillObjListTitle( const sal_uInt32 nThemeId, std::vect return !rList.empty(); } -sal_Bool GalleryExplorer::InsertURL( const OUString& rThemeName, const OUString& rURL ) +bool GalleryExplorer::InsertURL( const OUString& rThemeName, const OUString& rURL ) { Gallery* pGal = ::Gallery::GetGalleryInstance(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pGal ) { @@ -131,18 +131,18 @@ sal_Bool GalleryExplorer::InsertURL( const OUString& rThemeName, const OUString& return bRet; } -sal_Bool GalleryExplorer::InsertURL( sal_uIntPtr nThemeId, const OUString& rURL ) +bool GalleryExplorer::InsertURL( sal_uIntPtr nThemeId, const OUString& rURL ) { Gallery* pGal = ::Gallery::GetGalleryInstance(); - return( pGal ? InsertURL( pGal->GetThemeName( nThemeId ), rURL ) : sal_False ); + return pGal && InsertURL( pGal->GetThemeName( nThemeId ), rURL ); } -sal_Bool GalleryExplorer::GetGraphicObj( const OUString& rThemeName, sal_uIntPtr nPos, +bool GalleryExplorer::GetGraphicObj( const OUString& rThemeName, sal_uIntPtr nPos, Graphic* pGraphic, BitmapEx* pThumb, - sal_Bool bProgress ) + bool bProgress ) { Gallery* pGal = ::Gallery::GetGalleryInstance(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pGal ) { @@ -164,12 +164,12 @@ sal_Bool GalleryExplorer::GetGraphicObj( const OUString& rThemeName, sal_uIntPtr return bRet; } -sal_Bool GalleryExplorer::GetGraphicObj( sal_uIntPtr nThemeId, sal_uIntPtr nPos, +bool GalleryExplorer::GetGraphicObj( sal_uIntPtr nThemeId, sal_uIntPtr nPos, Graphic* pGraphic, BitmapEx* pThumb, - sal_Bool bProgress ) + bool bProgress ) { Gallery* pGal = ::Gallery::GetGalleryInstance(); - return( pGal ? GetGraphicObj( pGal->GetThemeName( nThemeId ), nPos, pGraphic, pThumb, bProgress ) : sal_False ); + return pGal && GetGraphicObj( pGal->GetThemeName( nThemeId ), nPos, pGraphic, pThumb, bProgress ); } sal_uIntPtr GalleryExplorer::GetSdrObjCount( const OUString& rThemeName ) @@ -201,11 +201,11 @@ sal_uIntPtr GalleryExplorer::GetSdrObjCount( sal_uIntPtr nThemeId ) return( pGal ? GetSdrObjCount( pGal->GetThemeName( nThemeId ) ) : sal_False ); } -sal_Bool GalleryExplorer::GetSdrObj( const OUString& rThemeName, sal_uIntPtr nSdrModelPos, +bool GalleryExplorer::GetSdrObj( const OUString& rThemeName, sal_uIntPtr nSdrModelPos, SdrModel* pModel, BitmapEx* pThumb ) { Gallery* pGal = ::Gallery::GetGalleryInstance(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pGal ) { @@ -221,7 +221,7 @@ sal_Bool GalleryExplorer::GetSdrObj( const OUString& rThemeName, sal_uIntPtr nSd if( nActPos++ == nSdrModelPos ) { if( pModel ) - bRet = bRet || pTheme->GetModel( i, *pModel, sal_False ); + bRet = bRet || pTheme->GetModel( i, *pModel, false ); if( pThumb ) bRet = bRet || pTheme->GetThumb( i, *pThumb ); @@ -236,17 +236,17 @@ sal_Bool GalleryExplorer::GetSdrObj( const OUString& rThemeName, sal_uIntPtr nSd return bRet; } -sal_Bool GalleryExplorer::GetSdrObj( sal_uIntPtr nThemeId, sal_uIntPtr nSdrModelPos, +bool GalleryExplorer::GetSdrObj( sal_uIntPtr nThemeId, sal_uIntPtr nSdrModelPos, SdrModel* pModel, BitmapEx* pThumb ) { Gallery* pGal = ::Gallery::GetGalleryInstance(); - return( pGal ? GetSdrObj( pGal->GetThemeName( nThemeId ), nSdrModelPos, pModel, pThumb ) : sal_False ); + return pGal && GetSdrObj( pGal->GetThemeName( nThemeId ), nSdrModelPos, pModel, pThumb ); } -sal_Bool GalleryExplorer::BeginLocking( const OUString& rThemeName ) +bool GalleryExplorer::BeginLocking( const OUString& rThemeName ) { Gallery* pGal = ::Gallery::GetGalleryInstance(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pGal ) { @@ -255,23 +255,23 @@ sal_Bool GalleryExplorer::BeginLocking( const OUString& rThemeName ) if( pTheme ) { pTheme->LockTheme(); - bRet = sal_True; + bRet = true; } } return bRet; } -sal_Bool GalleryExplorer::BeginLocking( sal_uIntPtr nThemeId ) +bool GalleryExplorer::BeginLocking( sal_uIntPtr nThemeId ) { Gallery* pGal = ::Gallery::GetGalleryInstance(); - return( pGal ? BeginLocking( pGal->GetThemeName( nThemeId ) ) : sal_False ); + return pGal && BeginLocking( pGal->GetThemeName( nThemeId ) ); } -sal_Bool GalleryExplorer::EndLocking( const OUString& rThemeName ) +bool GalleryExplorer::EndLocking( const OUString& rThemeName ) { Gallery* pGal = ::Gallery::GetGalleryInstance(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pGal ) { @@ -289,7 +289,7 @@ sal_Bool GalleryExplorer::EndLocking( const OUString& rThemeName ) { // release locked theme pGal->ReleaseTheme( pTheme, theLockListener::get() ); - bRet = sal_True; + bRet = true; } } } @@ -297,10 +297,10 @@ sal_Bool GalleryExplorer::EndLocking( const OUString& rThemeName ) return bRet; } -sal_Bool GalleryExplorer::EndLocking( sal_uIntPtr nThemeId ) +bool GalleryExplorer::EndLocking( sal_uIntPtr nThemeId ) { Gallery* pGal = ::Gallery::GetGalleryInstance(); - return( pGal ? EndLocking( pGal->GetThemeName( nThemeId ) ) : sal_False ); + return pGal && EndLocking( pGal->GetThemeName( nThemeId ) ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index d250c6fa0d59..b28a02653403 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -51,10 +51,10 @@ static bool FileExists( const INetURLObject &rURL, const rtl::OUString &rExt ) GalleryThemeEntry::GalleryThemeEntry( bool bCreateUniqueURL, const INetURLObject& rBaseURL, const OUString& rName, - sal_Bool _bReadOnly, sal_Bool _bNewFile, - sal_uInt32 _nId, sal_Bool _bThemeNameFromResource ) : - nId ( _nId ), - bReadOnly ( _bReadOnly ), + bool _bReadOnly, bool _bNewFile, + sal_uInt32 _nId, bool _bThemeNameFromResource ) : + nId ( _nId ), + bReadOnly ( _bReadOnly ), bThemeNameFromResource ( _bThemeNameFromResource ) { INetURLObject aURL( rBaseURL ); @@ -123,15 +123,15 @@ void GalleryThemeEntry::SetName( const OUString& rNewName ) if( aName != rNewName ) { aName = rNewName; - SetModified( sal_True ); - bThemeNameFromResource = sal_False; + SetModified( true ); + bThemeNameFromResource = false; } } -void GalleryThemeEntry::SetId( sal_uInt32 nNewId, sal_Bool bResetThemeName ) +void GalleryThemeEntry::SetId( sal_uInt32 nNewId, bool bResetThemeName ) { nId = nNewId; - SetModified( sal_True ); + SetModified( true ); bThemeNameFromResource = ( nId && bResetThemeName ); } @@ -158,7 +158,7 @@ public: Gallery::Gallery( const OUString& rMultiPath ) : nReadTextEncoding ( osl_getThreadTextEncoding() ) -, bMultiPath ( sal_False ) +, bMultiPath ( false ) { ImplLoad( rMultiPath ); } @@ -190,7 +190,7 @@ Gallery* Gallery::GetGalleryInstance() void Gallery::ImplLoad( const OUString& rMultiPath ) { const sal_Int32 nTokenCount = comphelper::string::getTokenCount(rMultiPath, ';'); - sal_Bool bIsReadOnlyDir; + bool bIsReadOnlyDir; bMultiPath = ( nTokenCount > 0 ); @@ -221,9 +221,9 @@ void Gallery::ImplLoad( const OUString& rMultiPath ) DBG_ASSERT( aRelURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); } -void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsReadOnly ) +void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadOnly ) { - rbDirIsReadOnly = sal_False; + rbDirIsReadOnly = false; try { @@ -249,13 +249,13 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, sal_Bool& rbDirIsR pTestStm->WriteInt32( sal_Int32(1) ); if( pTestStm->GetError() ) - rbDirIsReadOnly = sal_True; + rbDirIsReadOnly = true; delete pTestStm; KillFile( aTestURL ); } else - rbDirIsReadOnly = sal_True; + rbDirIsReadOnly = true; } catch( const ucb::ContentCreationException& ) { @@ -499,14 +499,14 @@ OUString Gallery::GetThemeName( sal_uIntPtr nThemeId ) const return( pFound ? pFound->GetThemeName() : OUString() ); } -sal_Bool Gallery::HasTheme( const OUString& rThemeName ) +bool Gallery::HasTheme( const OUString& rThemeName ) { return( ImplGetThemeEntry( rThemeName ) != NULL ); } -sal_Bool Gallery::CreateTheme( const OUString& rThemeName ) +bool Gallery::CreateTheme( const OUString& rThemeName ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !HasTheme( rThemeName ) && ( GetUserURL().GetProtocol() != INET_PROT_NOT_VALID ) ) { @@ -514,21 +514,21 @@ sal_Bool Gallery::CreateTheme( const OUString& rThemeName ) aURL.Append( rThemeName ); GalleryThemeEntry* pNewEntry = new GalleryThemeEntry( true, aURL, rThemeName, - sal_False, sal_True, 0, sal_False ); + false, true, 0, false ); aThemeList.push_back( pNewEntry ); delete( new GalleryTheme( this, pNewEntry ) ); Broadcast( GalleryHint( GALLERY_HINT_THEME_CREATED, rThemeName ) ); - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool Gallery::RenameTheme( const OUString& rOldName, const OUString& rNewName ) +bool Gallery::RenameTheme( const OUString& rOldName, const OUString& rNewName ) { GalleryThemeEntry* pThemeEntry = ImplGetThemeEntry( rOldName ); - sal_Bool bRet = sal_False; + bool bRet = false; // check if the new theme name is already present if( pThemeEntry && !HasTheme( rNewName ) && !pThemeEntry->IsReadOnly() ) @@ -545,17 +545,17 @@ sal_Bool Gallery::RenameTheme( const OUString& rOldName, const OUString& rNewNam Broadcast( GalleryHint( GALLERY_HINT_THEME_RENAMED, aOldName, pThm->GetName() ) ); ReleaseTheme( pThm, aListener ); - bRet = sal_True; + bRet = true; } } return bRet; } -sal_Bool Gallery::RemoveTheme( const OUString& rThemeName ) +bool Gallery::RemoveTheme( const OUString& rThemeName ) { GalleryThemeEntry* pThemeEntry = ImplGetThemeEntry( rThemeName ); - sal_Bool bRet = sal_False; + bool bRet = false; if( pThemeEntry && !pThemeEntry->IsReadOnly() ) { @@ -590,7 +590,7 @@ sal_Bool Gallery::RemoveTheme( const OUString& rThemeName ) Broadcast( GalleryHint( GALLERY_HINT_THEME_REMOVED, rThemeName ) ); - bRet = sal_True; + bRet = true; } return bRet; @@ -678,7 +678,9 @@ void Gallery::ReleaseTheme( GalleryTheme* pTheme, SfxListener& rListener ) } } -sal_Bool GalleryThemeEntry::IsDefault() const -{ return( ( nId > 0 ) && ( nId != ( RID_GALLERYSTR_THEME_MYTHEME - RID_GALLERYSTR_THEME_START ) ) ); } +bool GalleryThemeEntry::IsDefault() const +{ + return ( nId > 0 ) && ( nId != ( RID_GALLERYSTR_THEME_MYTHEME - RID_GALLERYSTR_THEME_START ) ); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 13fa614a7136..0721035749ec 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -83,7 +83,7 @@ IMPL_LINK( SgaUserDataFactory, MakeUserData, SdrObjFactory*, pObjFactory ) } sal_uInt16 GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, - OUString& rFilterName, sal_Bool bShowProgress ) + OUString& rFilterName, bool bShowProgress ) { sal_uInt16 nRet = SGA_IMPORT_NONE; SfxMedium aMedium( rURL.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ); @@ -110,10 +110,10 @@ sal_uInt16 GalleryGraphicImport( const INetURLObject& rURL, Graphic& rGraphic, return nRet; } -sal_Bool GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel ) +bool GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel ) { sal_uInt32 nVersion; - sal_Bool bRet = sal_False; + bool bRet = false; if( GalleryCodec::IsCoded( rIStm, nVersion ) ) { @@ -154,9 +154,9 @@ sal_Bool GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel ) return bRet; } -sal_Bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& rImageMap ) +bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageMap& rImageMap ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( rModel.GetPageCount() ) { @@ -176,7 +176,7 @@ sal_Bool CreateIMapGraphic( const FmFormModel& rModel, Graphic& rGraphic, ImageM { rGraphic = ( (SdrGrafObj*) pObj )->GetGraphic(); rImageMap = ( (SgaIMapInfo*) pUserData )->GetImageMap(); - bRet = sal_True; + bRet = true; break; } } @@ -237,9 +237,9 @@ OUString GetSvDrawStreamNameFromURL( const INetURLObject& rSvDrawObjURL ) return aRet; } -sal_Bool FileExists( const INetURLObject& rURL ) +bool FileExists( const INetURLObject& rURL ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( rURL.GetProtocol() != INET_PROT_NOT_VALID ) { @@ -265,9 +265,9 @@ sal_Bool FileExists( const INetURLObject& rURL ) return bRet; } -sal_Bool CreateDir( const INetURLObject& rURL ) +bool CreateDir( const INetURLObject& rURL ) { - sal_Bool bRet = FileExists( rURL ); + bool bRet = FileExists( rURL ); if( !bRet ) { @@ -300,9 +300,9 @@ sal_Bool CreateDir( const INetURLObject& rURL ) return bRet; } -sal_Bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL ) +bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL ) { - sal_Bool bRet = sal_False; + bool bRet = false; try { @@ -311,7 +311,7 @@ sal_Bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL ) aDestPath.executeCommand( OUString("transfer"), uno::makeAny( ucb::TransferInfo( sal_False, rSrcURL.GetMainURL( INetURLObject::NO_DECODE ), rDstURL.GetName(), ucb::NameClash::OVERWRITE ) ) ); - bRet = sal_True; + bRet = true; } catch( const ucb::ContentCreationException& ) { @@ -326,9 +326,9 @@ sal_Bool CopyFile( const INetURLObject& rSrcURL, const INetURLObject& rDstURL ) return bRet; } -sal_Bool KillFile( const INetURLObject& rURL ) +bool KillFile( const INetURLObject& rURL ) { - sal_Bool bRet = FileExists( rURL ); + bool bRet = FileExists( rURL ); if( bRet ) { @@ -339,15 +339,15 @@ sal_Bool KillFile( const INetURLObject& rURL ) } catch( const ucb::ContentCreationException& ) { - bRet = sal_False; + bRet = false; } catch( const uno::RuntimeException& ) { - bRet = sal_False; + bRet = false; } catch( const uno::Exception& ) { - bRet = sal_False; + bRet = false; } } @@ -559,7 +559,7 @@ sal_Bool GalleryTransferable::WriteObject( SotStorageStreamRef& rxOStm, void* pU void GalleryTransferable::DragFinished( sal_Int8 nDropAction ) { - mpTheme->SetDragging( sal_False ); + mpTheme->SetDragging( false ); mpTheme->SetDragPos( 0 ); if ( nDropAction ) { @@ -589,7 +589,7 @@ void GalleryTransferable::StartDrag( Window* pWindow, sal_Int8 nDragSourceAction if( mpTheme->GetURL( mnObjectPos, aURL ) && ( aURL.GetProtocol() != INET_PROT_NOT_VALID ) ) { - mpTheme->SetDragging( sal_True ); + mpTheme->SetDragging( true ); mpTheme->SetDragPos( mnObjectPos ); TransferableHelper::StartDrag( pWindow, nDragSourceActions, nDragPointer, nDragImage ); } diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 68f6decd282f..900f935daeae 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -66,7 +66,7 @@ GalleryTheme::GalleryTheme( Gallery* pGallery, GalleryThemeEntry* pThemeEntry ) mnThemeLockCount ( 0 ), mnBroadcasterLockCount( 0 ), nDragPos ( 0 ), - bDragging ( sal_False ) + bDragging ( false ) { ImplCreateSvDrawStorage(); @@ -95,10 +95,10 @@ void GalleryTheme::ImplCreateSvDrawStorage() aSvDrawStorageRef = new SvStorage( false, GetSdvURL().GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ); } -sal_Bool GalleryTheme::ImplWriteSgaObject( const SgaObject& rObj, size_t nPos, GalleryObject* pExistentEntry ) +bool GalleryTheme::ImplWriteSgaObject( const SgaObject& rObj, size_t nPos, GalleryObject* pExistentEntry ) { SvStream* pOStm = ::utl::UcbStreamHelper::CreateStream( GetSdgURL().GetMainURL( INetURLObject::NO_DECODE ), STREAM_WRITE ); - sal_Bool bRet = sal_False; + bool bRet = false; if( pOStm ) { @@ -128,7 +128,7 @@ sal_Bool GalleryTheme::ImplWriteSgaObject( const SgaObject& rObj, size_t nPos, G pEntry->aURL = rObj.GetURL(); pEntry->nOffset = nOffset; pEntry->eObjKind = rObj.GetObjKind(); - bRet = sal_True; + bRet = true; } delete pOStm; @@ -208,7 +208,7 @@ void GalleryTheme::ImplWrite() delete pOStm; } - ImplSetModified( sal_False ); + ImplSetModified( false ); } } } @@ -334,16 +334,16 @@ void GalleryTheme::ImplBroadcast( sal_uIntPtr nUpdatePos ) } } -sal_Bool GalleryTheme::UnlockTheme() +bool GalleryTheme::UnlockTheme() { DBG_ASSERT( mnThemeLockCount, "Theme is not locked" ); - sal_Bool bRet = sal_False; + bool bRet = false; if( mnThemeLockCount ) { --mnThemeLockCount; - bRet = sal_True; + bRet = true; } return bRet; @@ -472,7 +472,7 @@ bool GalleryTheme::RemoveObject( size_t nPos ) Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); delete pEntry; - ImplSetModified( sal_True ); + ImplSetModified( true ); ImplBroadcast( nPos ); } @@ -516,7 +516,7 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg const size_t nCount = aObjectList.size(); LockBroadcaster(); - bAbortActualize = sal_False; + bAbortActualize = false; // reset delete flag for (size_t i = 0; i < nCount; i++) @@ -675,13 +675,13 @@ void GalleryTheme::Actualize( const Link& rActualizeLink, GalleryProgress* pProg } KillFile( aTmpURL ); - ImplSetModified( sal_True ); + ImplSetModified( true ); ImplWrite(); UnlockBroadcaster(); } } -GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sal_Bool bReadOnly ) +GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, bool bReadOnly ) { DBG_ASSERT( rURL.GetProtocol() != INET_PROT_NOT_VALID, "invalid URL" ); @@ -744,7 +744,7 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sa INetURLObject aPathURL( rURL ); pRet = new GalleryThemeEntry( false, aPathURL, aThemeName, - bReadOnly, sal_False, nThemeId, + bReadOnly, false, nThemeId, bThemeNameFromResource ); } @@ -755,25 +755,25 @@ GalleryThemeEntry* GalleryTheme::CreateThemeEntry( const INetURLObject& rURL, sa return pRet; } -sal_Bool GalleryTheme::GetThumb( sal_uIntPtr nPos, BitmapEx& rBmp, sal_Bool ) +bool GalleryTheme::GetThumb( sal_uIntPtr nPos, BitmapEx& rBmp, bool ) { SgaObject* pObj = AcquireObject( nPos ); - sal_Bool bRet = sal_False; + bool bRet = false; if( pObj ) { rBmp = pObj->GetThumbBmp(); ReleaseObject( pObj ); - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, sal_Bool bProgress ) +bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, bool bProgress ) { const GalleryObject* pObject = ImplGetGalleryObject( nPos ); - sal_Bool bRet = sal_False; + bool bRet = false; if( pObject ) { @@ -801,7 +801,7 @@ sal_Bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, sal_Bool ImageMap aIMap; if( CreateIMapGraphic( *aModel.GetModel(), rGraphic, aIMap ) ) - bRet = sal_True; + bRet = true; else { VirtualDevice aVDev; @@ -812,7 +812,7 @@ sal_Bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, sal_Bool aView.ShowSdrPage(aView.GetModel()->GetPage(0)); aView.MarkAll(); rGraphic = aView.GetAllMarkedGraphic(); - bRet = sal_True; + bRet = true; } } } @@ -830,7 +830,7 @@ sal_Bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, sal_Bool //aBmp.Replace( COL_LIGHTMAGENTA, COL_WHITE ); //rGraphic = aBmp; ReleaseObject( pObj ); - bRet = sal_True; + bRet = true; } } break; @@ -843,9 +843,9 @@ sal_Bool GalleryTheme::GetGraphic( sal_uIntPtr nPos, Graphic& rGraphic, sal_Bool return bRet; } -sal_Bool GalleryTheme::InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPos ) +bool GalleryTheme::InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPos ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( rGraphic.GetType() != GRAPHIC_NONE ) { @@ -925,10 +925,10 @@ sal_Bool GalleryTheme::InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInse return bRet; } -sal_Bool GalleryTheme::GetModel( sal_uIntPtr nPos, SdrModel& rModel, sal_Bool ) +bool GalleryTheme::GetModel( sal_uIntPtr nPos, SdrModel& rModel, bool ) { const GalleryObject* pObject = ImplGetGalleryObject( nPos ); - sal_Bool bRet = sal_False; + bool bRet = false; if( pObject && ( SGA_OBJ_SVDRAW == pObject->eObjKind ) ) { @@ -952,11 +952,11 @@ sal_Bool GalleryTheme::GetModel( sal_uIntPtr nPos, SdrModel& rModel, sal_Bool ) return bRet; } -sal_Bool GalleryTheme::InsertModel( const FmFormModel& rModel, sal_uIntPtr nInsertPos ) +bool GalleryTheme::InsertModel( const FmFormModel& rModel, sal_uIntPtr nInsertPos ) { INetURLObject aURL( ImplCreateUniqueURL( SGA_OBJ_SVDRAW ) ); SvStorageRef xStor( GetSvDrawStorage() ); - sal_Bool bRet = sal_False; + bool bRet = false; if( xStor.Is() ) { @@ -997,10 +997,10 @@ sal_Bool GalleryTheme::InsertModel( const FmFormModel& rModel, sal_uIntPtr nInse return bRet; } -sal_Bool GalleryTheme::GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rxModelStream, sal_Bool ) +bool GalleryTheme::GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rxModelStream, bool ) { const GalleryObject* pObject = ImplGetGalleryObject( nPos ); - sal_Bool bRet = sal_False; + bool bRet = false; if( pObject && ( SGA_OBJ_SVDRAW == pObject->eObjKind ) ) { @@ -1048,11 +1048,11 @@ sal_Bool GalleryTheme::GetModelStream( sal_uIntPtr nPos, SotStorageStreamRef& rx return bRet; } -sal_Bool GalleryTheme::InsertModelStream( const SotStorageStreamRef& rxModelStream, sal_uIntPtr nInsertPos ) +bool GalleryTheme::InsertModelStream( const SotStorageStreamRef& rxModelStream, sal_uIntPtr nInsertPos ) { INetURLObject aURL( ImplCreateUniqueURL( SGA_OBJ_SVDRAW ) ); SvStorageRef xStor( GetSvDrawStorage() ); - sal_Bool bRet = sal_False; + bool bRet = false; if( xStor.Is() ) { @@ -1082,27 +1082,27 @@ sal_Bool GalleryTheme::InsertModelStream( const SotStorageStreamRef& rxModelStre return bRet; } -sal_Bool GalleryTheme::GetURL( sal_uIntPtr nPos, INetURLObject& rURL, sal_Bool ) +bool GalleryTheme::GetURL( sal_uIntPtr nPos, INetURLObject& rURL, bool ) { const GalleryObject* pObject = ImplGetGalleryObject( nPos ); - sal_Bool bRet = sal_False; + bool bRet = false; if( pObject ) { rURL = INetURLObject( ImplGetURL( pObject ) ); - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool GalleryTheme::InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsertPos ) +bool GalleryTheme::InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsertPos ) { Graphic aGraphic; OUString aFormat; SgaObject* pNewObj = NULL; const sal_uInt16 nImportRet = GalleryGraphicImport( rURL, aGraphic, aFormat ); - sal_Bool bRet = sal_False; + bool bRet = false; if( nImportRet != SGA_IMPORT_NONE ) { @@ -1117,18 +1117,18 @@ sal_Bool GalleryTheme::InsertURL( const INetURLObject& rURL, sal_uIntPtr nInsert pNewObj = (SgaObject*) new SgaObjectSound( rURL ); if( pNewObj && InsertObject( *pNewObj, nInsertPos ) ) - bRet = sal_True; + bRet = true; delete pNewObj; return bRet; } -sal_Bool GalleryTheme::InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, sal_uIntPtr nInsertPos ) +bool GalleryTheme::InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, sal_uIntPtr nInsertPos ) { INetURLObject aURL; ::std::vector< INetURLObject > aURLVector; - sal_Bool bRet = sal_False; + bool bRet = false; try { @@ -1173,9 +1173,9 @@ sal_Bool GalleryTheme::InsertFileOrDirURL( const INetURLObject& rFileOrDirURL, s return bRet; } -sal_Bool GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTransferable >& rxTransferable, sal_uIntPtr nInsertPos ) +bool GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::XTransferable >& rxTransferable, sal_uIntPtr nInsertPos ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( rxTransferable.is() ) { @@ -1241,7 +1241,7 @@ sal_Bool GalleryTheme::InsertTransferable( const uno::Reference< datatransfer::X if( pGraphic ) { - bRet = sal_False; + bRet = false; if( aDataHelper.HasFormat( SOT_FORMATSTR_ID_SVIM ) ) { @@ -1509,7 +1509,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) else rIStm.SetError( SVSTREAM_READ_ERROR ); - ImplSetModified( sal_False ); + ImplSetModified( false ); return rIStm; } @@ -1524,7 +1524,7 @@ SvStream& ReadGalleryTheme( SvStream& rIn, GalleryTheme& rTheme ) return rTheme.ReadData( rIn ); } -void GalleryTheme::ImplSetModified( sal_Bool bModified ) +void GalleryTheme::ImplSetModified( bool bModified ) { pThm->SetModified( bModified ); } const OUString& GalleryTheme::GetRealName() const { return pThm->GetThemeName(); } @@ -1532,11 +1532,11 @@ const INetURLObject& GalleryTheme::GetThmURL() const { return pThm->GetThmURL(); const INetURLObject& GalleryTheme::GetSdgURL() const { return pThm->GetSdgURL(); } const INetURLObject& GalleryTheme::GetSdvURL() const { return pThm->GetSdvURL(); } sal_uInt32 GalleryTheme::GetId() const { return pThm->GetId(); } -void GalleryTheme::SetId( sal_uInt32 nNewId, sal_Bool bResetThemeName ) { pThm->SetId( nNewId, bResetThemeName ); } -sal_Bool GalleryTheme::IsThemeNameFromResource() const { return pThm->IsNameFromResource(); } -sal_Bool GalleryTheme::IsReadOnly() const { return pThm->IsReadOnly(); } -sal_Bool GalleryTheme::IsDefault() const { return pThm->IsDefault(); } -sal_Bool GalleryTheme::IsModified() const { return pThm->IsModified(); } +void GalleryTheme::SetId( sal_uInt32 nNewId, bool bResetThemeName ) { pThm->SetId( nNewId, bResetThemeName ); } +bool GalleryTheme::IsThemeNameFromResource() const { return pThm->IsNameFromResource(); } +bool GalleryTheme::IsReadOnly() const { return pThm->IsReadOnly(); } +bool GalleryTheme::IsDefault() const { return pThm->IsDefault(); } +bool GalleryTheme::IsModified() const { return pThm->IsModified(); } const OUString& GalleryTheme::GetName() const { return pThm->GetThemeName(); } void GalleryTheme::InsertAllThemes( ListBox& rListBox ) -- cgit