From 436cd900956b5fd0b6583954c002f8c28ca32698 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 24 Mar 2014 15:42:28 +0200 Subject: svtools: sal_Bool->bool Change-Id: Ifd3e643dbc6755839ad4af73ae141fd115ddb4f4 --- dbaccess/source/ui/app/AppDetailPageHelper.cxx | 14 +++++++------- dbaccess/source/ui/app/AppDetailView.cxx | 2 +- dbaccess/source/ui/browser/unodatbr.cxx | 6 +++--- dbaccess/source/ui/control/dbtreelistbox.cxx | 10 +++++----- dbaccess/source/ui/control/tabletree.cxx | 10 +++++----- dbaccess/source/ui/dlg/indexdialog.cxx | 13 +++++++------ dbaccess/source/ui/inc/dbtreelistbox.hxx | 6 +++--- dbaccess/source/ui/inc/indexdialog.hxx | 2 +- dbaccess/source/ui/misc/WNameMatch.cxx | 6 +++--- dbaccess/source/ui/querydesign/JoinTableView.cxx | 12 ++++++------ dbaccess/source/ui/querydesign/TableWindow.cxx | 4 ++-- dbaccess/source/ui/querydesign/TableWindowListBox.cxx | 14 +++++++------- 12 files changed, 50 insertions(+), 49 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index de119aab1b82..cd648c31191f 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -269,7 +269,7 @@ void OAppDetailPageHelper::selectAll() int nPos = getVisibleControlIndex(); if ( nPos < E_ELEMENT_TYPE_COUNT ) { - m_pLists[nPos]->SelectAll(sal_True); + m_pLists[nPos]->SelectAll(true); } } @@ -429,7 +429,7 @@ void OAppDetailPageHelper::selectElements(const Sequence< OUString>& _aNames) if ( nPos < E_ELEMENT_TYPE_COUNT ) { DBTreeListBox& rTree = *m_pLists[nPos]; - rTree.SelectAll(sal_False); + rTree.SelectAll(false); const OUString* pIter = _aNames.getConstArray(); const OUString* pEnd = pIter + _aNames.getLength(); for(;pIter != pEnd;++pIter) @@ -577,7 +577,7 @@ SvTreeListEntry* OAppDetailPageHelper::getEntry( const Point& _aPosPixel) const SvTreeListEntry* pReturn = NULL; int nPos = getVisibleControlIndex(); if ( nPos < E_ELEMENT_TYPE_COUNT ) - pReturn = m_pLists[nPos]->GetEntry( _aPosPixel,sal_True ); + pReturn = m_pLists[nPos]->GetEntry( _aPosPixel, true ); return pReturn; } @@ -607,7 +607,7 @@ void OAppDetailPageHelper::createTablesPage(const Reference< XConnection>& _xCon SvTreeListEntry* pEntry = m_pLists[E_TABLE]->First(); if ( pEntry ) m_pLists[E_TABLE]->Expand(pEntry); - m_pLists[E_TABLE]->SelectAll(sal_False); + m_pLists[E_TABLE]->SelectAll(false); } setDetailPage(m_pLists[E_TABLE]); @@ -669,7 +669,7 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA { fillNames( _xContainer, _eType, nImageId, NULL ); - m_pLists[_eType]->SelectAll(sal_False); + m_pLists[_eType]->SelectAll(false); } setDetailPage(m_pLists[_eType]); } @@ -736,7 +736,7 @@ void OAppDetailPageHelper::fillNames( const Reference< XNameAccess >& _xContaine Reference xSubElements(_xContainer->getByName(*pIter),UNO_QUERY); if ( xSubElements.is() ) { - pEntry = pList->InsertEntry( *pIter, _pParent, sal_False, TREELIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) ); + pEntry = pList->InsertEntry( *pIter, _pParent, false, TREELIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) ); getBorderWin().getView()->getAppController().containerFound( Reference< XContainer >( xSubElements, UNO_QUERY ) ); fillNames( xSubElements, _eType, _nImageId, pEntry ); } @@ -868,7 +868,7 @@ SvTreeListEntry* OAppDetailPageHelper::elementAdded(ElementType _eType,const OUS if ( xContainer.is() ) { const sal_Int32 nFolderIndicator = lcl_getFolderIndicatorForType( _eType ); - pRet = pTreeView->InsertEntry( _rName, pEntry, sal_False, TREELIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) ); + pRet = pTreeView->InsertEntry( _rName, pEntry, false, TREELIST_APPEND, reinterpret_cast< void* >( nFolderIndicator ) ); fillNames( xContainer, _eType, nImageId, pRet ); } else diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index f886d8d1207c..61dd85d40505 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -499,7 +499,7 @@ void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList ) } m_aCreation.Show(); - m_aCreation.SelectAll(sal_False); + m_aCreation.SelectAll(false); m_aHelpText.Show(); m_aDescription.Show(); m_aFL.Show(); diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index c4a6c0ad38db..d7c1fb6f680a 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -2064,7 +2064,7 @@ void SbaTableQueryBrowser::implAddDatasource(const OUString& _rDbName, Image& _r OUString sDSDisplayName, sDataSourceId; getDataSourceDisplayName_isURL( _rDbName, sDSDisplayName, sDataSourceId ); - SvTreeListEntry* pDatasourceEntry = m_pTreeView->getListBox().InsertEntry( sDSDisplayName, _rDbImage, _rDbImage, NULL, sal_False ); + SvTreeListEntry* pDatasourceEntry = m_pTreeView->getListBox().InsertEntry( sDSDisplayName, _rDbImage, _rDbImage, NULL, false ); DBTreeListUserData* pDSData = new DBTreeListUserData; pDSData->eType = etDatasource; pDSData->sAccessor = sDataSourceId; @@ -2078,7 +2078,7 @@ void SbaTableQueryBrowser::implAddDatasource(const OUString& _rDbName, Image& _r m_pTreeView->getListBox().InsertEntry( _rQueryName, _rQueryImage, _rQueryImage, pDatasourceEntry, - sal_True /*ChildrenOnDemand*/, TREELIST_APPEND, pQueriesData ); + true /*ChildrenOnDemand*/, TREELIST_APPEND, pQueriesData ); } // the child for the tables container @@ -2088,7 +2088,7 @@ void SbaTableQueryBrowser::implAddDatasource(const OUString& _rDbName, Image& _r m_pTreeView->getListBox().InsertEntry( _rTableName, _rTableImage, _rTableImage, pDatasourceEntry, - sal_True /*ChildrenOnDemand*/, TREELIST_APPEND, pTablesData ); + true /*ChildrenOnDemand*/, TREELIST_APPEND, pTablesData ); } } diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index d4615353283e..31e149ba0fde 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -178,7 +178,7 @@ void DBTreeListBox::SelectHdl() void DBTreeListBox::MouseButtonDown( const MouseEvent& rMEvt ) { - sal_Bool bHitEmptySpace = (NULL == GetEntry(rMEvt.GetPosPixel(), sal_True)); + sal_Bool bHitEmptySpace = (NULL == GetEntry(rMEvt.GetPosPixel(), true)); if (bHitEmptySpace && (rMEvt.GetClicks() == 2) && rMEvt.IsMod1()) Control::MouseButtonDown(rMEvt); else @@ -382,12 +382,12 @@ void DBTreeListBox::KeyInput( const KeyEvent& rKEvt ) SvTreeListBox::KeyInput(rKEvt); } -sal_Bool DBTreeListBox::EditingEntry( SvTreeListEntry* pEntry, Selection& /*_aSelection*/) +bool DBTreeListBox::EditingEntry( SvTreeListEntry* pEntry, Selection& /*_aSelection*/) { return m_aEditingHandler.Call(pEntry) != 0; } -sal_Bool DBTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ) +bool DBTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ) { DBTreeEditedEntry aEntry; aEntry.pEntry = pEntry; @@ -399,10 +399,10 @@ sal_Bool DBTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rN } SetEntryText(pEntry,aEntry.aNewText); - return sal_False; // we never want that the base change our text + return false; // we never want that the base change our text } -sal_Bool DBTreeListBox::DoubleClickHdl() +bool DBTreeListBox::DoubleClickHdl() { long nResult = aDoubleClickHdl.Call( this ); // continue default processing if the DoubleClickHandler didn't handle it diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index 1aef2959c7a0..830139fabf44 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -271,7 +271,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn sRootEntryText = ModuleRes(STR_ALL_VIEWS); else sRootEntryText = ModuleRes(STR_ALL_TABLES_AND_VIEWS); - InsertEntry( sRootEntryText, NULL, sal_False, TREELIST_APPEND, reinterpret_cast< void* >( DatabaseObjectContainer::TABLES ) ); + InsertEntry( sRootEntryText, NULL, false, TREELIST_APPEND, reinterpret_cast< void* >( DatabaseObjectContainer::TABLES ) ); } if ( _rTables.empty() ) @@ -317,7 +317,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn { SvTreeListEntry* pFolder = GetEntryPosByName( *folder, pRootEntry ); if ( !pFolder ) - pFolder = InsertEntry( *folder, pRootEntry, sal_False, TREELIST_APPEND, reinterpret_cast< void* >( nFolderType ) ); + pFolder = InsertEntry( *folder, pRootEntry, false, TREELIST_APPEND, reinterpret_cast< void* >( nFolderType ) ); } } } @@ -448,7 +448,7 @@ SvTreeListEntry* OTableTreeListBox::implAddEntry( { SvTreeListEntry* pFolder = GetEntryPosByName( rFirstName, pParentEntry ); if ( !pFolder ) - pFolder = InsertEntry( rFirstName, pParentEntry, sal_False, TREELIST_APPEND, reinterpret_cast< void* >( nFirstFolderType ) ); + pFolder = InsertEntry( rFirstName, pParentEntry, false, TREELIST_APPEND, reinterpret_cast< void* >( nFirstFolderType ) ); pParentEntry = pFolder; } @@ -456,14 +456,14 @@ SvTreeListEntry* OTableTreeListBox::implAddEntry( { SvTreeListEntry* pFolder = GetEntryPosByName( rSecondName, pParentEntry ); if ( !pFolder ) - pFolder = InsertEntry( rSecondName, pParentEntry, sal_False, TREELIST_APPEND, reinterpret_cast< void* >( nSecondFolderType ) ); + pFolder = InsertEntry( rSecondName, pParentEntry, false, TREELIST_APPEND, reinterpret_cast< void* >( nSecondFolderType ) ); pParentEntry = pFolder; } SvTreeListEntry* pRet = NULL; if ( !_bCheckName || !GetEntryPosByName( sName, pParentEntry ) ) { - pRet = InsertEntry( sName, pParentEntry, sal_False, TREELIST_APPEND ); + pRet = InsertEntry( sName, pParentEntry, false, TREELIST_APPEND ); Image aImage; m_xImageProvider->getImages( _rTableName, DatabaseObject::TABLE, aImage ); diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index b942f75c85d9..c5e5ca648043 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -88,7 +88,8 @@ namespace dbaui } extern sal_Bool isCharOk(sal_Unicode _cChar,sal_Bool _bFirstChar,sal_Bool _bUpperCase,const OUString& _sAllowedChars); - sal_Bool DbaIndexList::EditedEntry( SvTreeListEntry* _pEntry, const OUString& _rNewText ) + + bool DbaIndexList::EditedEntry( SvTreeListEntry* _pEntry, const OUString& _rNewText ) { // first check if this is valid SQL92 name if ( isSQL92CheckEnabled(m_xConnection) ) @@ -102,26 +103,26 @@ namespace dbaui sAlias != _rNewText : !_rNewText.equalsIgnoreAsciiCase(sAlias)) - return sal_False; + return false; } } if (!SvTreeListBox::EditedEntry(_pEntry, _rNewText)) - return sal_False; + return false; OUString sOldText = GetEntryText(_pEntry); SvTreeListBox::SetEntryText(_pEntry, _rNewText); - sal_Bool bValid = sal_True; + bool bValid = true; if (m_aEndEditHdl.IsSet()) bValid = (0 != m_aEndEditHdl.Call(_pEntry)); if (bValid) - return sal_True; + return true; SvTreeListBox::SetEntryText(_pEntry, sOldText); - return sal_False; + return false; } void DbaIndexList::enableSelectHandler() diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx index a6cd82afee5c..b1cc1db680f4 100644 --- a/dbaccess/source/ui/inc/dbtreelistbox.hxx +++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx @@ -115,10 +115,10 @@ namespace dbaui virtual void InitEntry(SvTreeListEntry* pEntry, const OUString& aStr, const Image& aCollEntryBmp, const Image& aExpEntryBmp, SvLBoxButtonKind eButtonKind); // enable editing for tables/views and queries - virtual sal_Bool EditingEntry( SvTreeListEntry* pEntry, Selection& ); - virtual sal_Bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ); + virtual bool EditingEntry( SvTreeListEntry* pEntry, Selection& ); + virtual bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ); - virtual sal_Bool DoubleClickHdl(); + virtual bool DoubleClickHdl(); virtual PopupMenu* CreateContextMenu( void ); virtual void ExcecuteContextMenuAction( sal_uInt16 nSelectedPopupEntry ); diff --git a/dbaccess/source/ui/inc/indexdialog.hxx b/dbaccess/source/ui/inc/indexdialog.hxx index 61e3e676f29a..93f15784b649 100644 --- a/dbaccess/source/ui/inc/indexdialog.hxx +++ b/dbaccess/source/ui/inc/indexdialog.hxx @@ -69,7 +69,7 @@ namespace dbaui } protected: - virtual sal_Bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ); + virtual bool EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ); private: using SvTreeListBox::Select; diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx index 3f11d2b4488a..4f13c7ee031a 100644 --- a/dbaccess/source/ui/misc/WNameMatch.cxx +++ b/dbaccess/source/ui/misc/WNameMatch.cxx @@ -253,7 +253,7 @@ IMPL_LINK( OWizNameMatching, TableListClickHdl, void*, /*NOTINTERESTEDIN*/ ) sal_uLong nNewPos = m_CTRL_LEFT.GetModel()->GetAbsPos(m_CTRL_LEFT.GetFirstEntryInView()); if ( nNewPos - nPos == 1 ) --nNewPos; - m_CTRL_RIGHT.MakeVisible(m_CTRL_RIGHT.GetEntry(nNewPos),sal_True); + m_CTRL_RIGHT.MakeVisible(m_CTRL_RIGHT.GetEntry(nNewPos), true); m_CTRL_RIGHT.Select(pOldEntry,sal_True); } } @@ -287,7 +287,7 @@ IMPL_LINK( OWizNameMatching, TableListRightSelectHdl, void*, /*NOTINTERESTEDIN*/ sal_uLong nNewPos = m_CTRL_RIGHT.GetModel()->GetAbsPos(m_CTRL_RIGHT.GetFirstEntryInView()); if ( nNewPos - nPos == 1 ) nNewPos--; - m_CTRL_LEFT.MakeVisible(m_CTRL_LEFT.GetEntry(nNewPos),sal_True); + m_CTRL_LEFT.MakeVisible(m_CTRL_LEFT.GetEntry(nNewPos), true); m_CTRL_LEFT.Select(pOldEntry,sal_True); } } @@ -380,7 +380,7 @@ void OColumnTreeBox::FillListBox( const ODatabaseExport::TColumnVector& _rList) ODatabaseExport::TColumnVector::const_iterator aEnd = _rList.end(); for(;aIter != aEnd;++aIter) { - SvTreeListEntry* pEntry = InsertEntry((*aIter)->first,0,sal_False,TREELIST_APPEND,(*aIter)->second); + SvTreeListEntry* pEntry = InsertEntry((*aIter)->first, 0, false, TREELIST_APPEND, (*aIter)->second); SvButtonState eState = !(m_bReadOnly && (*aIter)->second->IsAutoIncrement()) ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED; SetCheckButtonState( pEntry, eState ); } diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 3c04399e47c2..197402e15e7a 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -861,11 +861,11 @@ void OJoinTableView::DeselectConn(OTableConnection* pConn) // deselect the corresponding entries in the ListBox of the table window OTableWindow* pWin = pConn->GetSourceWin(); if (pWin && pWin->GetListBox()) - pWin->GetListBox()->SelectAll(sal_False); + pWin->GetListBox()->SelectAll(false); pWin = pConn->GetDestWin(); if (pWin && pWin->GetListBox()) - pWin->GetListBox()->SelectAll(sal_False); + pWin->GetListBox()->SelectAll(false); pConn->Deselect(); m_pSelectedConn = NULL; @@ -888,8 +888,8 @@ void OJoinTableView::SelectConn(OTableConnection* pConn) OTableWindowListBox* pDestBox = pConnDest->GetListBox(); if (pSourceBox && pDestBox) { - pSourceBox->SelectAll(sal_False); - pDestBox->SelectAll(sal_False); + pSourceBox->SelectAll(false); + pDestBox->SelectAll(false); SvTreeListEntry* pFirstSourceVisible = pSourceBox->GetFirstEntryInView(); SvTreeListEntry* pFirstDestVisible = pDestBox->GetFirstEntryInView(); @@ -903,14 +903,14 @@ void OJoinTableView::SelectConn(OTableConnection* pConn) SvTreeListEntry* pSourceEntry = pSourceBox->GetEntryFromText((*aIter)->GetData()->GetSourceFieldName()); if (pSourceEntry) { - pSourceBox->Select(pSourceEntry, sal_True); + pSourceBox->Select(pSourceEntry, true); pSourceBox->MakeVisible(pSourceEntry); } SvTreeListEntry* pDestEntry = pDestBox->GetEntryFromText((*aIter)->GetData()->GetDestFieldName()); if (pDestEntry) { - pDestBox->Select(pDestEntry, sal_True); + pDestBox->Select(pDestEntry, true); pDestBox->MakeVisible(pDestEntry); } diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index 52471586b0f7..b0e7fea3ef51 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -285,7 +285,7 @@ sal_Bool OTableWindow::Init() clearListBox(); sal_Bool bSuccess = FillListBox(); if ( bSuccess ) - m_pListBox->SelectAll( sal_False ); + m_pListBox->SelectAll( false ); impl_updateImage(); @@ -495,7 +495,7 @@ void OTableWindow::setActive(sal_Bool _bActive) SetBoldTitle( _bActive ); m_bActive = _bActive; if (!_bActive && m_pListBox && m_pListBox->GetSelectionCount() != 0) - m_pListBox->SelectAll(sal_False); + m_pListBox->SelectAll(false); } void OTableWindow::Remove() diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx index c692f65eadbc..edec47ca2245 100644 --- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx @@ -169,7 +169,7 @@ IMPL_LINK( OTableWindowListBox, ScrollUpHdl, SvTreeListBox*, /*pBox*/ ) { ScrollOutputArea( -1 ); pEntry = GetEntry( m_aMousePos ); - Select( pEntry, sal_True ); + Select( pEntry, true ); } return 0; @@ -185,7 +185,7 @@ IMPL_LINK( OTableWindowListBox, ScrollDownHdl, SvTreeListBox*, /*pBox*/ ) { ScrollOutputArea( 1 ); pEntry = GetEntry( m_aMousePos ); - Select( pEntry, sal_True ); + Select( pEntry, true ); } return 0; @@ -218,7 +218,7 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt ) // remove the selection if the dragging operation is leaving the window if (_rEvt.mbLeaving) - SelectAll(sal_False); + SelectAll(false); else { // hit test @@ -260,8 +260,8 @@ sal_Int8 OTableWindowListBox::AcceptDrop( const AcceptDropEvent& _rEvt ) // automatically select right entry when dragging if ((FirstSelected() != pEntry) || (FirstSelected() && NextSelected(FirstSelected()))) - SelectAll(sal_False); - Select(pEntry, sal_True); + SelectAll(false); + Select(pEntry, true); // one cannot drop on the first (*) entry if(!( m_pTabWin->GetData()->IsShowAll() && (pEntry==First()) )) @@ -331,8 +331,8 @@ void OTableWindowListBox::GetFocus() if ( GetSelectionCount() == 0 || GetCurEntry() != FirstSelected() ) { if ( FirstSelected() ) - Select(FirstSelected(), sal_False); - Select(GetCurEntry(), sal_True); + Select(FirstSelected(), false); + Select(GetCurEntry(), true); } else ShowFocusRect(FirstSelected()); -- cgit v1.2.3