diff options
author | Noel Grandin <noel@peralex.com> | 2014-04-17 11:16:55 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-04-17 11:17:21 +0200 |
commit | fee4efcb54c8162955f6fe626d9b68c3b74b3068 (patch) | |
tree | df8989eab6d8aacb5f37f0673a1a14eb5584a394 /dbaccess/source/ui/querydesign | |
parent | coverity#708633 Uninitialized pointer field (diff) | |
download | core-fee4efcb54c8162955f6fe626d9b68c3b74b3068.tar.gz core-fee4efcb54c8162955f6fe626d9b68c3b74b3068.zip |
dbaccess: sal_Bool->bool
Change-Id: Ieb52470f9638b74898954db3890aaf2cf202290a
Diffstat (limited to 'dbaccess/source/ui/querydesign')
33 files changed, 467 insertions, 467 deletions
diff --git a/dbaccess/source/ui/querydesign/ConnectionLine.cxx b/dbaccess/source/ui/querydesign/ConnectionLine.cxx index ec66d0411c23..53dad9a3d102 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLine.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLine.cxx @@ -204,14 +204,14 @@ void calcPointX2(const OTableWindow* _pWin,Point& _rNewConPos,Point& _rNewDescrP _rNewConPos.X() -= DESCRIPT_LINE_WIDTH; } -sal_Bool OConnectionLine::RecalcLine() +bool OConnectionLine::RecalcLine() { // Windows and entries must be set const OTableWindow* pSourceWin = m_pTabConn->GetSourceWin(); const OTableWindow* pDestWin = m_pTabConn->GetDestWin(); if( !pSourceWin || !pDestWin ) - return sal_False; + return false; SvTreeListEntry* pSourceEntry = pSourceWin->GetListBox()->GetEntryFromText( GetData()->GetSourceFieldName() ); SvTreeListEntry* pDestEntry = pDestWin->GetListBox()->GetEntryFromText( GetData()->GetDestFieldName() ); @@ -251,7 +251,7 @@ sal_Bool OConnectionLine::RecalcLine() // determine aDestConnPosY calcPointsYValue(pDestWin,pDestEntry,m_aDestConnPos,m_aDestDescrLinePos); - return sal_True; + return true; } void OConnectionLine::Draw( OutputDevice* pOutDev ) @@ -286,7 +286,7 @@ void OConnectionLine::Draw( OutputDevice* pOutDev ) pOutDev->DrawRect( calcRect( m_aDestDescrLinePos,aVector) ); } -sal_Bool OConnectionLine::IsValid() const +bool OConnectionLine::IsValid() const { return m_pData.is(); } diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx index 68ee428806de..5506c7fc0fd4 100644 --- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx +++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx @@ -106,7 +106,7 @@ namespace dbaui return this; } // XAccessibleComponent - sal_Bool SAL_CALL OConnectionLineAccess::contains( const awt::Point& _aPoint ) throw (RuntimeException) + bool SAL_CALL OConnectionLineAccess::contains( const awt::Point& _aPoint ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); Point aPoint(_aPoint.X,_aPoint.Y); @@ -140,18 +140,18 @@ namespace dbaui Size aSize(m_pLine ? m_pLine->GetBoundingRect().GetSize() : Size()); return awt::Size(aSize.Width(),aSize.Height()); } - sal_Bool SAL_CALL OConnectionLineAccess::isShowing( ) throw (RuntimeException) + bool SAL_CALL OConnectionLineAccess::isShowing( ) throw (RuntimeException) { ::osl::MutexGuard aGuard( m_aMutex ); return m_pLine ? m_pLine->GetParent()->GetWindowRegionPixel().IsInside(m_pLine->GetBoundingRect()) : sal_False; } - sal_Bool SAL_CALL OConnectionLineAccess::isVisible( ) throw (RuntimeException) + bool SAL_CALL OConnectionLineAccess::isVisible( ) throw (RuntimeException) { - return sal_True; + return true; } - sal_Bool SAL_CALL OConnectionLineAccess::isFocusTraversable( ) throw (RuntimeException) + bool SAL_CALL OConnectionLineAccess::isFocusTraversable( ) throw (RuntimeException) { - return sal_True; + return true; } // XAccessibleRelationSet sal_Int32 SAL_CALL OConnectionLineAccess::getRelationCount( ) throw (RuntimeException, std::exception) @@ -192,7 +192,7 @@ namespace dbaui // clear vector clearLineData(); } - sal_Bool OConnectionLineAccess::isEditable() const + bool OConnectionLineAccess::isEditable() const { return m_pLine ? !m_pLine->GetParent()->getDesignView()->getController().isReadOnly() : sal_False; diff --git a/dbaccess/source/ui/querydesign/JAccess.cxx b/dbaccess/source/ui/querydesign/JAccess.cxx index d2adb80ed163..7d0b8adbc10d 100644 --- a/dbaccess/source/ui/querydesign/JAccess.cxx +++ b/dbaccess/source/ui/querydesign/JAccess.cxx @@ -83,7 +83,7 @@ namespace dbaui throw IndexOutOfBoundsException(); return aRet; } - sal_Bool OJoinDesignViewAccess::isEditable() const + bool OJoinDesignViewAccess::isEditable() const { return m_pTableView && !m_pTableView->getDesignView()->getController().isReadOnly(); } diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx index d442baae4587..c80ad3fbd40e 100644 --- a/dbaccess/source/ui/querydesign/JoinController.cxx +++ b/dbaccess/source/ui/querydesign/JoinController.cxx @@ -124,7 +124,7 @@ bool AddTableDialogContext::allowAddition() const void AddTableDialogContext::addTableWindow( const OUString& _rQualifiedTableName, const OUString& _rAliasName ) { - getTableView()->AddTabWin( _rQualifiedTableName, _rAliasName, sal_True ); + getTableView()->AddTabWin( _rQualifiedTableName, _rAliasName, true ); } void AddTableDialogContext::onWindowClosing( const Window* _pWindow ) @@ -334,7 +334,7 @@ sal_Bool SAL_CALL OJoinController::suspend(sal_Bool _bSuspend) throw( RuntimeExc ::osl::MutexGuard aGuard( getMutex() ); if ( getView() && getView()->IsInModalMode() ) return sal_False; - sal_Bool bCheck = sal_True; + bool bCheck = true; if ( _bSuspend ) { bCheck = saveModified() != RET_CANCEL; @@ -371,7 +371,7 @@ void OJoinController::loadTableWindow( const ::comphelper::NamedValueCollection& sal_Int32 nX = -1, nY = -1, nHeight = -1, nWidth = -1; OUString sComposedName,sTableName,sWindowName; - sal_Bool bShowAll = false; + bool bShowAll = false; sComposedName = i_rTableWindowSettings.getOrDefault( "ComposedName", sComposedName ); sTableName = i_rTableWindowSettings.getOrDefault( "TableName", sTableName ); diff --git a/dbaccess/source/ui/querydesign/JoinExchange.cxx b/dbaccess/source/ui/querydesign/JoinExchange.cxx index 4488c5346e8f..12b5dcdaa01a 100644 --- a/dbaccess/source/ui/querydesign/JoinExchange.cxx +++ b/dbaccess/source/ui/querydesign/JoinExchange.cxx @@ -31,7 +31,7 @@ namespace dbaui OUString OJoinExchObj::m_sJoinFormat; // class OJoinExchObj - OJoinExchObj::OJoinExchObj(const OJoinExchangeData& jxdSource,sal_Bool _bFirstEntry) + OJoinExchObj::OJoinExchObj(const OJoinExchangeData& jxdSource,bool _bFirstEntry) :m_bFirstEntry(_bFirstEntry) ,m_jxdSourceDescription(jxdSource) ,m_pDragListener(NULL) @@ -56,7 +56,7 @@ namespace dbaui m_pDragListener = NULL; } - sal_Bool OJoinExchObj::isFormatAvailable( const DataFlavorExVector& _rFormats ,SotFormatStringId _nSlotID) + bool OJoinExchObj::isFormatAvailable( const DataFlavorExVector& _rFormats ,SotFormatStringId _nSlotID) { DataFlavorExVector::const_iterator aCheckEnd = _rFormats.end(); for ( DataFlavorExVector::const_iterator aCheck = _rFormats.begin(); @@ -65,9 +65,9 @@ namespace dbaui ) { if ( _nSlotID == aCheck->mnSotId ) - return sal_True; + return true; } - return sal_False; + return false; } OJoinExchangeData OJoinExchObj::GetSourceDescription(const Reference< XTransferable >& _rxObject) diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 66c6b0ef4662..c29d55a393d8 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -160,7 +160,7 @@ OJoinTableView::OJoinTableView( Window* pParent, OJoinDesignView* pView ) ,m_pDragWin( NULL ) ,m_pSizingWin( NULL ) ,m_pSelectedConn( NULL ) - ,m_bTrackingInitiallyMoved(sal_False) + ,m_bTrackingInitiallyMoved(false) ,m_pLastFocusTabWin(NULL) ,m_pView( pView ) ,m_pAccessible(NULL) @@ -186,7 +186,7 @@ OJoinTableView::~OJoinTableView() IMPL_LINK( OJoinTableView, ScrollHdl, ScrollBar*, pScrollBar ) { // move all windows - ScrollPane( pScrollBar->GetDelta(), (pScrollBar == GetHScrollBar()), sal_False ); + ScrollPane( pScrollBar->GetDelta(), (pScrollBar == GetHScrollBar()), false ); return 0; } @@ -301,7 +301,7 @@ OTableWindowData* OJoinTableView::CreateImpl(const OUString& _rComposedName return new OTableWindowData( NULL,_rComposedName,_sTableName, _rWinName ); } -void OJoinTableView::AddTabWin(const OUString& _rComposedName, const OUString& rWinName, sal_Bool /*bNewTable*/) +void OJoinTableView::AddTabWin(const OUString& _rComposedName, const OUString& rWinName, bool /*bNewTable*/) { OSL_ENSURE(!_rComposedName.isEmpty(),"There must be a table name supplied!"); @@ -392,7 +392,7 @@ void OJoinTableView::RemoveTabWin( OTableWindow* pTabWin ) namespace { - sal_Bool isScrollAllowed( OJoinTableView* _pView,long nDelta, sal_Bool bHoriz) + bool isScrollAllowed( OJoinTableView* _pView,long nDelta, bool bHoriz) { // adjust ScrollBar-Positions ScrollBar* pBar = _pView->GetVScrollBar(); @@ -409,14 +409,14 @@ namespace if ( bHoriz ) { if( nNewThumbPos == _pView->GetScrollOffset().X() ) - return sal_False; + return false; } else if ( nNewThumbPos == _pView->GetScrollOffset().Y() ) - return sal_False; + return false; - return sal_True; + return true; } - sal_Bool getMovementImpl(OJoinTableView* _pView,const Point& _rPoint,const Size& _rSize,long& _nScrollX,long& _nScrollY) + bool getMovementImpl(OJoinTableView* _pView,const Point& _rPoint,const Size& _rSize,long& _nScrollX,long& _nScrollY) { _nScrollY = _nScrollX = 0; // data about the tab win @@ -428,9 +428,9 @@ namespace // data about ourself Size aSize = _pView->getRealOutputSize(); //GetOutputSizePixel(); - sal_Bool bVisbile = sal_True; - sal_Bool bFitsHor = (aUpperLeft.X() >= 0) && (aLowerRight.X() <= aSize.Width()); - sal_Bool bFitsVert= (aUpperLeft.Y() >= 0) && (aLowerRight.Y() <= aSize.Height()); + bool bVisbile = true; + bool bFitsHor = (aUpperLeft.X() >= 0) && (aLowerRight.X() <= aSize.Width()); + bool bFitsVert= (aUpperLeft.Y() >= 0) && (aLowerRight.Y() <= aSize.Height()); if (!bFitsHor || !bFitsVert) { if (!bFitsHor) @@ -455,10 +455,10 @@ namespace } if ( _nScrollX ) // aSize.Width() > _rSize.Width() && - bVisbile = isScrollAllowed(_pView,_nScrollX, sal_True); + bVisbile = isScrollAllowed(_pView,_nScrollX, true); if ( _nScrollY ) // aSize.Height() > _rSize.Height() && - bVisbile = bVisbile && isScrollAllowed(_pView,_nScrollY, sal_False); + bVisbile = bVisbile && isScrollAllowed(_pView,_nScrollY, false); if ( bVisbile ) { @@ -466,9 +466,9 @@ namespace sal_Int32 nVRangeMax = _pView->GetVScrollBar()->GetRangeMax(); if ( aSize.Width() + _pView->GetHScrollBar()->GetThumbPos() + _nScrollX > nHRangeMax ) - bVisbile = sal_False; + bVisbile = false; if ( bVisbile && aSize.Height() + _pView->GetVScrollBar()->GetThumbPos() + _nScrollY > nVRangeMax ) - bVisbile = sal_False; + bVisbile = false; } } @@ -476,7 +476,7 @@ namespace } } // end of ano namespace -sal_Bool OJoinTableView::isMovementAllowed(const Point& _rPoint,const Size& _rSize) +bool OJoinTableView::isMovementAllowed(const Point& _rPoint,const Size& _rSize) { long nX,nY; return getMovementImpl(this,_rPoint,_rSize,nX,nY); @@ -496,12 +496,12 @@ void OJoinTableView::EnsureVisible(const Point& _rPoint,const Size& _rSize) if ( getMovementImpl(this,_rPoint,_rSize,nScrollX,nScrollY) ) { - sal_Bool bVisbile = sal_True; + bool bVisbile = true; if (nScrollX) - bVisbile = ScrollPane(nScrollX, sal_True, sal_True); + bVisbile = ScrollPane(nScrollX, true, true); if (nScrollY) - bVisbile = bVisbile && ScrollPane(nScrollY, sal_False, sal_True); + bVisbile = bVisbile && ScrollPane(nScrollY, false, true); } } @@ -514,7 +514,7 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin ) Size aOutSize = GetSizePixel(); Point aNewPos( 0,0 ); sal_uInt16 nRow = 0; - sal_Bool bEnd = sal_False; + bool bEnd = false; while( !bEnd ) { // Set new position to start of line @@ -550,7 +550,7 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin ) if( (aNewPos.X()+TABWIN_WIDTH_STD)<aRowRect.Right() ) { aNewPos.Y() = aRowRect.Top() + TABWIN_SPACING_Y; - bEnd = sal_True; + bEnd = true; } else { @@ -560,7 +560,7 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin ) sal_Int32 nCount = m_aTableMap.size() % (nRow+1); ++nCount; aNewPos.Y() = nCount * TABWIN_SPACING_Y + (nCount-1)*CalcZoom(TABWIN_HEIGHT_STD); - bEnd = sal_True; + bEnd = true; } else nRow++; @@ -613,7 +613,7 @@ void OJoinTableView::BeginChildMove( OTableWindow* pTabWin, const Point& rMouseP Point aMousePos = ScreenToOutputPixel( rMousePos ); m_aDragOffset = aMousePos - pTabWin->GetPosPixel(); m_pDragWin->SetZOrder(NULL, WINDOW_ZORDER_FIRST); - m_bTrackingInitiallyMoved = sal_False; + m_bTrackingInitiallyMoved = false; StartTracking(); } @@ -634,9 +634,9 @@ void OJoinTableView::BeginChildSizing( OTableWindow* pTabWin, const Pointer& rPo StartTracking(); } -sal_Bool OJoinTableView::ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPaintScrollBars ) +bool OJoinTableView::ScrollPane( long nDelta, bool bHoriz, bool bPaintScrollBars ) { - sal_Bool bRet = sal_True; + bool bRet = true; // adjust ScrollBar-Positions if( bPaintScrollBars ) @@ -648,12 +648,12 @@ sal_Bool OJoinTableView::ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPai if( nNewThumbPos < 0 ) { nNewThumbPos = 0; - bRet = sal_False; + bRet = false; } if( nNewThumbPos > GetHScrollBar()->GetRange().Max() ) { nNewThumbPos = GetHScrollBar()->GetRange().Max(); - bRet = sal_False; + bRet = false; } GetHScrollBar()->SetThumbPos( nNewThumbPos ); nDelta = GetHScrollBar()->GetThumbPos() - nOldThumbPos; @@ -665,12 +665,12 @@ sal_Bool OJoinTableView::ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPai if( nNewThumbPos < 0 ) { nNewThumbPos = 0; - bRet = sal_False; + bRet = false; } if( nNewThumbPos > GetVScrollBar()->GetRange().Max() ) { nNewThumbPos = GetVScrollBar()->GetRange().Max(); - bRet = sal_False; + bRet = false; } GetVScrollBar()->SetThumbPos( nNewThumbPos ); nDelta = GetVScrollBar()->GetThumbPos() - nOldThumbPos; @@ -680,7 +680,7 @@ sal_Bool OJoinTableView::ScrollPane( long nDelta, sal_Bool bHoriz, sal_Bool bPai // If ScrollOffset hitting borders, no redrawing. if( (GetHScrollBar()->GetThumbPos()==m_aScrollOffset.X()) && (GetVScrollBar()->GetThumbPos()==m_aScrollOffset.Y()) ) - return sal_False; + return false; // set ScrollOffset anew if (bHoriz) @@ -841,8 +841,8 @@ void OJoinTableView::MouseButtonUp( const MouseEvent& rEvt ) void OJoinTableView::KeyInput( const KeyEvent& rEvt ) { sal_uInt16 nCode = rEvt.GetKeyCode().GetCode(); - sal_Bool bShift = rEvt.GetKeyCode().IsShift(); - sal_Bool bCtrl = rEvt.GetKeyCode().IsMod1(); + bool bShift = rEvt.GetKeyCode().IsShift(); + bool bCtrl = rEvt.GetKeyCode().IsMod1(); if( !bCtrl && !bShift && (nCode==KEY_DELETE) ) { @@ -960,7 +960,7 @@ sal_Int32 OJoinTableView::getConnectionCount(const OTableWindow* _pFromWin) cons ::std::bind2nd(::std::mem_fun(&OTableConnection::isTableConnection),_pFromWin)); } -sal_Bool OJoinTableView::ExistsAConn(const OTableWindow* pFrom) const +bool OJoinTableView::ExistsAConn(const OTableWindow* pFrom) const { return getTableConnections(pFrom) != m_vTableConnection.end(); } @@ -982,12 +982,12 @@ void OJoinTableView::ClearAll() m_pSelectedConn = NULL; // scroll to the upper left - ScrollPane(-GetScrollOffset().X(), sal_True, sal_True); - ScrollPane(-GetScrollOffset().Y(), sal_False, sal_True); + ScrollPane(-GetScrollOffset().X(), true, true); + ScrollPane(-GetScrollOffset().Y(), false, true); Invalidate(); } -sal_Bool OJoinTableView::ScrollWhileDragging() +bool OJoinTableView::ScrollWhileDragging() { OSL_ENSURE(m_pDragWin != NULL, "OJoinTableView::ScrollWhileDragging must not be called when a window is being dragged !"); @@ -1000,19 +1000,19 @@ sal_Bool OJoinTableView::ScrollWhileDragging() Point aLowerRight(aDragWinPos.X() + aDragWinSize.Width(), aDragWinPos.Y() + aDragWinSize.Height()); if (!m_bTrackingInitiallyMoved && (aDragWinPos == m_pDragWin->GetPosPixel())) - return sal_True; + return true; // avoid illustration errors (when scrolling with active TrackingRect) HideTracking(); - sal_Bool bScrolling = sal_False; - sal_Bool bNeedScrollTimer = sal_False; + bool bScrolling = false; + bool bNeedScrollTimer = false; // scroll at window borders // TODO : only catch, if window would disappear completely (don't, if there is still a pixel visible) if( aDragWinPos.X() < 5 ) { - bScrolling = ScrollPane( -LINE_SIZE, sal_True, sal_True ); + bScrolling = ScrollPane( -LINE_SIZE, true, true ); if( !bScrolling && (aDragWinPos.X()<0) ) aDragWinPos.X() = 0; @@ -1022,7 +1022,7 @@ sal_Bool OJoinTableView::ScrollWhileDragging() if( aLowerRight.X() > m_aOutputSize.Width() - 5 ) { - bScrolling = ScrollPane( LINE_SIZE, sal_True, sal_True ) ; + bScrolling = ScrollPane( LINE_SIZE, true, true ) ; if( !bScrolling && ( aLowerRight.X() > m_aOutputSize.Width() ) ) aDragWinPos.X() = m_aOutputSize.Width() - aDragWinSize.Width(); @@ -1032,7 +1032,7 @@ sal_Bool OJoinTableView::ScrollWhileDragging() if( aDragWinPos.Y() < 5 ) { - bScrolling = ScrollPane( -LINE_SIZE, sal_False, sal_True ); + bScrolling = ScrollPane( -LINE_SIZE, false, true ); if( !bScrolling && (aDragWinPos.Y()<0) ) aDragWinPos.Y() = 0; @@ -1041,7 +1041,7 @@ sal_Bool OJoinTableView::ScrollWhileDragging() if( aLowerRight.Y() > m_aOutputSize.Height() - 5 ) { - bScrolling = ScrollPane( LINE_SIZE, sal_False, sal_True ); + bScrolling = ScrollPane( LINE_SIZE, false, true ); if( !bScrolling && ( (aDragWinPos.Y() + aDragWinSize.Height()) > m_aOutputSize.Height() ) ) aDragWinPos.Y() = m_aOutputSize.Height() - aDragWinSize.Height(); @@ -1091,31 +1091,31 @@ void OJoinTableView::TabWinSized(OTableWindow* ptWhich, const Point& ptOldPositi invalidateAndModify(new OJoinSizeTabWinUndoAct(this, ptOldPosition, szOldSize, ptWhich)); } -sal_Bool OJoinTableView::IsAddAllowed() +bool OJoinTableView::IsAddAllowed() { // not, if Db readonly if (m_pView->getController().isReadOnly()) - return sal_False; + return false; try { Reference< XConnection> xConnection = m_pView->getController().getConnection(); if(!xConnection.is()) - return sal_False; + return false; // not, if too many tables already Reference < XDatabaseMetaData > xMetaData( xConnection->getMetaData() ); sal_Int32 nMax = xMetaData.is() ? xMetaData->getMaxTablesInSelect() : 0; if (nMax && nMax <= (sal_Int32)m_aTableMap.size()) - return sal_False; + return false; } catch(SQLException&) { - return sal_False; + return false; } - return sal_True; + return true; } void OJoinTableView::executePopup(const Point& _aPos,OTableConnection* _pSelConnection) @@ -1135,7 +1135,7 @@ void OJoinTableView::executePopup(const Point& _aPos,OTableConnection* _pSelConn void OJoinTableView::Command(const CommandEvent& rEvt) { - sal_Bool bHandled = sal_False; + bool bHandled = false; switch (rEvt.GetCommand()) { @@ -1174,7 +1174,7 @@ void OJoinTableView::Command(const CommandEvent& rEvt) } } } - bHandled = sal_True; + bHandled = true; } } if (!bHandled) @@ -1189,7 +1189,7 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab if ((!pLhs || pLhs->ExistsAConn()) && (!pRhs || pRhs->ExistsAConn())) { - sal_Bool bFoundStart = _rpFirstAfter ? sal_False : sal_True; + bool bFoundStart = _rpFirstAfter ? sal_False : sal_True; ::std::vector<OTableConnection*>::const_iterator aIter = m_vTableConnection.begin(); ::std::vector<OTableConnection*>::const_iterator aEnd = m_vTableConnection.end(); @@ -1226,7 +1226,7 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab pConn = pData; if (pData == _rpFirstAfter) - bFoundStart = sal_True; + bFoundStart = true; } } } @@ -1235,7 +1235,7 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab bool OJoinTableView::PreNotify(NotifyEvent& rNEvt) { - sal_Bool bHandled = sal_False; + bool bHandled = false; switch (rNEvt.GetType()) { case EVENT_COMMAND: @@ -1247,10 +1247,10 @@ bool OJoinTableView::PreNotify(NotifyEvent& rNEvt) if (pData->GetMode() == COMMAND_WHEEL_SCROLL) { if (pData->GetDelta() > 0) - ScrollPane(-10 * pData->GetScrollLines(), pData->IsHorz(), sal_True); + ScrollPane(-10 * pData->GetScrollLines(), pData->IsHorz(), true); else - ScrollPane(10 * pData->GetScrollLines(), pData->IsHorz(), sal_True); - bHandled = sal_True; + ScrollPane(10 * pData->GetScrollLines(), pData->IsHorz(), true); + bHandled = true; } } } @@ -1271,7 +1271,7 @@ bool OJoinTableView::PreNotify(NotifyEvent& rNEvt) if (!HasChildPathFocus()) break; - sal_Bool bForward = !pKeyEvent->GetKeyCode().IsShift(); + bool bForward = !pKeyEvent->GetKeyCode().IsShift(); // is there an active tab win ? OTableWindowMap::iterator aIter = m_aTableMap.begin(); OTableWindowMap::iterator aEnd = m_aTableMap.end(); @@ -1566,7 +1566,7 @@ void OJoinTableView::modified() rController.InvalidateFeature(SID_RELATION_ADD_RELATION); } -void OJoinTableView::addConnection(OTableConnection* _pConnection,sal_Bool _bAddData) +void OJoinTableView::addConnection(OTableConnection* _pConnection,bool _bAddData) { if ( _bAddData ) { diff --git a/dbaccess/source/ui/querydesign/QTableConnection.cxx b/dbaccess/source/ui/querydesign/QTableConnection.cxx index 0663bb683c1c..2789e7bc11aa 100644 --- a/dbaccess/source/ui/querydesign/QTableConnection.cxx +++ b/dbaccess/source/ui/querydesign/QTableConnection.cxx @@ -26,13 +26,13 @@ using namespace dbaui; OQueryTableConnection::OQueryTableConnection(OQueryTableView* pContainer, const TTableConnectionData::value_type& pTabConnData) : OTableConnection(pContainer, pTabConnData) - , m_bVisited(sal_False) + , m_bVisited(false) { } OQueryTableConnection::OQueryTableConnection(const OQueryTableConnection& rConn) : OTableConnection( rConn ) - , m_bVisited(sal_False) + , m_bVisited(false) { // no own members, so base class functionality is sufficient } @@ -51,7 +51,7 @@ OQueryTableConnection& OQueryTableConnection::operator=(const OQueryTableConnect return *this; } -sal_Bool OQueryTableConnection::operator==(const OQueryTableConnection& rCompare) +bool OQueryTableConnection::operator==(const OQueryTableConnection& rCompare) { OSL_ENSURE(GetData() && rCompare.GetData(), "OQueryTableConnection::operator== : one of the two participants has no data!"); diff --git a/dbaccess/source/ui/querydesign/QTableConnection.hxx b/dbaccess/source/ui/querydesign/QTableConnection.hxx index 7c411bf74899..414b805346e3 100644 --- a/dbaccess/source/ui/querydesign/QTableConnection.hxx +++ b/dbaccess/source/ui/querydesign/QTableConnection.hxx @@ -28,19 +28,19 @@ namespace dbaui class OQueryTableView; class OQueryTableConnection : public OTableConnection { - sal_Bool m_bVisited; // is true if the conn was already visited through the join algorithm + bool m_bVisited; // is true if the conn was already visited through the join algorithm public: OQueryTableConnection(OQueryTableView* pContainer, const TTableConnectionData::value_type& pTabConnData); OQueryTableConnection(const OQueryTableConnection& rConn); virtual ~OQueryTableConnection(); OQueryTableConnection& operator=(const OQueryTableConnection& rConn); - sal_Bool operator==(const OQueryTableConnection& rCompare); + bool operator==(const OQueryTableConnection& rCompare); inline OUString GetAliasName(EConnectionSide nWhich) const { return static_cast<OQueryTableConnectionData*>(GetData().get())->GetAliasName(nWhich); } - inline sal_Bool IsVisited() const { return m_bVisited; } - inline void SetVisited(sal_Bool bVisited) { m_bVisited = bVisited; } + inline bool IsVisited() const { return m_bVisited; } + inline void SetVisited(bool bVisited) { m_bVisited = bVisited; } }; } diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx index 5167d8a7a38e..b10952367c30 100644 --- a/dbaccess/source/ui/querydesign/QTableConnectionData.cxx +++ b/dbaccess/source/ui/querydesign/QTableConnectionData.cxx @@ -129,9 +129,9 @@ OTableConnectionData* OQueryTableConnectionData::NewInstance() const return new OQueryTableConnectionData(); } -sal_Bool OQueryTableConnectionData::Update() +bool OQueryTableConnectionData::Update() { - return sal_True; + return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QTableConnectionData.hxx b/dbaccess/source/ui/querydesign/QTableConnectionData.hxx index 82db653f4e16..c511649bf2f4 100644 --- a/dbaccess/source/ui/querydesign/QTableConnectionData.hxx +++ b/dbaccess/source/ui/querydesign/QTableConnectionData.hxx @@ -57,7 +57,7 @@ namespace dbaui @return true if successful */ - virtual sal_Bool Update() SAL_OVERRIDE; + virtual bool Update() SAL_OVERRIDE; OUString GetAliasName(EConnectionSide nWhich) const; diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx index eec944ee77c3..0c0037a79b2d 100644 --- a/dbaccess/source/ui/querydesign/QTableWindow.cxx +++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx @@ -70,9 +70,9 @@ OQueryTableWindow::~OQueryTableWindow() { } -sal_Bool OQueryTableWindow::Init() +bool OQueryTableWindow::Init() { - sal_Bool bSuccess = OTableWindow::Init(); + bool bSuccess = OTableWindow::Init(); if(!bSuccess) return bSuccess; @@ -89,7 +89,7 @@ sal_Bool OQueryTableWindow::Init() else if ( GetTable().is() ) GetTable()->getPropertyValue( PROPERTY_NAME ) >>= sAliasName; else - return sal_False; + return false; // Alias with successive number if (pContainer->CountTableAlias(sAliasName, m_nAliasNum)) @@ -164,12 +164,12 @@ void OQueryTableWindow::OnEntryDoubleClicked(SvTreeListEntry* pEntry) static_cast<OQueryTableView*>(getTableView())->InsertField(aInfo); } -sal_Bool OQueryTableWindow::ExistsField(const OUString& strFieldName, OTableFieldDescRef& rInfo) +bool OQueryTableWindow::ExistsField(const OUString& strFieldName, OTableFieldDescRef& rInfo) { OSL_ENSURE(m_pListBox != NULL, "OQueryTableWindow::ExistsField : doesn't have ::com::sun::star::form::ListBox !"); OSL_ENSURE(rInfo.is(),"OQueryTableWindow::ExistsField: invalid argument for OTableFieldDescRef!"); Reference< XConnection> xConnection = getTableView()->getDesignView()->getController().getConnection(); - sal_Bool bExists = sal_False; + bool bExists = false; if(xConnection.is()) { SvTreeListEntry* pEntry = m_pListBox->First(); @@ -191,7 +191,7 @@ sal_Bool OQueryTableWindow::ExistsField(const OUString& strFieldName, OTableFiel rInfo->SetAlias(GetAliasName()); rInfo->SetFieldIndex(m_pListBox->GetModel()->GetAbsPos(pEntry)); rInfo->SetDataType(pInf->GetDataType()); - bExists = sal_True; + bExists = true; break; } pEntry = m_pListBox->Next(pEntry); @@ -205,7 +205,7 @@ sal_Bool OQueryTableWindow::ExistsField(const OUString& strFieldName, OTableFiel return bExists; } -sal_Bool OQueryTableWindow::ExistsAVisitedConn() const +bool OQueryTableWindow::ExistsAVisitedConn() const { return static_cast<const OQueryTableView*>(getTableView())->ExistsAVisitedConn(this); } diff --git a/dbaccess/source/ui/querydesign/QTableWindow.hxx b/dbaccess/source/ui/querydesign/QTableWindow.hxx index 5b33fcf0f3bd..e1b2d4b38cbd 100644 --- a/dbaccess/source/ui/querydesign/QTableWindow.hxx +++ b/dbaccess/source/ui/querydesign/QTableWindow.hxx @@ -44,12 +44,12 @@ namespace dbaui } // late Constructor, the base class CREATES Listbox on first call - virtual sal_Bool Init() SAL_OVERRIDE; + virtual bool Init() SAL_OVERRIDE; - inline sal_Int32 GetAliasNum() const { return m_nAliasNum; } + inline sal_Int32 GetAliasNum() const { return m_nAliasNum; } - sal_Bool ExistsField(const OUString& strFieldName, OTableFieldDescRef& rInfo); - sal_Bool ExistsAVisitedConn() const; + bool ExistsField(const OUString& strFieldName, OTableFieldDescRef& rInfo); + bool ExistsAVisitedConn() const; virtual OUString GetName() const SAL_OVERRIDE { return GetWinName(); } diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index c31239990d9c..1bfb73cddd1a 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -74,7 +74,7 @@ namespace static const OUString C_OR(" OR "); // forward declarations - sal_Bool InsertJoin( const OQueryDesignView* _pView, + bool InsertJoin( const OQueryDesignView* _pView, const ::connectivity::OSQLParseNode *pNode); SqlParseError InstallFields(OQueryDesignView* _pView, @@ -98,10 +98,10 @@ namespace OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, const sal_uInt16 nLevel, - sal_Bool bHaving, + bool bHaving, bool _bAddOrOnOneLine); - OUString quoteTableAlias(sal_Bool _bQuote, const OUString& _sAliasName, const OUString& _sQuote) + OUString quoteTableAlias(bool _bQuote, const OUString& _sAliasName, const OUString& _sQuote) { OUString sRet; if ( _bQuote && !_sAliasName.isEmpty() ) @@ -211,7 +211,7 @@ namespace { SqlParseError eErrorCode = eOk; sal_uInt32 nCount = pTableRefList->count(); - sal_Bool bError = sal_False; + bool bError = false; for (sal_uInt32 i=0; !bError && i < nCount; ++i) { const ::connectivity::OSQLParseNode* pParseNode = pTableRefList->getChild(i); @@ -226,7 +226,7 @@ namespace if ( pJoinNode ) { if ( !InsertJoin(_pView,pJoinNode) ) - bError = sal_True; + bError = true; } } // check if error occurred @@ -244,7 +244,7 @@ namespace { SqlParseError eErrorCode = eOk; - sal_Bool bErg = sal_False; + bool bErg = false; OUString aTableRange,aColumnName; sal_uInt16 nCntAccount; @@ -302,10 +302,10 @@ namespace OConnectionLineDataRef pLineData = *aIter; if(!aCondition.isEmpty()) aCondition.append(C_AND); - aCondition.append(quoteTableAlias(sal_True,pData->GetAliasName(JTCS_FROM),aQuote)); + aCondition.append(quoteTableAlias(true,pData->GetAliasName(JTCS_FROM),aQuote)); aCondition.append(::dbtools::quoteName(aQuote, pLineData->GetFieldName(JTCS_FROM) )); aCondition.append(sEqual); - aCondition.append(quoteTableAlias(sal_True,pData->GetAliasName(JTCS_TO),aQuote)); + aCondition.append(quoteTableAlias(true,pData->GetAliasName(JTCS_TO),aQuote)); aCondition.append(::dbtools::quoteName(aQuote, pLineData->GetFieldName(JTCS_TO) )); } } @@ -333,16 +333,16 @@ namespace OQueryTableConnectionData* pData = static_cast< OQueryTableConnectionData*>(_pEntryConn->GetData().get()); if ( pData->GetJoinType() != INNER_JOIN && _pEntryTabTo->ExistsAVisitedConn() ) { - sal_Bool bBrace = sal_False; + bool bBrace = false; if(_rJoin.endsWith(")")) { - bBrace = sal_True; + bBrace = true; _rJoin = _rJoin.replaceAt(_rJoin.getLength()-1,1,OUString(' ')); } (_rJoin += C_AND) += BuildJoinCriteria(_xConnection,pData->GetConnLineDataList(),pData); if(bBrace) _rJoin += ")"; - _pEntryConn->SetVisited(sal_True); + _pEntryConn->SetVisited(true); } } OUString BuildTable( const Reference< XConnection>& _xConnection, @@ -505,7 +505,7 @@ namespace aJoin = BuildJoin(_xConnection,pEntryTabTo,aJoin,pEntryConnData); } - pEntryConn->SetVisited(sal_True); + pEntryConn->SetVisited(true); // first search for the "to" window const ::std::vector<OTableConnection*>* pConnections = pEntryConn->GetParent()->getTableConnections(); @@ -599,14 +599,14 @@ namespace eErrorCode = eIllegalJoin; return eErrorCode; } - sal_Bool GetInnerJoinCriteria( const OQueryDesignView* _pView, + bool GetInnerJoinCriteria( const OQueryDesignView* _pView, const ::connectivity::OSQLParseNode *pCondition) { return InsertJoinConnection(_pView,pCondition, INNER_JOIN,NULL,NULL) != eOk; } OUString GenerateSelectList( const OQueryDesignView* _pView, OTableFields& _rFieldList, - sal_Bool bAlias) + bool bAlias) { Reference< XConnection> xConnection = static_cast<OQueryController&>(_pView->getController()).getConnection(); if ( !xConnection.is() ) @@ -614,7 +614,7 @@ namespace OUStringBuffer aTmpStr,aFieldListStr; - sal_Bool bAsterisk = sal_False; + bool bAsterisk = false; int nVis = 0; OTableFields::iterator aIter = _rFieldList.begin(); OTableFields::iterator aEnd = _rFieldList.end(); @@ -624,12 +624,12 @@ namespace if ( pEntryField->IsVisible() ) { if ( pEntryField->GetField().toChar() == '*' ) - bAsterisk = sal_True; + bAsterisk = true; ++nVis; } } if(nVis == 1) - bAsterisk = sal_False; + bAsterisk = false; try { @@ -662,7 +662,7 @@ namespace OTableFieldDescRef aInfo = new OTableFieldDesc(); OJoinTableView::OTableWindowMap::iterator tableIter = pTabList->begin(); OJoinTableView::OTableWindowMap::iterator tableEnd = pTabList->end(); - sal_Bool bFound = sal_False; + bool bFound = false; for(;!bFound && tableIter != tableEnd ;++tableIter) { OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(tableIter->second); @@ -713,14 +713,14 @@ namespace } return aFieldListStr.makeStringAndClear(); } - sal_Bool GenerateCriterias( OQueryDesignView* _pView, + bool GenerateCriterias( OQueryDesignView* _pView, OUStringBuffer& rRetStr, OUStringBuffer& rHavingStr, OTableFields& _rFieldList, - sal_Bool bMulti ) + bool bMulti ) { // * must not contain a filter : have I already shown the correct warning ? - sal_Bool bCritsOnAsterikWarning = sal_False; // ** TMFS ** + bool bCritsOnAsterikWarning = false; // ** TMFS ** OUString aFieldName,aCriteria,aWhereStr,aHavingStr,aWork/*,aOrderStr*/; // print line by line joined with AND @@ -733,7 +733,7 @@ namespace } Reference< XConnection> xConnection = static_cast<OQueryController&>(_pView->getController()).getConnection(); if(!xConnection.is()) - return sal_False; + return false; try { const Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData(); @@ -760,7 +760,7 @@ namespace // only show the messagebox the first time if (!bCritsOnAsterikWarning) ErrorBox(_pView, ModuleRes( ERR_QRY_CRITERIA_ON_ASTERISK)).Execute(); - bCritsOnAsterikWarning = sal_True; + bCritsOnAsterikWarning = true; continue; } aWork = quoteTableAlias(bMulti,pEntryField->GetAlias(),aQuote); @@ -880,11 +880,11 @@ namespace { OSL_FAIL("Failure while building where clause!"); } - return sal_True; + return true; } SqlParseError GenerateOrder( OQueryDesignView* _pView, OTableFields& _rFieldList, - sal_Bool bMulti, + bool bMulti, OUString& _rsRet) { const OQueryController& rController = static_cast<OQueryController&>(_pView->getController()); @@ -902,7 +902,7 @@ namespace Reference< XDatabaseMetaData > xMetaData = xConnection->getMetaData(); OUString aQuote = xMetaData->getIdentifierQuoteString(); // * must not containa filter - have I already shown the warning? - sal_Bool bCritsOnAsterikWarning = sal_False; // ** TMFS ** + bool bCritsOnAsterikWarning = false; // ** TMFS ** OTableFields::iterator aIter = _rFieldList.begin(); OTableFields::iterator aEnd = _rFieldList.end(); for(;aIter != aEnd;++aIter) @@ -919,7 +919,7 @@ namespace // only show the MessageBox the first time if (!bCritsOnAsterikWarning) ErrorBox(_pView, ModuleRes( ERR_QRY_ORDERBY_ON_ASTERISK)).Execute(); - bCritsOnAsterikWarning = sal_True; + bCritsOnAsterikWarning = true; continue; } @@ -1032,7 +1032,7 @@ namespace ::std::map<OTableWindow*,sal_Int32> aConnectionCount; for(;aIter != aEnd;++aIter) { - static_cast<OQueryTableConnection*>(*aIter)->SetVisited(sal_False); + static_cast<OQueryTableConnection*>(*aIter)->SetVisited(false); ++aConnectionCount[(*aIter)->GetSourceWin()]; ++aConnectionCount[(*aIter)->GetDestWin()]; } @@ -1044,7 +1044,7 @@ namespace aMulti.insert(::std::multimap<sal_Int32 , OTableWindow*>::value_type(aCountIter->second,aCountIter->first)); } - const sal_Bool bUseEscape = ::dbtools::getBooleanDataSourceSetting( _xConnection, PROPERTY_OUTERJOINESCAPE ); + const bool bUseEscape = ::dbtools::getBooleanDataSourceSetting( _xConnection, PROPERTY_OUTERJOINESCAPE ); ::std::multimap<sal_Int32 , OTableWindow*>::reverse_iterator aRIter = aMulti.rbegin(); ::std::multimap<sal_Int32 , OTableWindow*>::reverse_iterator aREnd = aMulti.rend(); for(;aRIter != aREnd;++aRIter) @@ -1130,7 +1130,7 @@ namespace aTableListStr = aTableListStr.replaceAt(aTableListStr.getLength()-1,1, OUString() ); return aTableListStr; } - OUString GenerateGroupBy(const OQueryDesignView* _pView,OTableFields& _rFieldList, sal_Bool bMulti ) + OUString GenerateGroupBy(const OQueryDesignView* _pView,OTableFields& _rFieldList, bool bMulti ) { OQueryController& rController = static_cast<OQueryController&>(_pView->getController()); const Reference< XConnection> xConnection = rController.getConnection(); @@ -1205,7 +1205,7 @@ namespace OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, sal_uInt16& nLevel , - sal_Bool bHaving = sal_False, + bool bHaving = false, bool bAddOrOnOneLine = false); SqlParseError GetSelectionCriteria( OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, @@ -1254,19 +1254,19 @@ namespace OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, sal_uInt16& nLevel, - sal_Bool bHaving, + bool bHaving, bool bAddOrOnOneLine); SqlParseError ComparisonPredicate(OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, const sal_uInt16 nLevel, - sal_Bool bHaving, + bool bHaving, bool bAddOrOnOneLine); SqlParseError GetORCriteria(OQueryDesignView* _pView, OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, sal_uInt16& nLevel , - sal_Bool bHaving, + bool bHaving, bool bAddOrOnOneLine) { SqlParseError eErrorCode = eOk; @@ -1325,7 +1325,7 @@ namespace OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, sal_uInt16& nLevel, - sal_Bool bHaving, + bool bHaving, bool bAddOrOnOneLine) { const ::com::sun::star::lang::Locale aLocale = _pView->getLocale(); @@ -1398,7 +1398,7 @@ namespace if ( eOk == ( eErrorCode = FillDragInfo(_pView,pValueExp,aDragLeft) )) { if ( bHaving ) - aDragLeft->SetGroupBy(sal_True); + aDragLeft->SetGroupBy(true); _pSelectionBrw->AddCondition(aDragLeft, aCondition, nLevel,bAddOrOnOneLine); } } @@ -1440,7 +1440,7 @@ namespace if ( eOk == ( eErrorCode = FillDragInfo(_pView,pCondition->getChild(0),aDragLeft)) ) { if ( bHaving ) - aDragLeft->SetGroupBy(sal_True); + aDragLeft->SetGroupBy(true); _pSelectionBrw->AddCondition(aDragLeft, sCondition, nLevel,bAddOrOnOneLine); } } @@ -1464,7 +1464,7 @@ namespace aDragLeft->SetFunctionType(FKT_OTHER); if ( bHaving ) - aDragLeft->SetGroupBy(sal_True); + aDragLeft->SetGroupBy(true); _pSelectionBrw->AddCondition(aDragLeft, sCondition, nLevel,bAddOrOnOneLine); } } @@ -1477,7 +1477,7 @@ namespace aDragLeft->SetField(aCondition); aDragLeft->SetFunctionType(FKT_CONDITION); - eErrorCode = _pSelectionBrw->InsertField(aDragLeft,BROWSER_INVALIDID,sal_False,sal_True).is() ? eOk : eTooManyColumns; + eErrorCode = _pSelectionBrw->InsertField(aDragLeft,BROWSER_INVALIDID,false,true).is() ? eOk : eTooManyColumns; } else //! TODO not supported yet eErrorCode = eStatementTooComplex; @@ -1488,7 +1488,7 @@ namespace OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, const sal_uInt16 nLevel, - sal_Bool bHaving, + bool bHaving, bool bAddOrOnOneLine) { SqlParseError eErrorCode = eOk; @@ -1559,7 +1559,7 @@ namespace } aDragLeft->SetFunctionType(nFunctionType); if ( bHaving ) - aDragLeft->SetGroupBy(sal_True); + aDragLeft->SetGroupBy(true); sal_Int32 nIndex = 0; aDragLeft->SetFunction(aColumnName.getToken(0,'(',nIndex)); } @@ -1568,7 +1568,7 @@ namespace // for an unknown function we write the whole text in the field aDragLeft->SetField(aColumnName); if(bHaving) - aDragLeft->SetGroupBy(sal_True); + aDragLeft->SetGroupBy(true); aDragLeft->SetFunctionType(FKT_OTHER|FKT_NUMERIC); } _pSelectionBrw->AddCondition(aDragLeft, aCondition, nLevel,bAddOrOnOneLine); @@ -1580,7 +1580,7 @@ namespace OSelectionBrowseBox* _pSelectionBrw, const ::connectivity::OSQLParseNode * pCondition, const sal_uInt16 nLevel, - sal_Bool bHaving + bool bHaving ,bool bAddOrOnOneLine) { SqlParseError eErrorCode = eOk; @@ -1691,7 +1691,7 @@ namespace if( eOk == ( eErrorCode = FillDragInfo(_pView,pCondition->getChild(nPos),aDragLeft))) { if(bHaving) - aDragLeft->SetGroupBy(sal_True); + aDragLeft->SetGroupBy(true); _pSelectionBrw->AddCondition(aDragLeft, aCondition, nLevel,bAddOrOnOneLine); } } @@ -1766,7 +1766,7 @@ namespace ::connectivity::OSQLParseTreeIterator& rParseIter = static_cast<OQueryController&>(_pView->getController()).getParseIterator(); rParseIter.getColumnRange( pColumnRef, aColumnName, aTableRange ); - sal_Bool bFound(sal_False); + bool bFound(false); OSL_ENSURE(!aColumnName.isEmpty(),"Column name must not be empty"); if (aTableRange.isEmpty()) { @@ -1784,7 +1784,7 @@ namespace { if(aColumnName.toChar() != '*') _raInfo->SetFieldAlias(aColumnAlias); - bFound = sal_True; + bFound = true; } } if (!bFound) @@ -1796,11 +1796,11 @@ namespace _raInfo->SetFunctionType(FKT_OTHER); } } - sal_Bool checkJoinConditions( const OQueryDesignView* _pView, + bool checkJoinConditions( const OQueryDesignView* _pView, const ::connectivity::OSQLParseNode* _pNode ) { const ::connectivity::OSQLParseNode* pJoinNode = NULL; - sal_Bool bRet = sal_True; + bool bRet = true; if (SQL_ISRULE(_pNode,qualified_join)) pJoinNode = _pNode; else if (SQL_ISRULE(_pNode,table_ref) @@ -1809,13 +1809,13 @@ namespace && SQL_ISPUNCTUATION(_pNode->getChild(2),")") ) // '(' joined_table ')' pJoinNode = _pNode->getChild(1); else if (! ( SQL_ISRULE(_pNode, table_ref) && _pNode->count() == 2) ) // table_node table_primary_as_range_column - bRet = sal_False; + bRet = false; if (pJoinNode && !InsertJoin(_pView,pJoinNode)) - bRet = sal_False; + bRet = false; return bRet; } - sal_Bool InsertJoin(const OQueryDesignView* _pView, + bool InsertJoin(const OQueryDesignView* _pView, const ::connectivity::OSQLParseNode *pNode) { OSL_ENSURE( SQL_ISRULE( pNode, qualified_join ) || SQL_ISRULE( pNode, joined_table ) || SQL_ISRULE( pNode, cross_union ), @@ -1830,7 +1830,7 @@ namespace pRightTableRef = pNode->getChild(4); // table_ref if ( !checkJoinConditions(_pView,pNode->getChild(0)) || !checkJoinConditions(_pView,pRightTableRef)) - return sal_False; + return false; // named column join may be implemented later // SQL_ISRULE(pNode->getChild(4),named_columns_join) @@ -1864,7 +1864,7 @@ namespace if ( SQL_ISRULE(pNode->getChild(4),join_condition) ) { if ( InsertJoinConnection(_pView,pNode->getChild(4)->getChild(1), eJoinType,pNode->getChild(0),pRightTableRef) != eOk ) - return sal_False; + return false; } } else if ( SQL_ISRULE(pNode, cross_union) ) @@ -1873,7 +1873,7 @@ namespace pRightTableRef = pNode->getChild(pNode->count() - 1); } else - return sal_False; + return false; if ( eJoinType == CROSS_JOIN || bNatural ) { @@ -1882,7 +1882,7 @@ namespace OQueryTableWindow* pRightWindow = static_cast<OQueryTableView*>(_pView->getTableView())->FindTable( getTableRange(_pView,pRightTableRef) ); OSL_ENSURE(pLeftWindow && pRightWindow,"Table Windows could not be found!"); if ( !pLeftWindow || !pRightWindow ) - return sal_False; + return false; OTableFieldDescRef aDragLeft = new OTableFieldDesc(); aDragLeft->SetTabWindow(pLeftWindow); @@ -1897,7 +1897,7 @@ namespace insertConnection(_pView,eJoinType,aDragLeft,aDragRight,bNatural); } - return sal_True; + return true; } void insertUnUsedFields(OQueryDesignView* _pView,OSelectionBrowseBox* _pSelectionBrw) { @@ -1906,7 +1906,7 @@ namespace OTableFields& rUnUsedFields = rController.getUnUsedFields(); OTableFields::iterator aEnd = rUnUsedFields.end(); for(OTableFields::iterator aIter = rUnUsedFields.begin();aIter != aEnd;++aIter) - if(_pSelectionBrw->InsertField(*aIter,BROWSER_INVALIDID,sal_False,sal_False).is()) + if(_pSelectionBrw->InsertField(*aIter,BROWSER_INVALIDID,false,false).is()) (*aIter) = NULL; OTableFields().swap( rUnUsedFields ); } @@ -2010,7 +2010,7 @@ namespace OQueryTableWindow* pExistentWin = pTableView->FindTable( sAlias ); if ( !pExistentWin ) { - pTableView->AddTabWin( sComposedName, sAlias, sal_False ); // don't create data here + pTableView->AddTabWin( sComposedName, sAlias, false ); // don't create data here } else { @@ -2037,12 +2037,12 @@ namespace // check if we have a distinct statement if(SQL_ISTOKEN(pParseTree->getChild(1),DISTINCT)) { - rController.setDistinct(sal_True); + rController.setDistinct(true); rController.InvalidateFeature(SID_QUERY_DISTINCT_VALUES); } else { - rController.setDistinct(sal_False); + rController.setDistinct(false); } ///check if query has a limit @@ -2095,7 +2095,7 @@ namespace OJoinTableView::OTableWindowMap* _pTabList) { SqlParseError eErrorCode = eOk; - sal_Bool bFirstField = sal_True; + bool bFirstField = true; OUString sAsterisk("*"); OJoinTableView::OTableWindowMap::iterator aIter = _pTabList->begin(); OJoinTableView::OTableWindowMap::iterator aEnd = _pTabList->end(); @@ -2105,8 +2105,8 @@ namespace OTableFieldDescRef aInfo = new OTableFieldDesc(); if (pTabWin->ExistsField( sAsterisk, aInfo )) { - eErrorCode = _pView->InsertField(aInfo, sal_True, bFirstField); - bFirstField = sal_False; + eErrorCode = _pView->InsertField(aInfo, true, bFirstField); + bFirstField = false; } } return eErrorCode; @@ -2119,7 +2119,7 @@ namespace return eNoSelectStatement; ::connectivity::OSQLParseNode* pParseTree = pNode->getChild(2); // selection - sal_Bool bFirstField = sal_True; // When initializing, the first field must be reactivated + bool bFirstField = true; // When initializing, the first field must be reactivated SqlParseError eErrorCode = eOk; @@ -2163,8 +2163,8 @@ namespace if (SQL_ISRULE(pColumnRef,column_ref)) { InsertColumnRef(_pView,pColumnRef,aColumnName,aColumnAlias,aTableRange,aInfo,pTabList); - eErrorCode = _pView->InsertField(aInfo, sal_True, bFirstField); - bFirstField = sal_False; + eErrorCode = _pView->InsertField(aInfo, true, bFirstField); + bFirstField = false; } else if(SQL_ISRULEOR3(pColumnRef, general_set_fct, set_fct_spec, position_exp) || SQL_ISRULEOR3(pColumnRef, extract_exp, fold, char_substring_fct) || @@ -2243,8 +2243,8 @@ namespace else aInfo->SetFunctionType(nFunctionType|FKT_OTHER); - eErrorCode = _pView->InsertField(aInfo, sal_True, bFirstField); - bFirstField = sal_False; + eErrorCode = _pView->InsertField(aInfo, true, bFirstField); + bFirstField = false; } else { @@ -2272,8 +2272,8 @@ namespace aInfo->SetFieldAlias(aColumnAlias); aInfo->SetFunctionType(FKT_NUMERIC | FKT_OTHER); - eErrorCode = _pView->InsertField(aInfo, sal_True, bFirstField); - bFirstField = sal_False; + eErrorCode = _pView->InsertField(aInfo, true, bFirstField); + bFirstField = false; } break; @@ -2353,7 +2353,7 @@ namespace _pView->fillFunctionInfo(pArgument,sCondition,aDragLeft); aDragLeft->SetFunctionType(FKT_OTHER); aDragLeft->SetOrderDir(eOrderDir); - aDragLeft->SetVisible(sal_False); + aDragLeft->SetVisible(false); _pSelectionBrw->AddOrder( aDragLeft, eOrderDir, i ); } else @@ -2372,7 +2372,7 @@ namespace { SqlParseError eErrorCode = eOk; if (!pSelectRoot->getChild(3)->getChild(3)->isLeaf()) - eErrorCode = GetORCriteria(_pView,_pSelectionBrw,pSelectRoot->getChild(3)->getChild(3)->getChild(1),rLevel, sal_True); + eErrorCode = GetORCriteria(_pView,_pSelectionBrw,pSelectRoot->getChild(3)->getChild(3)->getChild(1),rLevel, true); return eErrorCode; } SqlParseError GetGroupCriteria( OQueryDesignView* _pView, @@ -2394,7 +2394,7 @@ namespace { if ( eOk == (eErrorCode = FillDragInfo(_pView,pArgument,aDragInfo)) ) { - aDragInfo->SetGroupBy(sal_True); + aDragInfo->SetGroupBy(true); _pSelectionBrw->AddGroupBy(aDragInfo,i); } } @@ -2402,7 +2402,7 @@ namespace SQL_ISRULE(pParamRef = pArgument->getChild(pArgument->count()-2),column_ref) && eOk == FillDragInfo(_pView,pParamRef,aDragInfo)) { - aDragInfo->SetGroupBy(sal_True); + aDragInfo->SetGroupBy(true); _pSelectionBrw->AddGroupBy( aDragInfo, i ); } else if( SQL_ISRULE(pArgument, set_fct_spec ) ) @@ -2418,8 +2418,8 @@ namespace true); // quote is to true because we need quoted elements inside the function _pView->fillFunctionInfo(pArgument,sGroupByExpression,aDragInfo); aDragInfo->SetFunctionType(FKT_OTHER); - aDragInfo->SetGroupBy(sal_True); - aDragInfo->SetVisible(sal_False); + aDragInfo->SetGroupBy(true); + aDragInfo->SetVisible(false); _pSelectionBrw->AddGroupBy( aDragInfo, i ); } else @@ -2489,7 +2489,7 @@ OQueryDesignView::OQueryDesignView( OQueryContainerWindow* _pParent, :OQueryView( _pParent, _rController, _rxContext ) ,m_aSplitter( this ) ,m_eChildFocus(NONE) - ,m_bInSplitHandler( sal_False ) + ,m_bInSplitHandler( false ) { try @@ -2525,12 +2525,12 @@ IMPL_LINK( OQueryDesignView, SplitHdl, void*, /*p*/ ) { if (!getController().isReadOnly()) { - m_bInSplitHandler = sal_True; + m_bInSplitHandler = true; m_aSplitter.SetPosPixel( Point( m_aSplitter.GetPosPixel().X(),m_aSplitter.GetSplitPosPixel() ) ); static_cast<OQueryController&>(getController()).setSplitPos(m_aSplitter.GetSplitPosPixel()); static_cast<OQueryController&>(getController()).setModified( sal_True ); Resize(); - m_bInSplitHandler = sal_True; + m_bInSplitHandler = true; } return 0L; } @@ -2645,25 +2645,25 @@ void OQueryDesignView::copy() m_pSelectionBox->copy(); } -sal_Bool OQueryDesignView::isCutAllowed() +bool OQueryDesignView::isCutAllowed() { - sal_Bool bAllowed = sal_False; + bool bAllowed = false; if ( SELECTION == m_eChildFocus ) bAllowed = m_pSelectionBox->isCutAllowed(); return bAllowed; } -sal_Bool OQueryDesignView::isPasteAllowed() +bool OQueryDesignView::isPasteAllowed() { - sal_Bool bAllowed = sal_False; + bool bAllowed = false; if ( SELECTION == m_eChildFocus ) bAllowed = m_pSelectionBox->isPasteAllowed(); return bAllowed; } -sal_Bool OQueryDesignView::isCopyAllowed() +bool OQueryDesignView::isCopyAllowed() { - sal_Bool bAllowed = sal_False; + bool bAllowed = false; if ( SELECTION == m_eChildFocus ) bAllowed = m_pSelectionBox->isCopyAllowed(); return bAllowed; @@ -2714,7 +2714,7 @@ bool OQueryDesignView::HasFieldByAliasName(const OUString& rFieldName, OTableFie return m_pSelectionBox->HasFieldByAliasName( rFieldName, rInfo); } -SqlParseError OQueryDesignView::InsertField( const OTableFieldDescRef& rInfo, sal_Bool bVis, sal_Bool bActivate) +SqlParseError OQueryDesignView::InsertField( const OTableFieldDescRef& rInfo, bool bVis, bool bActivate) { return m_pSelectionBox->InsertField( rInfo, BROWSER_INVALIDID,bVis, bActivate ).is() ? eOk : eTooManyColumns; } @@ -2733,7 +2733,7 @@ void OQueryDesignView::fillValidFields(const OUString& sAliasName, ComboBox* pFi OSL_ENSURE(pFieldList != NULL, "OQueryDesignView::FillValidFields : What the hell do you think I can do with a NULL-ptr ? This will crash !"); pFieldList->Clear(); - sal_Bool bAllTables = sAliasName.isEmpty(); + bool bAllTables = sAliasName.isEmpty(); OJoinTableView::OTableWindowMap* pTabWins = m_pTableView->GetTabWinMap(); OUString strCurrentPrefix; @@ -2791,9 +2791,9 @@ bool OQueryDesignView::PreNotify(NotifyEvent& rNEvt) } // check if the statement is correct when not returning false -sal_Bool OQueryDesignView::checkStatement() +bool OQueryDesignView::checkStatement() { - sal_Bool bRet = sal_True; + bool bRet = true; if ( m_pSelectionBox ) bRet = m_pSelectionBox->Save(); // an error occurred so we return no return bRet; @@ -2885,7 +2885,7 @@ OUString OQueryDesignView::getStatement() Reference<XDatabaseMetaData> xMeta; if ( xConnection.is() ) xMeta = xConnection->getMetaData(); - sal_Bool bUseAlias = nTabcount > 1; + bool bUseAlias = nTabcount > 1; if ( xMeta.is() ) bUseAlias = bUseAlias || !xMeta->supportsGroupByUnrelated(); @@ -2942,7 +2942,7 @@ OUString OQueryDesignView::getStatement() return sSQL; } -void OQueryDesignView::setSlotEnabled(sal_Int32 _nSlotId,sal_Bool _bEnable) +void OQueryDesignView::setSlotEnabled(sal_Int32 _nSlotId, bool _bEnable) { sal_uInt16 nRow; switch (_nSlotId) @@ -2965,7 +2965,7 @@ void OQueryDesignView::setSlotEnabled(sal_Int32 _nSlotId,sal_Bool _bEnable) m_pSelectionBox->Invalidate(); } -sal_Bool OQueryDesignView::isSlotEnabled(sal_Int32 _nSlotId) +bool OQueryDesignView::isSlotEnabled(sal_Int32 _nSlotId) { sal_uInt16 nRow; switch (_nSlotId) @@ -3125,7 +3125,7 @@ void OQueryDesignView::initByFieldDescriptions( const Sequence< PropertyValue >& { ::rtl::Reference< OTableFieldDesc > pField( new OTableFieldDesc() ); pField->Load( *field, true ); - InsertField( pField, sal_True, sal_False ); + InsertField( pField, true, false ); } rController.ClearUndoManager(); diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx index 8e0a95e70d26..16f8e0e4b7cd 100644 --- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx +++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.cxx @@ -39,7 +39,7 @@ OQueryTabConnUndoAction::~OQueryTabConnUndoAction() OQueryTabConnUndoAction::OQueryTabConnUndoAction(OQueryTableView* pOwner, sal_uInt16 nCommentID) :OQueryDesignUndoAction(pOwner, nCommentID) ,m_pConnection(NULL) - ,m_bOwnerOfConn(sal_False) + ,m_bOwnerOfConn(false) { } @@ -51,13 +51,13 @@ OQueryAddTabConnUndoAction::OQueryAddTabConnUndoAction(OQueryTableView* pOwner) void OQueryAddTabConnUndoAction::Undo() { static_cast<OQueryTableView*>(m_pOwner)->DropConnection(m_pConnection); - SetOwnership(sal_True); + SetOwnership(true); } void OQueryAddTabConnUndoAction::Redo() { static_cast<OQueryTableView*>(m_pOwner)->GetConnection(m_pConnection); - SetOwnership(sal_False); + SetOwnership(false); } OQueryDelTabConnUndoAction::OQueryDelTabConnUndoAction(OQueryTableView* pOwner) @@ -68,13 +68,13 @@ OQueryDelTabConnUndoAction::OQueryDelTabConnUndoAction(OQueryTableView* pOwner) void OQueryDelTabConnUndoAction::Undo() { static_cast<OQueryTableView*>(m_pOwner)->GetConnection(m_pConnection); - SetOwnership(sal_False); + SetOwnership(false); } void OQueryDelTabConnUndoAction::Redo() { static_cast<OQueryTableView*>(m_pOwner)->DropConnection(m_pConnection); - SetOwnership(sal_True); + SetOwnership(true); } OQueryTabWinShowUndoAct::OQueryTabWinShowUndoAct(OQueryTableView* pOwner) @@ -89,13 +89,13 @@ OQueryTabWinShowUndoAct::~OQueryTabWinShowUndoAct() void OQueryTabWinShowUndoAct::Undo() { static_cast<OQueryTableView*>(m_pOwner)->HideTabWin(m_pTabWin, this); - SetOwnership(sal_True); + SetOwnership(true); } void OQueryTabWinShowUndoAct::Redo() { - static_cast<OQueryTableView*>(m_pOwner)->ShowTabWin(m_pTabWin, this,sal_True); - SetOwnership(sal_False); + static_cast<OQueryTableView*>(m_pOwner)->ShowTabWin(m_pTabWin, this,true); + SetOwnership(false); } OQueryTabWinDelUndoAct::OQueryTabWinDelUndoAct(OQueryTableView* pOwner) @@ -109,14 +109,14 @@ OQueryTabWinDelUndoAct::~OQueryTabWinDelUndoAct() void OQueryTabWinDelUndoAct::Undo() { - static_cast<OQueryTableView*>(m_pOwner)->ShowTabWin( m_pTabWin, this,sal_True ); - SetOwnership(sal_False); + static_cast<OQueryTableView*>(m_pOwner)->ShowTabWin( m_pTabWin, this,true ); + SetOwnership(false); } void OQueryTabWinDelUndoAct::Redo() { static_cast<OQueryTableView*>(m_pOwner)->HideTabWin( m_pTabWin, this ); - SetOwnership(sal_True); + SetOwnership(true); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx index aef48bd3ceb5..72b31532213d 100644 --- a/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx +++ b/dbaccess/source/ui/querydesign/QueryTabConnUndoAction.hxx @@ -29,7 +29,7 @@ namespace dbaui { protected: OQueryTableConnection* m_pConnection; - sal_Bool m_bOwnerOfConn; + bool m_bOwnerOfConn; // am I the only owner of the connection? (changes with every redo and undo) public: @@ -41,7 +41,7 @@ namespace dbaui void SetConnection(OQueryTableConnection* pConn) { m_pConnection = pConn; } // now SetOwnership please - void SetOwnership(sal_Bool bTakeIt) { m_bOwnerOfConn = bTakeIt; } + void SetOwnership(bool bTakeIt) { m_bOwnerOfConn = bTakeIt; } }; } #endif // INCLUDED_DBACCESS_SOURCE_UI_QUERYDESIGN_QUERYTABCONNUNDOACTION_HXX diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx index 8dfdbc7f63c9..f7bee57ce37a 100644 --- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx +++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.cxx @@ -42,7 +42,7 @@ OQueryDesignFieldUndoAct::~OQueryDesignFieldUndoAct() OQueryTabWinUndoAct::OQueryTabWinUndoAct(OQueryTableView* pOwner, sal_uInt16 nCommentID) : OQueryDesignUndoAction(pOwner, nCommentID) , m_pTabWin(NULL) - , m_bOwnerOfObjects(sal_False) + , m_bOwnerOfObjects(false) { } @@ -108,7 +108,7 @@ void OTabFieldMovedUndoAct::Undo() sal_uInt16 nId = pDescr->GetColumnId(); sal_uInt16 nOldPos = pOwner->GetColumnPos(nId); pOwner->SetColumnPos(nId,m_nColumnPostion); - pOwner->ColumnMoved(nId,sal_False); + pOwner->ColumnMoved(nId,false); m_nColumnPostion = nOldPos; } pOwner->LeaveUndoMode(); diff --git a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx index 449c575db4da..33df8ffb49c2 100644 --- a/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx +++ b/dbaccess/source/ui/querydesign/QueryTabWinUndoAct.hxx @@ -35,14 +35,14 @@ namespace dbaui protected: ::std::vector<OTableConnection*> m_vTableConnection; OQueryTableWindow* m_pTabWin; - sal_Bool m_bOwnerOfObjects; + bool m_bOwnerOfObjects; // am I the only owner of the managed objects? (changes with every redo or undo) public: OQueryTabWinUndoAct(OQueryTableView* pOwner, sal_uInt16 nCommentID); virtual ~OQueryTabWinUndoAct(); - void SetOwnership(sal_Bool bTakeIt) { m_bOwnerOfObjects = bTakeIt; } + void SetOwnership(bool bTakeIt) { m_bOwnerOfObjects = bTakeIt; } virtual void Undo() SAL_OVERRIDE = 0; virtual void Redo() SAL_OVERRIDE = 0; diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index 2cd7e56116bd..798937674198 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -60,9 +60,9 @@ using namespace ::com::sun::star::accessibility; namespace { - sal_Bool isColumnInKeyType(const Reference<XIndexAccess>& _rxKeys,const OUString& _rColumnName,sal_Int32 _nKeyType) + bool isColumnInKeyType(const Reference<XIndexAccess>& _rxKeys,const OUString& _rColumnName,sal_Int32 _nKeyType) { - sal_Bool bReturn = sal_False; + bool bReturn = false; if(_rxKeys.is()) { Reference<XColumnsSupplier> xColumnsSupplier; @@ -83,7 +83,7 @@ namespace Reference<XNameAccess> xColumns = xColumnsSupplier->getColumns(); if(xColumns.is() && xColumns->hasByName(_rColumnName)) { - bReturn = sal_True; + bReturn = true; break; } } @@ -102,7 +102,7 @@ namespace void addUndoAction( OQueryTableView* _pView, OQueryTabConnUndoAction* _pUndoAction, OQueryTableConnection* _pConnection, - sal_Bool _bOwner = sal_False) + bool _bOwner = false) { _pUndoAction->SetOwnership(_bOwner); _pUndoAction->SetConnection(_pConnection); @@ -114,12 +114,12 @@ namespace @return true when OK was pressed otherwise false */ - sal_Bool openJoinDialog(OQueryTableView* _pView,const TTableConnectionData::value_type& _pConnectionData,sal_Bool _bSelectableTables) + bool openJoinDialog(OQueryTableView* _pView,const TTableConnectionData::value_type& _pConnectionData,bool _bSelectableTables) { OQueryTableConnectionData* pData = static_cast< OQueryTableConnectionData*>(_pConnectionData.get()); DlgQryJoin aDlg(_pView,_pConnectionData,_pView->GetTabWinMap(),_pView->getDesignView()->getController().getConnection(),_bSelectableTables); - sal_Bool bOk = aDlg.Execute() == RET_OK; + bool bOk = aDlg.Execute() == RET_OK; if( bOk ) { pData->SetJoinType(aDlg.GetJoinType()); @@ -135,7 +135,7 @@ namespace */ void connectionModified(OQueryTableView* _pView, OTableConnection* _pConnection, - sal_Bool _bAddUndo) + bool _bAddUndo) { OSL_ENSURE(_pConnection,"Invalid connection!"); _pConnection->UpdateLineList(); @@ -211,7 +211,7 @@ namespace OQueryTableConnection aNewConn(_pView, aNewConnData); // refering to the local variable is not important, as NotifyQueryTabConn creates a new copy // to add me (if not existent) - _pView->NotifyTabConnection(aNewConn, sal_False); + _pView->NotifyTabConnection(aNewConn, false); // don't create an Undo-Action for the new connection : the connection is // covered by the Undo-Action for the tabwin, as the "Undo the insert" will // automatically remove all connections adjacent to the win. @@ -298,7 +298,7 @@ void OQueryTableView::ReSync() // do both tables for the connection exist ? OUString strTabExistenceTest = pTabConnData->getReferencingTable()->GetWinName(); - sal_Bool bInvalid = ::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end(); + bool bInvalid = ::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end(); strTabExistenceTest = pTabConnData->getReferencedTable()->GetWinName(); bInvalid = bInvalid && ::std::find(arrInvalidTables.begin(),arrInvalidTables.end(),strTabExistenceTest) != arrInvalidTables.end(); @@ -327,7 +327,7 @@ OTableWindow* OQueryTableView::createWindow(const TTableWindowData::value_type& return new OQueryTableWindow(this,_pData); } -void OQueryTableView::NotifyTabConnection(const OQueryTableConnection& rNewConn, sal_Bool _bCreateUndoAction) +void OQueryTableView::NotifyTabConnection(const OQueryTableConnection& rNewConn, bool _bCreateUndoAction) { // let's first check if I have the connection already OQueryTableConnection* pTabConn = NULL; @@ -373,7 +373,7 @@ OTableWindowData* OQueryTableView::CreateImpl(const OUString& _rComposedName return new OQueryTableWindowData( _rComposedName, _sTableName,_rWinName ); } -void OQueryTableView::AddTabWin(const OUString& _rTableName, const OUString& _rAliasName, sal_Bool bNewTable) +void OQueryTableView::AddTabWin(const OUString& _rTableName, const OUString& _rAliasName, bool bNewTable) { // this method has been inherited from the base class, linking back to the parent and which constructs // an Alias and which passes on to my other AddTabWin @@ -436,14 +436,14 @@ Reference<XPropertySet> getKeyReferencedTo(const Reference<XIndexAccess>& _rxKey return Reference<XPropertySet>(); } -void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString& _rTableName, const OUString& strAlias, sal_Bool bNewTable) +void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString& _rTableName, const OUString& strAlias, bool bNewTable) { OSL_ENSURE(!_rTableName.isEmpty() || !strAlias.isEmpty(), "OQueryTableView::AddTabWin : no tables or aliases !"); // If the table is not set, then it is a dummy window, but at least the alias must be set // build a new data structure // first check if this already has its data - sal_Bool bAppend = bNewTable; + bool bAppend = bNewTable; TTableWindowData::value_type pNewTabWinData; TTableWindowData* pWindowData = getDesignView()->getController().getTableWindowData(); TTableWindowData::iterator aWinIter = pWindowData->begin(); @@ -467,12 +467,12 @@ void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString& // New UndoAction OQueryTabWinShowUndoAct* pUndoAction = new OQueryTabWinShowUndoAct(this); pUndoAction->SetTabWin(pNewTabWin); // Window - sal_Bool bSuccess = ShowTabWin(pNewTabWin, pUndoAction,bAppend); + bool bSuccess = ShowTabWin(pNewTabWin, pUndoAction,bAppend); if(!bSuccess) { // reset table window pUndoAction->SetTabWin(NULL); - pUndoAction->SetOwnership(sal_False); + pUndoAction->SetOwnership(false); delete pUndoAction; return; @@ -641,15 +641,15 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ pConn->GetData()->AppendConnLine( aSourceFieldName,aDestFieldName ); - connectionModified(this,pConn,sal_False); + connectionModified(this,pConn,false); } } void OQueryTableView::ConnDoubleClicked(OTableConnection* pConnection) { - if( openJoinDialog(this,pConnection->GetData(),sal_False) ) + if( openJoinDialog(this,pConnection->GetData(),false) ) { - connectionModified(this,pConnection,sal_False); + connectionModified(this,pConnection,false); SelectConn( pConnection ); } } @@ -657,18 +657,18 @@ void OQueryTableView::ConnDoubleClicked(OTableConnection* pConnection) void OQueryTableView::createNewConnection() { TTableConnectionData::value_type pData(new OQueryTableConnectionData()); - if( openJoinDialog(this,pData,sal_True) ) + if( openJoinDialog(this,pData,true) ) { OTableWindowMap* pMap = GetTabWinMap(); OQueryTableWindow* pSourceWin = static_cast< OQueryTableWindow*>((*pMap)[pData->getReferencingTable()->GetWinName()]); OQueryTableWindow* pDestWin = static_cast< OQueryTableWindow*>((*pMap)[pData->getReferencedTable()->GetWinName()]); // first we have to look if the this connection already exists OTableConnection* pConn = GetTabConn(pSourceWin,pDestWin,true); - sal_Bool bNew = sal_True; + bool bNew = true; if ( pConn ) { pConn->GetData()->CopyFrom( *pData ); - bNew = sal_False; + bNew = false; } else { @@ -693,7 +693,7 @@ bool OQueryTableView::RemoveConnection( OTableConnection* _pConnection,sal_Bool addUndoAction( this, new OQueryDelTabConnUndoAction(this), static_cast< OQueryTableConnection*>(_pConnection), - sal_True); + true); return bRet; } @@ -712,7 +712,7 @@ OQueryTableWindow* OQueryTableView::FindTable(const OUString& rAliasName) return NULL; } -sal_Bool OQueryTableView::FindTableFromField(const OUString& rFieldName, OTableFieldDescRef& rInfo, sal_uInt16& rCnt) +bool OQueryTableView::FindTableFromField(const OUString& rFieldName, OTableFieldDescRef& rInfo, sal_uInt16& rCnt) { rCnt = 0; OTableWindowMap::const_iterator aIter = GetTabWinMap()->begin(); @@ -870,7 +870,7 @@ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc m_pView->getController().InvalidateFeature(ID_BROWSER_ADDTABLE); // inform the UndoAction that the window and connections belong to it - pUndoAction->SetOwnership(sal_True); + pUndoAction->SetOwnership(true); // by doing so, we have modified the document m_pView->getController().setModified( sal_True ); @@ -878,10 +878,10 @@ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc } } -sal_Bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction,sal_Bool _bAppend ) +bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAct* pUndoAction, bool _bAppend ) { - sal_Bool bSuccess = sal_False; + bool bSuccess = false; if (pTabWin) { @@ -929,9 +929,9 @@ sal_Bool OQueryTableView::ShowTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUn m_pView->getController().InvalidateFeature(ID_BROWSER_ADDTABLE); // and inform the UndoAction that the window belongs to me - pUndoAction->SetOwnership(sal_False); + pUndoAction->SetOwnership(false); - bSuccess = sal_True; + bSuccess = true; } else { @@ -957,7 +957,7 @@ void OQueryTableView::InsertField(const OTableFieldDescRef& rInfo) static_cast<OQueryDesignView*>(getDesignView())->InsertField(rInfo); } -sal_Bool OQueryTableView::ExistsAVisitedConn(const OQueryTableWindow* pFrom) const +bool OQueryTableView::ExistsAVisitedConn(const OQueryTableWindow* pFrom) const { const ::std::vector<OTableConnection*>* pList = getTableConnections(); if (pList) diff --git a/dbaccess/source/ui/querydesign/QueryTextView.cxx b/dbaccess/source/ui/querydesign/QueryTextView.cxx index d550877e8e6e..b0d8364c986e 100644 --- a/dbaccess/source/ui/querydesign/QueryTextView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTextView.cxx @@ -69,9 +69,9 @@ void OQueryTextView::Resize() } // check if the statement is correct when not returning false -sal_Bool OQueryTextView::checkStatement() +bool OQueryTextView::checkStatement() { - return sal_True; + return true; } OUString OQueryTextView::getStatement() @@ -105,19 +105,19 @@ void OQueryTextView::copy() m_pEdit->Copy(); } -sal_Bool OQueryTextView::isCutAllowed() +bool OQueryTextView::isCutAllowed() { return !m_pEdit->GetSelected().isEmpty(); } -sal_Bool OQueryTextView::isPasteAllowed() +bool OQueryTextView::isPasteAllowed() { - return sal_True; + return true; } -sal_Bool OQueryTextView::isCopyAllowed() +bool OQueryTextView::isCopyAllowed() { - return sal_True; + return true; } void OQueryTextView::cut() diff --git a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx index fe4dc3f88fa0..ae0adfa4697a 100644 --- a/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx +++ b/dbaccess/source/ui/querydesign/QueryViewSwitch.cxx @@ -33,7 +33,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; OQueryViewSwitch::OQueryViewSwitch(OQueryContainerWindow* _pParent, OQueryController& _rController,const Reference< XComponentContext >& _rxContext) -: m_bAddTableDialogWasVisible(sal_False) +: m_bAddTableDialogWasVisible(false) { m_pTextView = new OQueryTextView(_pParent); @@ -74,7 +74,7 @@ void OQueryViewSwitch::resizeDocumentView(Rectangle& _rPlayground) _rPlayground.SetSize( Size( 0, 0 ) ); } -sal_Bool OQueryViewSwitch::checkStatement() +bool OQueryViewSwitch::checkStatement() { if(m_pTextView->IsVisible()) return m_pTextView->checkStatement(); @@ -88,7 +88,7 @@ OUString OQueryViewSwitch::getStatement() return m_pDesignView->getStatement(); } -void OQueryViewSwitch::setReadOnly(sal_Bool _bReadOnly) +void OQueryViewSwitch::setReadOnly(bool _bReadOnly) { if(m_pTextView->IsVisible()) m_pTextView->setReadOnly(_bReadOnly); @@ -128,21 +128,21 @@ void OQueryViewSwitch::copy() m_pDesignView->copy(); } -sal_Bool OQueryViewSwitch::isCutAllowed() +bool OQueryViewSwitch::isCutAllowed() { if(m_pTextView->IsVisible()) return m_pTextView->isCutAllowed(); return m_pDesignView->isCutAllowed(); } -sal_Bool OQueryViewSwitch::isCopyAllowed() +bool OQueryViewSwitch::isCopyAllowed() { if(m_pTextView->IsVisible()) return m_pTextView->isCopyAllowed(); return m_pDesignView->isCopyAllowed(); } -sal_Bool OQueryViewSwitch::isPasteAllowed() +bool OQueryViewSwitch::isPasteAllowed() { if(m_pTextView->IsVisible()) return m_pTextView->isPasteAllowed(); @@ -192,7 +192,7 @@ void OQueryViewSwitch::impl_forceSQLView() void OQueryViewSwitch::forceInitialView() { OQueryController& rQueryController( static_cast< OQueryController& >( m_pDesignView->getController() ) ); - const sal_Bool bGraphicalDesign = rQueryController.isGraphicalDesign(); + const bool bGraphicalDesign = rQueryController.isGraphicalDesign(); if ( !bGraphicalDesign ) impl_forceSQLView(); else @@ -217,8 +217,8 @@ void OQueryViewSwitch::forceInitialView() bool OQueryViewSwitch::switchView( ::dbtools::SQLExceptionInfo* _pErrorInfo ) { - sal_Bool bRet = sal_True; - sal_Bool bGraphicalDesign = static_cast<OQueryController&>(m_pDesignView->getController()).isGraphicalDesign(); + bool bRet = true; + bool bGraphicalDesign = static_cast<OQueryController&>(m_pDesignView->getController()).isGraphicalDesign(); if ( !bGraphicalDesign ) { @@ -275,12 +275,12 @@ OAddTableDlg* OQueryViewSwitch::getAddTableDialog() return m_pDesignView->getController().getAddTableDialog(); } -sal_Bool OQueryViewSwitch::isSlotEnabled(sal_Int32 _nSlotId) +bool OQueryViewSwitch::isSlotEnabled(sal_Int32 _nSlotId) { return m_pDesignView->isSlotEnabled(_nSlotId); } -void OQueryViewSwitch::setSlotEnabled(sal_Int32 _nSlotId,sal_Bool _bEnable) +void OQueryViewSwitch::setSlotEnabled(sal_Int32 _nSlotId, bool _bEnable) { m_pDesignView->setSlotEnabled(_nSlotId,_bEnable); } diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 225e32e696a5..26a156dc2fe3 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -64,9 +64,9 @@ using namespace ::com::sun::star::accessibility; namespace { - sal_Bool isFieldNameAsterisk(const OUString& _sFieldName ) + bool isFieldNameAsterisk(const OUString& _sFieldName ) { - sal_Bool bAsterisk = !(!_sFieldName.isEmpty() && _sFieldName.toChar() != '*'); + bool bAsterisk = !(!_sFieldName.isEmpty() && _sFieldName.toChar() != '*'); if ( !bAsterisk ) { OUString sName = _sFieldName; @@ -74,14 +74,14 @@ namespace if ( (nTokenCount == 2 && sName.getToken(1,'.')[0] == '*' ) || (nTokenCount == 3 && sName.getToken(2,'.')[0] == '*' ) ) { - bAsterisk = sal_True; + bAsterisk = true; } } return bAsterisk; } - sal_Bool lcl_SupportsCoreSQLGrammar(const Reference< XConnection>& _xConnection) + bool lcl_SupportsCoreSQLGrammar(const Reference< XConnection>& _xConnection) { - sal_Bool bSupportsCoreGrammar = sal_False; + bool bSupportsCoreGrammar = false; if ( _xConnection.is() ) { try @@ -105,12 +105,12 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent ) ,m_aFunctionStrings(ModuleRes(STR_QUERY_FUNCTIONS)) ,m_nVisibleCount(0) ,m_nLastSortColumn(SORT_COLUMN_NONE) - ,m_bOrderByUnRelated(sal_True) - ,m_bGroupByUnRelated(sal_True) - ,m_bStopTimer(sal_False) - ,m_bWasEditing(sal_False) - ,m_bDisableErrorBox(sal_False) - ,m_bInUndoMode(sal_False) + ,m_bOrderByUnRelated(true) + ,m_bGroupByUnRelated(true) + ,m_bStopTimer(false) + ,m_bWasEditing(false) + ,m_bDisableErrorBox(false) + ,m_bInUndoMode(false) { SetHelpId(HID_CTL_QRYDGNCRIT); @@ -282,7 +282,7 @@ BrowserHeader* OSelectionBrowseBox::imp_CreateHeaderBar(BrowseBox* /*pParent*/) return new OSelectionBrwBoxHeader(this); } -void OSelectionBrowseBox::ColumnMoved( sal_uInt16 nColId,sal_Bool _bCreateUndo ) +void OSelectionBrowseBox::ColumnMoved( sal_uInt16 nColId, bool _bCreateUndo ) { EditBrowseBox::ColumnMoved( nColId ); // swap the two columns @@ -404,7 +404,7 @@ void OSelectionBrowseBox::ClearAll() SetUpdateMode(true); } -void OSelectionBrowseBox::SetReadOnly(sal_Bool bRO) +void OSelectionBrowseBox::SetReadOnly(bool bRO) { if (bRO) { @@ -515,7 +515,7 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon if(!pEntry->IsVisible() && pEntry->GetOrderDir() != ORDER_NONE && !m_bOrderByUnRelated) { // a column has to visible in order to show up in ORDER BY - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); m_pVisibleCell->GetBox().Check(pEntry->IsVisible()); m_pVisibleCell->GetBox().SaveValue(); m_pVisibleCell->GetBox().Disable(); @@ -545,22 +545,22 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon Controller()->ClearModified(); } -void OSelectionBrowseBox::notifyTableFieldChanged(const OUString& _sOldAlias,const OUString& _sAlias,sal_Bool& _bListAction,sal_uInt16 _nColumnId) +void OSelectionBrowseBox::notifyTableFieldChanged(const OUString& _sOldAlias, const OUString& _sAlias, bool& _bListAction, sal_uInt16 _nColumnId) { appendUndoAction(_sOldAlias,_sAlias,BROW_TABLE_ROW,_bListAction); if ( m_bVisibleRow[BROW_TABLE_ROW] ) RowModified(GetBrowseRow(BROW_TABLE_ROW), _nColumnId); } -void OSelectionBrowseBox::notifyFunctionFieldChanged(const OUString& _sOldFunctionName,const OUString& _sFunctionName,sal_Bool& _bListAction,sal_uInt16 _nColumnId) +void OSelectionBrowseBox::notifyFunctionFieldChanged(const OUString& _sOldFunctionName, const OUString& _sFunctionName, bool& _bListAction, sal_uInt16 _nColumnId) { appendUndoAction(_sOldFunctionName,_sFunctionName,BROW_FUNCTION_ROW,_bListAction); if ( !m_bVisibleRow[BROW_FUNCTION_ROW] ) - SetRowVisible(BROW_FUNCTION_ROW, sal_True); + SetRowVisible(BROW_FUNCTION_ROW, true); RowModified(GetBrowseRow(BROW_FUNCTION_ROW), _nColumnId); } -void OSelectionBrowseBox::clearEntryFunctionField(const OUString& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction,sal_uInt16 _nColumnId) +void OSelectionBrowseBox::clearEntryFunctionField(const OUString& _sFieldName,OTableFieldDescRef& _pEntry, bool& _bListAction,sal_uInt16 _nColumnId) { if ( isFieldNameAsterisk( _sFieldName ) && (!_pEntry->isNoneFunction() || _pEntry->IsGroupBy()) ) { @@ -572,13 +572,13 @@ void OSelectionBrowseBox::clearEntryFunctionField(const OUString& _sFieldName,OT // append undo action for the function field _pEntry->SetFunctionType(FKT_NONE); _pEntry->SetFunction(OUString()); - _pEntry->SetGroupBy(sal_False); + _pEntry->SetGroupBy(false); notifyFunctionFieldChanged(sOldLocalizedFunctionName,_pEntry->GetFunction(),_bListAction,_nColumnId); } } } -sal_Bool OSelectionBrowseBox::fillColumnRef(const OSQLParseNode* _pColumnRef, const Reference< XConnection >& _rxConnection, OTableFieldDescRef& _pEntry, sal_Bool& _bListAction ) +bool OSelectionBrowseBox::fillColumnRef(const OSQLParseNode* _pColumnRef, const Reference< XConnection >& _rxConnection, OTableFieldDescRef& _pEntry, bool& _bListAction ) { OSL_ENSURE(_pColumnRef,"No valid parsenode!"); OUString sColumnName,sTableRange; @@ -586,9 +586,9 @@ sal_Bool OSelectionBrowseBox::fillColumnRef(const OSQLParseNode* _pColumnRef, co return fillColumnRef(sColumnName,sTableRange,_rxConnection->getMetaData(),_pEntry,_bListAction); } -sal_Bool OSelectionBrowseBox::fillColumnRef(const OUString& _sColumnName,const OUString& _sTableRange,const Reference<XDatabaseMetaData>& _xMetaData,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction) +bool OSelectionBrowseBox::fillColumnRef(const OUString& _sColumnName, const OUString& _sTableRange, const Reference<XDatabaseMetaData>& _xMetaData, OTableFieldDescRef& _pEntry, bool& _bListAction) { - sal_Bool bError = sal_False; + bool bError = false; ::comphelper::UStringMixEqual bCase(_xMetaData->supportsMixedCaseQuotedIdentifiers()); // check if the table name is the same if ( !_sTableRange.isEmpty() && (bCase(_pEntry->GetTable(),_sTableRange) || bCase(_pEntry->GetAlias(),_sTableRange)) ) @@ -616,7 +616,7 @@ sal_Bool OSelectionBrowseBox::fillColumnRef(const OUString& _sColumnName,const O OUString sErrorMsg(ModuleRes(RID_STR_FIELD_DOESNT_EXIST)); sErrorMsg = sErrorMsg.replaceFirst("$name$",_sColumnName); OSQLErrorBox( this, sErrorMsg ).Execute(); - bError = sal_True; + bError = true; } else { @@ -631,9 +631,9 @@ sal_Bool OSelectionBrowseBox::fillColumnRef(const OUString& _sColumnName,const O return bError; } -sal_Bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef& _pEntry, sal_Bool& _bListAction) +bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRef& _pEntry, bool& _bListAction) { - sal_Bool bError = sal_False; + bool bError = false; OQueryController& rController = static_cast<OQueryController&>(getDesignView()->getController()); @@ -655,7 +655,7 @@ sal_Bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRe xMetaData = xConnection->getMetaData(); OSL_ENSURE( xMetaData.is(), "OSelectionBrowseBox::saveField: invalid connection/meta data!" ); if ( !xMetaData.is() ) - return sal_True; + return true; OUString sErrorMsg; // second test if the name can be set as select columns in a pseudo statement @@ -723,7 +723,7 @@ sal_Bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRe sErrorMessage = sErrorMessage.replaceFirst("$name$",_sFieldName); OSQLErrorBox( this, sErrorMessage ).Execute(); - return sal_True; + return true; } // we got a valid select column @@ -799,7 +799,7 @@ sal_Bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRe aSelEntry->SetFunction(sLocalizedFunctionName); sal_uInt32 nFunCount = pColumnRef->count() - 1; sal_Int32 nFunctionType = FKT_AGGREGATE; - sal_Bool bQuote = sal_False; + bool bQuote = false; // may be there exists only one parameter which is a column, fill all information into our fields if ( nFunCount == 4 && SQL_ISRULE(pColumnRef->getChild(3),column_ref) ) bError = fillColumnRef( pColumnRef->getChild(3), xConnection, aSelEntry, _bListAction ); @@ -808,7 +808,7 @@ sal_Bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRe else { nFunctionType |= FKT_NUMERIC; - bQuote = sal_True; + bQuote = true; aSelEntry->SetDataType(DataType::DOUBLE); aSelEntry->SetFieldType(TAB_NORMAL_FIELD); } @@ -823,7 +823,7 @@ sal_Bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRe if ( aSelEntry->IsGroupBy() ) { sOldLocalizedFunctionName = m_aFunctionStrings.getToken(comphelper::string::getTokenCount(m_aFunctionStrings, ';')-1, ';'); - aSelEntry->SetGroupBy(sal_False); + aSelEntry->SetGroupBy(false); } // append undo action @@ -874,12 +874,12 @@ sal_Bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRe notifyTableFieldChanged(sOldAlias,aSelEntry->GetAlias(),_bListAction, nColumnId); } - if ( i > 0 && !InsertField(aSelEntry,BROWSER_INVALIDID,sal_True,sal_False).is() ) // may we have to append more than one field + if ( i > 0 && !InsertField(aSelEntry,BROWSER_INVALIDID,true,false).is() ) // may we have to append more than one field { // the field could not be inserted OUString sErrorMessage( ModuleRes( RID_STR_FIELD_DOESNT_EXIST ) ); sErrorMessage = sErrorMessage.replaceFirst("$name$",aSelEntry->GetField()); OSQLErrorBox( this, sErrorMessage ).Execute(); - bError = sal_True; + bError = true; } } } @@ -896,21 +896,21 @@ bool OSelectionBrowseBox::SaveModified() if(getFields().size() > static_cast<sal_uInt16>(nCurrentColumnPos - 1)) pEntry = getEntry(nCurrentColumnPos - 1); - sal_Bool bWasEmpty = pEntry.is() ? pEntry->IsEmpty() : sal_False; - sal_Bool bError = sal_False; - sal_Bool bListAction = sal_False; + bool bWasEmpty = pEntry.is() && pEntry->IsEmpty(); + bool bError = false; + bool bListAction = false; if (pEntry.is() && Controller().Is() && Controller()->IsModified()) { // for the Undo-action OUString strOldCellContents,sNewValue; long nRow = GetRealRow(GetCurRow()); - sal_Bool bAppendRow = sal_False; + bool bAppendRow = false; switch (nRow) { case BROW_VIS_ROW: { - sal_Bool bOldValue = m_pVisibleCell->GetBox().GetSavedValue() != TRISTATE_FALSE; + bool bOldValue = m_pVisibleCell->GetBox().GetSavedValue() != TRISTATE_FALSE; strOldCellContents = bOldValue ? g_strOne : g_strZero; sNewValue = !bOldValue ? g_strOne : g_strZero; } @@ -921,7 +921,7 @@ bool OSelectionBrowseBox::SaveModified() } else { - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); m_pVisibleCell->GetBox().Check(); } break; @@ -943,7 +943,7 @@ bool OSelectionBrowseBox::SaveModified() else { strOldCellContents = pEntry->GetField(); - bListAction = sal_True; + bListAction = true; if ( !m_bInUndoMode ) rController.GetUndoManager().EnterListAction(OUString(),OUString()); @@ -960,7 +960,7 @@ bool OSelectionBrowseBox::SaveModified() bError = fillColumnRef( sColumnName, sTableAlias, xConnection->getMetaData(), pEntry, bListAction ); } else - bError = sal_True; + bError = true; if ( bError ) bError = saveField(aFieldName,pEntry,bListAction); @@ -968,14 +968,14 @@ bool OSelectionBrowseBox::SaveModified() } catch(Exception&) { - bError = sal_True; + bError = true; } if ( bError ) { sNewValue = aFieldName; if ( !m_bInUndoMode ) static_cast<OQueryController&>(getDesignView()->getController()).GetUndoManager().LeaveListAction(); - bListAction = sal_False; + bListAction = false; } else sNewValue = pEntry->GetField(); @@ -1025,7 +1025,7 @@ bool OSelectionBrowseBox::SaveModified() pEntry->SetOrderDir(EOrderDir(nIdx)); if(!m_bOrderByUnRelated) { - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); m_pVisibleCell->GetBox().Check(); RowModified(GetBrowseRow(BROW_VIS_ROW), GetCurColumnId()); } @@ -1044,15 +1044,15 @@ bool OSelectionBrowseBox::SaveModified() // these functions are only available in CORE OUString sFunctionName = m_pFunctionCell->GetEntry(nPos); OUString sGroupFunctionName = m_aFunctionStrings.getToken(comphelper::string::getTokenCount(m_aFunctionStrings, ';')-1, ';'); - sal_Bool bGroupBy = sal_False; + bool bGroupBy = false; if ( sGroupFunctionName.equals(sFunctionName) ) // check if the function name is GROUP { - bGroupBy = sal_True; + bGroupBy = true; if ( !m_bGroupByUnRelated && !pEntry->IsVisible() ) { // we have to change the visblie flag, so we must append also an undo action - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); m_pVisibleCell->GetBox().Check(); appendUndoAction(g_strZero,g_strOne,BROW_VIS_ROW,bListAction); RowModified(GetBrowseRow(BROW_VIS_ROW), GetCurColumnId()); @@ -1150,7 +1150,7 @@ bool OSelectionBrowseBox::SaveModified() { OSQLWarningBox( this, aErrorMsg ).Execute(); } - bError = sal_True; + bError = true; } } else @@ -1159,7 +1159,7 @@ bool OSelectionBrowseBox::SaveModified() { OSQLWarningBox( this, aErrorMsg ).Execute(); } - bError = sal_True; + bError = true; } } } @@ -1167,7 +1167,7 @@ bool OSelectionBrowseBox::SaveModified() pEntry->SetCriteria(nIdx, aCrit); sNewValue = pEntry->GetCriteria(nIdx); if(!aCrit.isEmpty() && nRow >= (GetRowCount()-1)) - bAppendRow = sal_True; + bAppendRow = true; } } if(!bError && Controller()) @@ -1194,7 +1194,7 @@ bool OSelectionBrowseBox::SaveModified() if ( pEntry.is() && bWasEmpty && !pEntry->IsEmpty() && !bError ) { // Default to visible - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); appendUndoAction(g_strZero,g_strOne,BROW_VIS_ROW,bListAction); RowModified(BROW_VIS_ROW, GetCurColumnId()); @@ -1305,7 +1305,7 @@ void OSelectionBrowseBox::RemoveField(sal_uInt16 nColumnId ) invalidateUndoRedo(); } -void OSelectionBrowseBox::adjustSelectionMode( sal_Bool _bClickedOntoHeader, sal_Bool _bClickedOntoHandleCol ) +void OSelectionBrowseBox::adjustSelectionMode( bool _bClickedOntoHeader, bool _bClickedOntoHandleCol ) { // if a Header has been selected it should be shown otherwise not if ( _bClickedOntoHeader ) @@ -1337,8 +1337,8 @@ void OSelectionBrowseBox::MouseButtonDown(const BrowserMouseEvent& rEvt) { if( rEvt.IsLeft() ) { - sal_Bool bOnHandle = HANDLE_ID == rEvt.GetColumnId(); - sal_Bool bOnHeader = ( rEvt.GetRow() < 0 ) && !bOnHandle; + bool bOnHandle = HANDLE_ID == rEvt.GetColumnId(); + bool bOnHeader = ( rEvt.GetRow() < 0 ) && !bOnHandle; adjustSelectionMode( bOnHeader, bOnHandle ); } EditBrowseBox::MouseButtonDown(rEvt); @@ -1373,9 +1373,9 @@ sal_Int8 OSelectionBrowseBox::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) if ( IsEditing() ) { // allow the asterisk again - m_bDisableErrorBox = sal_True; + m_bDisableErrorBox = true; SaveModified(); - m_bDisableErrorBox = sal_False; + m_bDisableErrorBox = false; DeactivateCell(); } // check if the format is already supported, if not deactivate the current cell and try again @@ -1428,7 +1428,7 @@ void OSelectionBrowseBox::DeleteFields(const OUString& rAliasName) sal_uInt16 nColId = GetCurColumnId(); sal_uInt32 nRow = GetCurRow(); - sal_Bool bWasEditing = IsEditing(); + bool bWasEditing = IsEditing(); if (bWasEditing) DeactivateCell(); @@ -1451,7 +1451,7 @@ void OSelectionBrowseBox::DeleteFields(const OUString& rAliasName) void OSelectionBrowseBox::SetColWidth(sal_uInt16 nColId, long nNewWidth) { - sal_Bool bWasEditing = IsEditing(); + bool bWasEditing = IsEditing(); if (bWasEditing) DeactivateCell(); @@ -1518,7 +1518,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _n if ( nOldPosition > 0 && nOldPosition <= getFields().size() ) getFields()[nOldPosition - 1] = pEntry; - ColumnMoved(pEntry->GetColumnId(),sal_False); + ColumnMoved(pEntry->GetColumnId(),false); } if ( pEntry->GetFunctionType() & (FKT_AGGREGATE) ) @@ -1541,7 +1541,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _n invalidateUndoRedo(); } -OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition, sal_Bool bVis, sal_Bool bActivate) +OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition, bool bVis, bool bActivate) { OQueryTableWindow* pSourceWin = static_cast<OQueryTableWindow*>(jxdSource.pListBox->GetTabWin()); if (!pSourceWin) @@ -1565,7 +1565,7 @@ OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxd return InsertField(aInfo, _nColumnPosition, bVis, bActivate); } -OTableFieldDescRef OSelectionBrowseBox::InsertField(const OTableFieldDescRef& _rInfo, sal_uInt16 _nColumnPosition, sal_Bool bVis, sal_Bool bActivate) +OTableFieldDescRef OSelectionBrowseBox::InsertField(const OTableFieldDescRef& _rInfo, sal_uInt16 _nColumnPosition, bool bVis, bool bActivate) { if(m_nMaxColumns && m_nMaxColumns <= FieldsCount()) @@ -1665,7 +1665,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt { if ( pEntry->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) { - pEntry->SetGroupBy(sal_False); + pEntry->SetGroupBy(false); aIter = rFields.end(); break; } @@ -1675,7 +1675,7 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt { pEntry->SetGroupBy(rInfo->IsGroupBy()); if(!m_bGroupByUnRelated && pEntry->IsGroupBy()) - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); break; } } @@ -1685,9 +1685,9 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt if (aIter == rFields.end()) { - OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, sal_False, sal_False ); + OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, false, false ); if ( (pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy()) ) // the GroupBy is inherited from rInfo - pTmp->SetGroupBy(sal_False); + pTmp->SetGroupBy(false); } } @@ -1743,11 +1743,11 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const O pEntry->IsGroupBy() == rInfo->IsGroupBy() ) { if ( pEntry->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) - pEntry->SetGroupBy(sal_False); + pEntry->SetGroupBy(false); else { if(!m_bGroupByUnRelated && pEntry->IsGroupBy()) - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); } if (pEntry->GetCriteria(nLevel).isEmpty() ) { @@ -1790,9 +1790,9 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const O } else if (aIter == rFields.end()) { - OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, sal_False, sal_False ); + OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, false, false ); if ( pTmp->isNumericOrAggreateFunction() && rInfo->IsGroupBy() ) // the GroupBy was inherited from rInfo - pTmp->SetGroupBy(sal_False); + pTmp->SetGroupBy(false); if ( pTmp.is() ) { pTmp->SetCriteria( nLevel, rValue); @@ -1819,7 +1819,7 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData(); ::comphelper::UStringMixEqual bCase(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers()); - sal_Bool bAppend = sal_False; + bool bAppend = false; OTableFields& rFields = getFields(); OTableFields::iterator aIter = rFields.begin(); OTableFields::iterator aEnd = rFields.end(); @@ -1839,7 +1839,7 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde else { if ( !m_bOrderByUnRelated ) - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); pEntry->SetOrderDir( eDir ); m_nLastSortColumn = nPos; } @@ -1849,12 +1849,12 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde if (aIter == rFields.end()) { - OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, sal_False, sal_False ); + OTableFieldDescRef pTmp = InsertField(rInfo, BROWSER_INVALIDID, false, false ); if(pTmp.is()) { m_nLastSortColumn = pTmp->GetColumnId() - 1; if ( !m_bOrderByUnRelated && !bAppend ) - pTmp->SetVisible(sal_True); + pTmp->SetVisible(true); pTmp->SetOrderDir( eDir ); } } @@ -1865,9 +1865,9 @@ void OSelectionBrowseBox::ArrangeControls(sal_uInt16& nX, sal_uInt16 nY) EditBrowseBox::ArrangeControls(nX, nY); } -sal_Bool OSelectionBrowseBox::Save() +bool OSelectionBrowseBox::Save() { - sal_Bool bRet = sal_True; + bool bRet = true; if (IsModified()) bRet = SaveModified(); return bRet; @@ -1889,7 +1889,7 @@ void OSelectionBrowseBox::CellModified() pEntry->GetOrderDir() != ORDER_NONE) { m_pVisibleCell->GetBox().Check(); - pEntry->SetVisible(sal_True); + pEntry->SetVisible(true); } else pEntry->SetVisible(m_pVisibleCell->GetBox().IsChecked()); @@ -1951,7 +1951,7 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt) { if ( !IsColumnSelected( nColId ) ) { - adjustSelectionMode( sal_True /* clicked onto a header */ , sal_False /* not onto the handle col */ ); + adjustSelectionMode( true /* clicked onto a header */ , false /* not onto the handle col */ ); SelectColumnId( nColId ); } @@ -2015,17 +2015,17 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt) } } -sal_Bool OSelectionBrowseBox::IsRowVisible(sal_uInt16 _nWhich) const +bool OSelectionBrowseBox::IsRowVisible(sal_uInt16 _nWhich) const { OSL_ENSURE(_nWhich<(m_bVisibleRow.size()), "OSelectionBrowseBox::IsRowVisible : invalid parameter !"); return m_bVisibleRow[_nWhich]; } -void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, sal_Bool _bVis) +void OSelectionBrowseBox::SetRowVisible(sal_uInt16 _nWhich, bool _bVis) { OSL_ENSURE(_nWhich<m_bVisibleRow.size(), "OSelectionBrowseBox::SetRowVisible : invalid parameter !"); - sal_Bool bWasEditing = IsEditing(); + bool bWasEditing = IsEditing(); if (bWasEditing) DeactivateCell(); @@ -2161,9 +2161,9 @@ OUString OSelectionBrowseBox::GetCellText(long nRow, sal_uInt16 nColId) const return aText; } -sal_Bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString& rFkt) +bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString& rFkt) { - sal_Bool bErg=sal_True; + bool bErg=true; switch(_nFunctionTokenId) { case SQL_TOKEN_COUNT: @@ -2224,7 +2224,7 @@ sal_Bool OSelectionBrowseBox::GetFunctionName(sal_uInt32 _nFunctionTokenId, OUSt } } if(i == nCount-1) - bErg = sal_False; + bErg = false; } } @@ -2258,7 +2258,7 @@ OUString OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, sal_uInt16 n void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, const OUString& strNewText) { - sal_Bool bWasEditing = IsEditing() && (GetCurColumnId() == nColId) && IsRowVisible(static_cast<sal_uInt16>(nRow)) && (GetCurRow() == static_cast<sal_uInt16>(GetBrowseRow(nRow))); + bool bWasEditing = IsEditing() && (GetCurColumnId() == nColId) && IsRowVisible(static_cast<sal_uInt16>(nRow)) && (GetCurRow() == static_cast<sal_uInt16>(GetBrowseRow(nRow))); if (bWasEditing) DeactivateCell(); @@ -2294,10 +2294,10 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, con nFunctionType &= ~FKT_AGGREGATE; pEntry->SetFunctionType(nFunctionType); if ( pEntry->IsGroupBy() && !sGroupFunctionName.equalsIgnoreAsciiCase(strNewText) ) - pEntry->SetGroupBy(sal_False); + pEntry->SetGroupBy(false); if ( sGroupFunctionName.equalsIgnoreAsciiCase(strNewText) ) - pEntry->SetGroupBy(sal_True); + pEntry->SetGroupBy(true); else if ( !strNewText.isEmpty() ) { nFunctionType |= FKT_AGGREGATE; @@ -2314,7 +2314,7 @@ void OSelectionBrowseBox::SetCellContents(sal_Int32 nRow, sal_uInt16 nColId, con // the appropriate field-description is now empty -> set Visible to sal_False (now it is consistent to normal empty rows) if (pEntry->IsEmpty()) - pEntry->SetVisible(sal_False); + pEntry->SetVisible(false); if (bWasEditing) ActivateCell(nCellIndex, nColId); @@ -2381,9 +2381,9 @@ sal_uInt16 OSelectionBrowseBox::GetDefaultColumnWidth(const OUString& /*rName*/) return static_cast<sal_uInt16>(DEFAULT_SIZE); } -sal_Bool OSelectionBrowseBox::isCutAllowed() +bool OSelectionBrowseBox::isCutAllowed() { - sal_Bool bCutAllowed = sal_False; + bool bCutAllowed = false; long nRow = GetRealRow(GetCurRow()); switch (nRow) { @@ -2438,9 +2438,9 @@ void OSelectionBrowseBox::paste() invalidateUndoRedo(); } -sal_Bool OSelectionBrowseBox::isPasteAllowed() +bool OSelectionBrowseBox::isPasteAllowed() { - sal_Bool bPasteAllowed = sal_True; + bool bPasteAllowed = true; long nRow = GetRealRow(GetCurRow()); switch (nRow) { @@ -2448,13 +2448,13 @@ sal_Bool OSelectionBrowseBox::isPasteAllowed() case BROW_ORDER_ROW: case BROW_TABLE_ROW: case BROW_FUNCTION_ROW: - bPasteAllowed = sal_False; + bPasteAllowed = false; break; } return bPasteAllowed; } -sal_Bool OSelectionBrowseBox::isCopyAllowed() +bool OSelectionBrowseBox::isCopyAllowed() { return isCutAllowed(); } @@ -2472,13 +2472,13 @@ void OSelectionBrowseBox::copy() } } -void OSelectionBrowseBox::appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow,sal_Bool& _bListAction) +void OSelectionBrowseBox::appendUndoAction(const OUString& _rOldValue, const OUString& _rNewValue, sal_Int32 _nRow, bool& _bListAction) { if ( !m_bInUndoMode && _rNewValue != _rOldValue ) { if ( !_bListAction ) { - _bListAction = sal_True; + _bListAction = true; static_cast<OQueryController&>(getDesignView()->getController()).GetUndoManager().EnterListAction(OUString(),OUString()); } appendUndoAction(_rOldValue,_rNewValue,_nRow); @@ -2510,14 +2510,14 @@ IMPL_LINK_NOARG(OSelectionBrowseBox, OnInvalidateTimer) void OSelectionBrowseBox::stopTimer() { - m_bStopTimer = sal_True; + m_bStopTimer = true; if (m_timerInvalidate.IsActive()) m_timerInvalidate.Stop(); } void OSelectionBrowseBox::startTimer() { - m_bStopTimer = sal_False; + m_bStopTimer = false; if (!m_timerInvalidate.IsActive()) m_timerInvalidate.Start(); } @@ -2530,7 +2530,7 @@ OTableFields& OSelectionBrowseBox::getFields() const void OSelectionBrowseBox::enableControl(const OTableFieldDescRef& _rEntry,Window* _pControl) { - sal_Bool bEnable = !_rEntry->isCondition(); + bool bEnable = !_rEntry->isCondition(); _pControl->Enable(bEnable); _pControl->EnableInput(bEnable); } @@ -2585,9 +2585,9 @@ void OSelectionBrowseBox::GetFocus() void OSelectionBrowseBox::DeactivateCell(bool _bUpdate) { - m_bWasEditing = sal_True; + m_bWasEditing = true; EditBrowseBox::DeactivateCell(_bUpdate); - m_bWasEditing = sal_False; + m_bWasEditing = false; } OUString OSelectionBrowseBox::GetRowDescription( sal_Int32 _nRow ) const @@ -2614,9 +2614,9 @@ OUString OSelectionBrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBo return sRetText; } -sal_Bool OSelectionBrowseBox::fillEntryTable(OTableFieldDescRef& _pEntry,const OUString& _sTableName) +bool OSelectionBrowseBox::fillEntryTable(OTableFieldDescRef& _pEntry,const OUString& _sTableName) { - sal_Bool bRet = sal_False; + bool bRet = false; OJoinTableView::OTableWindowMap* pTabWinList = getDesignView()->getTableView()->GetTabWinMap(); if (pTabWinList) { @@ -2628,7 +2628,7 @@ sal_Bool OSelectionBrowseBox::fillEntryTable(OTableFieldDescRef& _pEntry,const O { _pEntry->SetTable(pEntryTab->GetTableName()); _pEntry->SetTabWindow(pEntryTab); - bRet = sal_True; + bRet = true; } } } @@ -2672,7 +2672,7 @@ void OSelectionBrowseBox::setFunctionCell(OTableFieldDescRef& _pEntry) else { // only COUNT(*) and COUNT("table".*) allowed - sal_Bool bCountRemoved = !isFieldNameAsterisk(_pEntry->GetField()); + bool bCountRemoved = !isFieldNameAsterisk(_pEntry->GetField()); if ( bCountRemoved ) m_pFunctionCell->RemoveEntry(1); diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx index e42bed965e13..e42c24ee5507 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx @@ -70,20 +70,20 @@ namespace dbaui OUString m_aFunctionStrings; sal_uInt16 m_nVisibleCount; // maximum number of visible rows sal_uInt32 m_nLastSortColumn; // index of last (highest) sort column - sal_Bool m_bOrderByUnRelated; - sal_Bool m_bGroupByUnRelated; - sal_Bool m_bStopTimer; - sal_Bool m_bWasEditing; - sal_Bool m_bDisableErrorBox; - sal_Bool m_bInUndoMode; + bool m_bOrderByUnRelated; + bool m_bGroupByUnRelated; + bool m_bStopTimer; + bool m_bWasEditing; + bool m_bDisableErrorBox; + bool m_bInUndoMode; DECL_LINK(OnInvalidateTimer, void*); public: OSelectionBrowseBox( Window* pParent ); virtual ~OSelectionBrowseBox(); void initialize(); - OTableFieldDescRef InsertField( const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, sal_Bool bVis=sal_True, sal_Bool bActivate=sal_True ); - OTableFieldDescRef InsertField( const OTableFieldDescRef& rInfo, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, sal_Bool bVis=sal_True, sal_Bool bActivate=sal_True ); + OTableFieldDescRef InsertField( const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, bool bVis=true, bool bActivate=true ); + OTableFieldDescRef InsertField( const OTableFieldDescRef& rInfo, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, bool bVis=true, bool bActivate=true ); void InsertColumn( OTableFieldDescRef pEntry, sal_uInt16& _nColumnPosition ); void RemoveColumn( sal_uInt16 _nColumnId ); void DeleteFields( const OUString& rAliasName ); @@ -101,7 +101,7 @@ namespace dbaui void AddOrder(const OTableFieldDescRef& rInfo, const EOrderDir eDir, sal_uInt32 _nCurrentPos); void ClearAll(); OTableFieldDescRef AppendNewCol( sal_uInt16 nCnt=1 ); - sal_Bool Save(); + bool Save(); OQueryDesignView* getDesignView(); OQueryDesignView* getDesignView() const; sal_uInt16 FieldsCount(); @@ -114,35 +114,35 @@ namespace dbaui // cell content (formatted as string) set/return sal_Int32 GetNoneVisibleRows() const; void SetNoneVisbleRow(long nRows); - sal_Bool IsRowVisible(sal_uInt16 _nWhich) const; - void SetRowVisible(sal_uInt16 _nWhich, sal_Bool _bVis); + bool IsRowVisible(sal_uInt16 _nWhich) const; + void SetRowVisible(sal_uInt16 _nWhich, bool _bVis); - void SetReadOnly(sal_Bool bRO); + void SetReadOnly(bool bRO); // calculate an optimal size. Basically, this takes into account the number of visible rows. Size CalcOptimalSize( const Size& _rAvailable ); // can the current content be cut - sal_Bool isPasteAllowed(); - sal_Bool isCutAllowed(); - sal_Bool isCopyAllowed(); + bool isPasteAllowed(); + bool isCutAllowed(); + bool isCopyAllowed(); void cut(); void paste(); void copy(); virtual void GetFocus() SAL_OVERRIDE; virtual void DeactivateCell(bool bUpdate = true) SAL_OVERRIDE; - virtual void ColumnMoved( sal_uInt16 nColId ) SAL_OVERRIDE { ColumnMoved(nColId,sal_True); } - void ColumnMoved( sal_uInt16 nColId,sal_Bool _bCreateUndo); + virtual void ColumnMoved( sal_uInt16 nColId ) SAL_OVERRIDE { ColumnMoved(nColId,true); } + void ColumnMoved( sal_uInt16 nColId, bool _bCreateUndo); void Fill(); void PreFill(); /** Disables the generation of undo actions */ - inline void EnterUndoMode() { m_bInUndoMode = sal_True; } + inline void EnterUndoMode() { m_bInUndoMode = true; } /** Enables the generation of undo actions */ - inline void LeaveUndoMode() { m_bInUndoMode = sal_False; } + inline void LeaveUndoMode() { m_bInUndoMode = false; } /** GetCellText returns the text at the given position @param _nRow @@ -225,8 +225,8 @@ namespace dbaui Rectangle GetInvalidRect( sal_uInt16 nColId ); long GetRealRow(long nRow) const; long GetBrowseRow(long nRowId) const; - sal_Bool GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString& rFkt); - void appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow,sal_Bool& _bListAction); + bool GetFunctionName(sal_uInt32 _nFunctionTokenId, OUString& rFkt); + void appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow, bool& _bListAction); void appendUndoAction(const OUString& _rOldValue,const OUString& _rNewValue,sal_Int32 _nRow); OTableFields& getFields() const; void enableControl(const OTableFieldDescRef& _rEntry,Window* _pControl); @@ -234,7 +234,7 @@ namespace dbaui void invalidateUndoRedo(); OTableFieldDescRef getEntry(OTableFields::size_type _nPos); - void adjustSelectionMode( sal_Bool _bClickedOntoHeader, sal_Bool _bClickedOntoHandleCol ); + void adjustSelectionMode( bool _bClickedOntoHeader, bool _bClickedOntoHandleCol ); /** save the filed change in save modified @param _sFieldName @@ -246,7 +246,7 @@ namespace dbaui @return <TRUE/> if an error occurred otherwise <FALSE/> */ - sal_Bool saveField(OUString& _sFieldName, OTableFieldDescRef& _pEntry, sal_Bool& _bListAction); + bool saveField(OUString& _sFieldName, OTableFieldDescRef& _pEntry, bool& _bListAction); /** sets the table window at the _pEntry @param _pEntry @@ -256,7 +256,7 @@ namespace dbaui @return <TRUE/> if the table name was set otherwise <FALSE/> */ - sal_Bool fillEntryTable(OTableFieldDescRef& _pEntry,const OUString& _sTableName); + bool fillEntryTable(OTableFieldDescRef& _pEntry,const OUString& _sTableName); /** uses the parse node to fill all information into the field @param _pColumnRef @@ -270,15 +270,15 @@ namespace dbaui @return <TRUE/> if an error occurred otherwise <FALSE/> */ - sal_Bool fillColumnRef( const ::connectivity::OSQLParseNode* _pColumnRef, + bool fillColumnRef( const ::connectivity::OSQLParseNode* _pColumnRef, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, OTableFieldDescRef& _pEntry, - sal_Bool& _bListAction); - sal_Bool fillColumnRef( const OUString& _sColumnName, + bool& _bListAction); + bool fillColumnRef( const OUString& _sColumnName, const OUString& _sTableRange, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _xMetaData, OTableFieldDescRef& _pEntry, - sal_Bool& _bListAction); + bool& _bListAction); /** append an undo action for the table field @param _sOldAlias @@ -288,7 +288,7 @@ namespace dbaui @param _bListAction Will be set to <TRUE/> when we are in a list action otherwise <FALSE/> */ - void notifyTableFieldChanged(const OUString& _sOldAlias,const OUString& _sAlias,sal_Bool& _bListAction,sal_uInt16 _nColumnId); + void notifyTableFieldChanged(const OUString& _sOldAlias,const OUString& _sAlias, bool& _bListAction,sal_uInt16 _nColumnId); /** append an undo action for the function field @param _sOldFunctionName @@ -298,7 +298,7 @@ namespace dbaui @param _bListAction Will be set to <TRUE/> when we are in a list action otherwise <FALSE/> */ - void notifyFunctionFieldChanged(const OUString& _sOldFunctionName,const OUString& _sFunctionName,sal_Bool& _bListAction,sal_uInt16 _nColumnId); + void notifyFunctionFieldChanged(const OUString& _sOldFunctionName,const OUString& _sFunctionName, bool& _bListAction,sal_uInt16 _nColumnId); /** clears the function fields of the submitted entry if it doesn't match the SQL standard and append an undo action. E.q. AGGREGATE functions are only valid when the field name isn't an asterisk @@ -309,7 +309,7 @@ namespace dbaui @param _bListAction When <TRUE/> an list action will be created. */ - void clearEntryFunctionField(const OUString& _sFieldName,OTableFieldDescRef& _pEntry,sal_Bool& _bListAction,sal_uInt16 _nColumnId); + void clearEntryFunctionField(const OUString& _sFieldName,OTableFieldDescRef& _pEntry, bool& _bListAction,sal_uInt16 _nColumnId); /** remove or insert the necessary function types @param _pEntry diff --git a/dbaccess/source/ui/querydesign/TableConnection.cxx b/dbaccess/source/ui/querydesign/TableConnection.cxx index 59351429d11b..a6ebfbb2beed 100644 --- a/dbaccess/source/ui/querydesign/TableConnection.cxx +++ b/dbaccess/source/ui/querydesign/TableConnection.cxx @@ -37,7 +37,7 @@ namespace dbaui :Window(_pContainer) ,m_pData( _pTabConnData ) ,m_pParent( _pContainer ) - ,m_bSelected( sal_False ) + ,m_bSelected( false ) { Init(); Show(); @@ -137,17 +137,17 @@ namespace dbaui void OTableConnection::Select() { - m_bSelected = sal_True; + m_bSelected = true; m_pParent->Invalidate( GetBoundingRect(), INVALIDATE_NOCHILDREN); } void OTableConnection::Deselect() { - m_bSelected = sal_False; + m_bSelected = false; InvalidateConnection(); } - sal_Bool OTableConnection::CheckHit( const Point& rMousePos ) const + bool OTableConnection::CheckHit( const Point& rMousePos ) const { // check if the point hit our line ::std::vector<OConnectionLine*>::const_iterator aIter = ::std::find_if(m_vConnLine.begin(), diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx index d5a7f54b91b6..fe9a3a8e040f 100644 --- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx +++ b/dbaccess/source/ui/querydesign/TableConnectionData.cxx @@ -87,10 +87,10 @@ OTableConnectionData& OTableConnectionData::operator=( const OTableConnectionDat return *this; } -sal_Bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const OUString& rSourceFieldName, const OUString& rDestFieldName ) +bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const OUString& rSourceFieldName, const OUString& rDestFieldName ) { if (sal_uInt16(m_vConnLineData.size()) < nIndex) - return sal_False; + return false; // == still allowed, this correponds to a Append @@ -103,10 +103,10 @@ sal_Bool OTableConnectionData::SetConnLine( sal_uInt16 nIndex, const OUString& r pConnLineData->SetSourceFieldName( rSourceFieldName ); pConnLineData->SetDestFieldName( rDestFieldName ); - return sal_True; + return true; } -sal_Bool OTableConnectionData::AppendConnLine( const OUString& rSourceFieldName, const OUString& rDestFieldName ) +bool OTableConnectionData::AppendConnLine( const OUString& rSourceFieldName, const OUString& rDestFieldName ) { OConnectionLineDataVec::iterator aIter = m_vConnLineData.begin(); OConnectionLineDataVec::iterator aEnd = m_vConnLineData.end(); @@ -119,11 +119,11 @@ sal_Bool OTableConnectionData::AppendConnLine( const OUString& rSourceFieldName, { OConnectionLineDataRef pNew = new OConnectionLineData(rSourceFieldName, rDestFieldName); if (!pNew.is()) - return sal_False; + return false; m_vConnLineData.push_back(pNew); } - return sal_True; + return true; } void OTableConnectionData::ResetConnLines() diff --git a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx index 5bef6767e6a8..564ef78c91f3 100644 --- a/dbaccess/source/ui/querydesign/TableFieldDescription.cxx +++ b/dbaccess/source/ui/querydesign/TableFieldDescription.cxx @@ -39,8 +39,8 @@ OTableFieldDesc::OTableFieldDesc() ,m_nIndex(0) ,m_nColWidth(0) ,m_nColumnId((sal_uInt16)-1) - ,m_bGroupBy(sal_False) - ,m_bVisible(sal_False) + ,m_bGroupBy(false) + ,m_bVisible(false) { } @@ -60,8 +60,8 @@ OTableFieldDesc::OTableFieldDesc(const OUString& rT, const OUString& rF ) ,m_nIndex(0) ,m_nColWidth(0) ,m_nColumnId((sal_uInt16)-1) - ,m_bGroupBy(sal_False) - ,m_bVisible(sal_False) + ,m_bGroupBy(false) + ,m_bVisible(false) { SetField( rF ); SetTable( rT ); } @@ -95,7 +95,7 @@ OTableFieldDesc& OTableFieldDesc::operator=( const OTableFieldDesc& rRS ) return *this; } -sal_Bool OTableFieldDesc::operator==( const OTableFieldDesc& rDesc ) +bool OTableFieldDesc::operator==( const OTableFieldDesc& rDesc ) { return ( m_eOrderDir != rDesc.GetOrderDir() || diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index b0e7fea3ef51..56efb9f631a1 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -75,7 +75,7 @@ OTableWindow::OTableWindow( Window* pParent, const TTableWindowData::value_type& ,m_nMoveCount(0) ,m_nMoveIncrement(1) ,m_nSizingFlags( SIZING_NONE ) - ,m_bActive( sal_False ) + ,m_bActive( false ) { // Set position and size @@ -158,7 +158,7 @@ OTableWindowListBox* OTableWindow::CreateListBox() return new OTableWindowListBox(this); } -sal_Bool OTableWindow::FillListBox() +bool OTableWindow::FillListBox() { m_pListBox->Clear(); if ( !m_pContainerListener.is() ) @@ -217,7 +217,7 @@ sal_Bool OTableWindow::FillListBox() OSL_FAIL("Exception occurred!"); } - return sal_True; + return true; } void* OTableWindow::createUserData(const Reference< XPropertySet>& /*_xColumn*/,bool /*_bPrimaryKey*/) @@ -265,7 +265,7 @@ void OTableWindow::impl_updateImage() m_aTypeImage.Show(); } -sal_Bool OTableWindow::Init() +bool OTableWindow::Init() { // create list box if necessary if ( !m_pListBox ) @@ -283,7 +283,7 @@ sal_Bool OTableWindow::Init() // add the fields to the ListBox clearListBox(); - sal_Bool bSuccess = FillListBox(); + bool bSuccess = FillListBox(); if ( bSuccess ) m_pListBox->SelectAll( false ); @@ -474,7 +474,7 @@ void OTableWindow::Resize() Window::Invalidate(); } -void OTableWindow::SetBoldTitle( sal_Bool bBold ) +void OTableWindow::SetBoldTitle( bool bBold ) { Font aFont = m_aTitle.GetFont(); aFont.SetWeight( bBold?WEIGHT_BOLD:WEIGHT_NORMAL ); @@ -490,7 +490,7 @@ void OTableWindow::GetFocus() m_pListBox->GrabFocus(); } -void OTableWindow::setActive(sal_Bool _bActive) +void OTableWindow::setActive(bool _bActive) { SetBoldTitle( _bActive ); m_bActive = _bActive; @@ -506,24 +506,24 @@ void OTableWindow::Remove() pTabWinCont->Invalidate(); } -sal_Bool OTableWindow::HandleKeyInput( const KeyEvent& rEvt ) +bool OTableWindow::HandleKeyInput( const KeyEvent& rEvt ) { const KeyCode& rCode = rEvt.GetKeyCode(); sal_uInt16 nCode = rCode.GetCode(); - sal_Bool bShift = rCode.IsShift(); - sal_Bool bCtrl = rCode.IsMod1(); + bool bShift = rCode.IsShift(); + bool bCtrl = rCode.IsMod1(); - sal_Bool bHandle = sal_False; + bool bHandle = false; if( !bCtrl && !bShift && (nCode==KEY_DELETE) ) { Remove(); - bHandle = sal_True; + bHandle = true; } return bHandle; } -sal_Bool OTableWindow::ExistsAConn() const +bool OTableWindow::ExistsAConn() const { return getTableView()->ExistsAConn(this); } @@ -609,7 +609,7 @@ void OTableWindow::Command(const CommandEvent& rEvt) bool OTableWindow::PreNotify(NotifyEvent& rNEvt) { - sal_Bool bHandled = sal_False; + bool bHandled = false; switch (rNEvt.GetType()) { case EVENT_KEYINPUT: @@ -631,19 +631,19 @@ bool OTableWindow::PreNotify(NotifyEvent& rNEvt) switch( rCode.GetCode() ) { case KEY_DOWN: - bHandled = sal_True; + bHandled = true; aStartPoint.Y() += m_nMoveIncrement; break; case KEY_UP: - bHandled = sal_True; + bHandled = true; aStartPoint.Y() += -m_nMoveIncrement; break; case KEY_LEFT: - bHandled = sal_True; + bHandled = true; aStartPoint.X() += -m_nMoveIncrement; break; case KEY_RIGHT: - bHandled = sal_True; + bHandled = true; aStartPoint.X() += m_nMoveIncrement; break; } diff --git a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx index 623aa9b612cf..0585bdb52a04 100644 --- a/dbaccess/source/ui/querydesign/TableWindowAccess.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowAccess.cxx @@ -235,7 +235,7 @@ namespace dbaui } return AccessibleRelation(); } - sal_Bool OTableWindowAccess::isEditable() const + bool OTableWindowAccess::isEditable() const { return m_pTable && !m_pTable->getTableView()->getDesignView()->getController().isReadOnly(); } diff --git a/dbaccess/source/ui/querydesign/TableWindowData.cxx b/dbaccess/source/ui/querydesign/TableWindowData.cxx index 2c4eb37c5c6a..0d6607b05957 100644 --- a/dbaccess/source/ui/querydesign/TableWindowData.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowData.cxx @@ -46,7 +46,7 @@ OTableWindowData::OTableWindowData( const Reference< XPropertySet>& _xTable ,m_sComposedName(_rComposedName) ,m_aPosition( Point(-1,-1) ) ,m_aSize( Size(-1,-1) ) - ,m_bShowAll( sal_True ) + ,m_bShowAll( true ) ,m_bIsQuery(false) ,m_bIsValid(true) { @@ -63,12 +63,12 @@ OTableWindowData::~OTableWindowData() stopComponentListening( xComponent ); } -sal_Bool OTableWindowData::HasPosition() const +bool OTableWindowData::HasPosition() const { return ( (m_aPosition.X() != -1) && (m_aPosition.Y() != -1) ); } -sal_Bool OTableWindowData::HasSize() const +bool OTableWindowData::HasSize() const { return ( (m_aSize.Width() != -1) && (m_aSize.Height() !=-1) ); } diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index edec47ca2245..6421b79c7cf1 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -46,7 +46,7 @@ OTableWindowListBox::OTableWindowListBox( OTableWindow* pParent ) ,m_pTabWin( pParent ) ,m_nDropEvent(0) ,m_nUiEvent(0) - ,m_bReallyScrolled( sal_False ) + ,m_bReallyScrolled( false ) { m_aScrollTimer.SetTimeout( SCROLLING_TIMESPAN ); SetDoubleClickHdl( LINK(this, OTableWindowListBox, OnDoubleClick) ); @@ -85,7 +85,7 @@ SvTreeListEntry* OTableWindowListBox::GetEntryFromText( const OUString& rEntryTe OJoinDesignView* pView = m_pTabWin->getDesignView(); OJoinController& rController = pView->getController(); - sal_Bool bCase = sal_False; + bool bCase = false; try { Reference<XConnection> xConnection = rController.getConnection(); @@ -113,7 +113,7 @@ SvTreeListEntry* OTableWindowListBox::GetEntryFromText( const OUString& rEntryTe void OTableWindowListBox::NotifyScrolled() { - m_bReallyScrolled = sal_True; + m_bReallyScrolled = true; } void OTableWindowListBox::NotifyEndScroll() @@ -124,12 +124,12 @@ void OTableWindowListBox::NotifyEndScroll() // without INVALIDATE_NOCHILDREN all tables would be redrawn, // so: flickering - m_bReallyScrolled = sal_False; + m_bReallyScrolled = false; } bool OTableWindowListBox::PreNotify(NotifyEvent& rNEvt) { - sal_Bool bHandled = sal_False; + bool bHandled = false; switch (rNEvt.GetType()) { case EVENT_KEYINPUT: @@ -197,7 +197,7 @@ void OTableWindowListBox::StartDrag( sal_Int8 /*nAction*/, const Point& /*rPosPi if (!pCont->getDesignView()->getController().isReadOnly() && pCont->getDesignView()->getController().isConnected()) { // asterisk was not allowed to be copied to selection browsebox - sal_Bool bFirstNotAllowed = FirstSelected() == First() && m_pTabWin->GetData()->IsShowAll(); + bool bFirstNotAllowed = FirstSelected() == First() && m_pTabWin->GetData()->IsShowAll(); EndSelection(); // create a description of the source OJoinExchangeData jxdSource(this); @@ -317,7 +317,7 @@ sal_Int8 OTableWindowListBox::ExecuteDrop( const ExecuteDropEvent& _rEvt ) void OTableWindowListBox::LoseFocus() { if(m_pTabWin) - m_pTabWin->setActive(sal_False); + m_pTabWin->setActive(false); SvTreeListBox::LoseFocus(); } diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx index aeb31373b0e7..87713caab9b5 100644 --- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx +++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx @@ -157,7 +157,7 @@ namespace dbaui } bool OQueryContainerWindow::PreNotify( NotifyEvent& rNEvt ) { - sal_Bool bHandled = sal_False; + bool bHandled = false; switch (rNEvt.GetType()) { case EVENT_GETFOCUS: diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 65a64ee564f3..62da7c841261 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -253,7 +253,7 @@ using namespace ::comphelper; namespace { - void ensureToolbars( OQueryController& _rController, sal_Bool _bDesign ) + void ensureToolbars( OQueryController& _rController, bool _bDesign ) { Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager = _rController.getLayoutManager( _rController.getFrame() ); if ( xLayoutManager.is() ) @@ -335,12 +335,12 @@ OQueryController::OQueryController(const Reference< XComponentContext >& _rM) ,m_nVisibleRows(0x400) ,m_nSplitPos(-1) ,m_nCommandType( CommandType::QUERY ) - ,m_bGraphicalDesign(sal_False) - ,m_bDistinct(sal_False) - ,m_bViewAlias(sal_False) - ,m_bViewTable(sal_False) - ,m_bViewFunction(sal_False) - ,m_bEscapeProcessing(sal_True) + ,m_bGraphicalDesign(false) + ,m_bDistinct(false) + ,m_bViewAlias(false) + ,m_bViewTable(false) + ,m_bViewFunction(false) + ,m_bEscapeProcessing(true) { InvalidateAll(); @@ -880,7 +880,7 @@ void OQueryController::impl_initialize() m_nCommandType = CommandType::QUERY; } - sal_Bool bCreateView( sal_False ); + bool bCreateView( false ); if ( rArguments.get_ensureType( "CreateView", bCreateView ) && bCreateView ) { OSL_FAIL( "OQueryController::impl_initialize: CurrentQuery is regognized for compatibility only!" ); @@ -912,7 +912,7 @@ void OQueryController::impl_initialize() } // more legacy parameters - sal_Bool bGraphicalDesign( sal_True ); + bool bGraphicalDesign( true ); if ( rArguments.get_ensureType( (OUString)PROPERTY_QUERYDESIGNVIEW, bGraphicalDesign ) ) { OSL_FAIL( "OQueryController::impl_initialize: QueryDesignView is regognized for compatibility only!" ); @@ -963,7 +963,7 @@ void OQueryController::impl_initialize() if ( !ensureConnected( false ) ) { // we have no connection so what else should we do - m_bGraphicalDesign = sal_False; + m_bGraphicalDesign = false; if ( editingView() ) { connectionLostMessage(); @@ -982,7 +982,7 @@ void OQueryController::impl_initialize() if ( !xViews.is() ) { // we can't create views so we ask if the user wants to create a query instead m_nCommandType = CommandType::QUERY; - sal_Bool bClose = sal_False; + bool bClose = false; { OUString aTitle( ModuleRes( STR_QUERYDESIGN_NO_VIEW_SUPPORT ) ); OUString aMessage( ModuleRes( STR_QUERYDESIGN_NO_VIEW_ASK ) ); @@ -1057,7 +1057,7 @@ void OQueryController::impl_initialize() DBG_UNHANDLED_EXCEPTION(); // we caught an exception so we switch to text only mode { - m_bGraphicalDesign = sal_False; + m_bGraphicalDesign = false; getContainer()->initialize(); ODataView* pWindow = getView(); OSQLMessageBox(pWindow,e).Execute(); @@ -1193,7 +1193,7 @@ void OQueryController::reconnect(bool _bUI) { if(m_bGraphicalDesign) { - m_bGraphicalDesign = sal_False; + m_bGraphicalDesign = false; // don't call Execute(SQL) because this changes the sql statement impl_setViewMode( NULL ); } @@ -1373,18 +1373,18 @@ void OQueryController::executeQuery() } } -sal_Bool OQueryController::askForNewName(const Reference<XNameAccess>& _xElements,sal_Bool _bSaveAs) +bool OQueryController::askForNewName(const Reference<XNameAccess>& _xElements, bool _bSaveAs) { OSL_ENSURE( !editingCommand(), "OQueryController::askForNewName: not to be called when designing an independent statement!" ); if ( editingCommand() ) - return sal_False; + return false; OSL_PRECOND( _xElements.is(), "OQueryController::askForNewName: invalid container!" ); if ( !_xElements.is() ) - return sal_False; + return false; - sal_Bool bRet = sal_True; - sal_Bool bNew = _bSaveAs || !_xElements->hasByName( m_sName ); + bool bRet = true; + bool bNew = _bSaveAs || !_xElements->hasByName( m_sName ); if(bNew) { OUString aDefaultName; @@ -1421,7 +1421,7 @@ sal_Bool OQueryController::askForNewName(const Reference<XNameAccess>& _xElement return bRet; } -bool OQueryController::doSaveAsDoc(sal_Bool _bSaveAs) +bool OQueryController::doSaveAsDoc(bool _bSaveAs) { OSL_ENSURE(isEditable(),"Slot ID_BROWSER_SAVEDOC should not be enabled!"); if ( !editingCommand() && !haveDataSource() ) @@ -1806,7 +1806,7 @@ short OQueryController::saveModified() nRet = aQry.Execute(); if ( ( nRet == RET_YES ) - && !doSaveAsDoc( sal_False ) + && !doSaveAsDoc( false ) ) { nRet = RET_CANCEL; @@ -1835,7 +1835,7 @@ void OQueryController::impl_reset( const bool i_bForceCurrentControllerSettings xProp->getPropertyValue( PROPERTY_COMMAND ) >>= sNewStatement; setStatement_fireEvent( sNewStatement ); - sal_Bool bNewEscapeProcessing( sal_True ); + bool bNewEscapeProcessing( true ); if ( editingQuery() ) { xProp->getPropertyValue( PROPERTY_ESCAPE_PROCESSING ) >>= bNewEscapeProcessing; @@ -1923,10 +1923,10 @@ void OQueryController::impl_reset( const bool i_bForceCurrentControllerSettings if ( bError ) { - m_bGraphicalDesign = sal_False; + m_bGraphicalDesign = false; if ( editingView() ) // if we're editing a view whose statement could not be parsed, default to "no escape processing" - setEscapeProcessing_fireEvent( sal_False ); + setEscapeProcessing_fireEvent( false ); } } } @@ -1956,7 +1956,7 @@ void OQueryController::setStatement_fireEvent( const OUString& _rNewStatement, b fire( &nHandle, &aNewValue, &aOldValue, 1, sal_False ); } -void OQueryController::setEscapeProcessing_fireEvent( const sal_Bool _bEscapeProcessing ) +void OQueryController::setEscapeProcessing_fireEvent( const bool _bEscapeProcessing ) { if ( _bEscapeProcessing == m_bEscapeProcessing ) return; @@ -1988,7 +1988,7 @@ bool OQueryController::allowQueries() const const NamedValueCollection& rArguments( getInitParams() ); sal_Int32 nCommandType = rArguments.getOrDefault( (OUString)PROPERTY_COMMAND_TYPE, (sal_Int32)CommandType::QUERY ); - sal_Bool bCreatingView = ( nCommandType == CommandType::TABLE ); + bool bCreatingView = ( nCommandType == CommandType::TABLE ); return !bCreatingView; } diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx index c6e90f2cff45..b655a9b72ae4 100644 --- a/dbaccess/source/ui/querydesign/querydlg.cxx +++ b/dbaccess/source/ui/querydesign/querydlg.cxx @@ -45,7 +45,7 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent, const TTableConnectionData::value_type& _pData, OJoinTableView::OTableWindowMap* _pTableMap, const Reference< XConnection >& _xConnection, - sal_Bool _bAllowTableSelect) + bool _bAllowTableSelect) : ModalDialog( pParent, "JoinDialog", "dbaccess/ui/joindialog.ui" ) , m_pTableControl( NULL ) , m_pTableMap(_pTableMap) @@ -81,7 +81,7 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent, m_pTableControl->lateUIInit(); - sal_Bool bSupportFullJoin = sal_False; + bool bSupportFullJoin = false; Reference<XDatabaseMetaData> xMeta; try { @@ -92,7 +92,7 @@ DlgQryJoin::DlgQryJoin( OQueryTableView * pParent, catch(SQLException&) { } - sal_Bool bSupportOuterJoin = sal_False; + bool bSupportOuterJoin = false; try { if ( xMeta.is() ) @@ -153,13 +153,13 @@ IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ ) sal_uInt16 nResId = 0; const sal_uInt16 nPos = m_pLB_JoinType->GetSelectEntryPos(); const sal_IntPtr nJoinType = reinterpret_cast<sal_IntPtr>(m_pLB_JoinType->GetEntryData(nPos)); - sal_Bool bAddHint = sal_True; + bool bAddHint = true; switch ( nJoinType ) { default: case ID_INNER_JOIN: nResId = STR_QUERY_INNER_JOIN; - bAddHint = sal_False; + bAddHint = false; eJoinType = INNER_JOIN; break; case ID_LEFT_JOIN: @@ -237,7 +237,7 @@ IMPL_LINK( DlgQryJoin, OKClickHdl, Button*, /*pButton*/ ) IMPL_LINK( DlgQryJoin, NaturalToggleHdl, CheckBox*, /*pButton*/ ) { - sal_Bool bChecked = m_pCBNatural->IsChecked(); + bool bChecked = m_pCBNatural->IsChecked(); static_cast<OQueryTableConnectionData*>(m_pConnData.get())->setNatural(bChecked); m_pTableControl->enableRelation(!bChecked); if ( bChecked ) diff --git a/dbaccess/source/ui/querydesign/querydlg.hxx b/dbaccess/source/ui/querydesign/querydlg.hxx index 18e2b8348a7f..6dd08572502c 100644 --- a/dbaccess/source/ui/querydesign/querydlg.hxx +++ b/dbaccess/source/ui/querydesign/querydlg.hxx @@ -67,7 +67,7 @@ namespace dbaui const TTableConnectionData::value_type& pData, OJoinTableView::OTableWindowMap* _pTableMap, const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _xConnection, - sal_Bool _bAllowTableSelect); + bool _bAllowTableSelect); virtual ~DlgQryJoin(); EJoinType GetJoinType() const { return eJoinType; }; |