summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-03-19 14:11:04 +0200
committerNoel Grandin <noel@peralex.com>2014-03-24 08:12:08 +0200
commit1a1fe47731bed27e974094a86b16f91e768c6dc0 (patch)
tree4ac085ccc6ba0b00ce21772a3bdb0594dfd7f607 /dbaccess
parentcafdef8109f11435542f41d336f44771b6ced02e (diff)
svtools: sal_Bool->bool
Change-Id: I0c2e9314d85860831b29db76c89c8776c1b071b9
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx8
-rw-r--r--dbaccess/source/ui/control/RelationControl.cxx8
-rw-r--r--dbaccess/source/ui/control/TableGrantCtrl.cxx2
-rw-r--r--dbaccess/source/ui/dlg/indexfieldscontrol.cxx16
-rw-r--r--dbaccess/source/ui/inc/TableGrantCtrl.hxx2
-rw-r--r--dbaccess/source/ui/inc/indexfieldscontrol.hxx2
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx31
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx18
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.hxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.cxx8
11 files changed, 47 insertions, 52 deletions
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 11dbe6ef06b9..58093e8f88e9 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -1264,8 +1264,8 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
// without an empty row we're not in update mode
break;
- long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), sal_False);
- sal_uInt16 nCol = GetColumnAtXPosPixel(rEvt.maPosPixel.X(), sal_False);
+ long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false);
+ sal_uInt16 nCol = GetColumnAtXPosPixel(rEvt.maPosPixel.X(), false);
long nCorrectRowCount = GetRowCount();
if (GetOptions() & OPT_INSERT)
@@ -1358,8 +1358,8 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt )
if ( IsDropFormatSupported( FORMAT_STRING ) )
{
- long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), sal_False);
- sal_uInt16 nCol = GetColumnAtXPosPixel(rEvt.maPosPixel.X(), sal_False);
+ long nRow = GetRowAtYPosPixel(rEvt.maPosPixel.Y(), false);
+ sal_uInt16 nCol = GetColumnAtXPosPixel(rEvt.maPosPixel.X(), false);
long nCorrectRowCount = GetRowCount();
if (GetOptions() & OPT_INSERT)
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index 15ccdfbc3833..babadfef58b8 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -114,7 +114,7 @@ namespace dbaui
virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol );
virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol );
virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const;
- virtual sal_Bool SeekRow( long nRow );
+ virtual bool SeekRow( long nRow );
virtual sal_Bool SaveModified();
virtual OUString GetCellText( long nRow, sal_uInt16 nColId ) const;
@@ -185,7 +185,7 @@ namespace dbaui
// not the first call
RowRemoved(0, GetRowCount());
- RowInserted(0, m_pConnData->GetConnLineDataList()->size() + 1, sal_True); // add one extra row
+ RowInserted(0, m_pConnData->GetConnLineDataList()->size() + 1, true); // add one extra row
}
void ORelationControl::Resize()
@@ -337,10 +337,10 @@ namespace dbaui
return new ListBoxCellController( m_pListCell.get() );
}
- sal_Bool ORelationControl::SeekRow( long nRow )
+ bool ORelationControl::SeekRow( long nRow )
{
m_nDataPos = nRow;
- return sal_True;
+ return true;
}
void ORelationControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const
diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx
index b15854de2281..438b1d404edd 100644
--- a/dbaccess/source/ui/control/TableGrantCtrl.cxx
+++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx
@@ -380,7 +380,7 @@ CellController* OTableGrantControl::GetController( long nRow, sal_uInt16 nColumn
return pController;
}
-sal_Bool OTableGrantControl::SeekRow( long nRow )
+bool OTableGrantControl::SeekRow( long nRow )
{
m_nDataPos = nRow;
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index 81ab05eca45e..1e0268bbe553 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -109,10 +109,10 @@ namespace dbaui
}
- sal_Bool IndexFieldsControl::SeekRow(long nRow)
+ bool IndexFieldsControl::SeekRow(long nRow)
{
if (!EditBrowseBox::SeekRow(nRow))
- return sal_False;
+ return false;
if (nRow < 0)
{
@@ -124,7 +124,7 @@ namespace dbaui
OSL_ENSURE(m_aSeekRow <= m_aFields.end(), "IndexFieldsControl::SeekRow: invalid row!");
}
- return sal_True;
+ return true;
}
void IndexFieldsControl::PaintCell( OutputDevice& _rDev, const Rectangle& _rRect, sal_uInt16 _nColumnId ) const
@@ -163,14 +163,14 @@ namespace dbaui
m_aFields = _rFields;
m_aSeekRow = m_aFields.end();
- SetUpdateMode(sal_False);
+ SetUpdateMode(false);
// remove all rows
RowRemoved(1, GetRowCount());
// insert rows for the fields
- RowInserted(GetRowCount(), m_aFields.size(), sal_False);
+ RowInserted(GetRowCount(), m_aFields.size(), false);
// insert an additional row for a new field for that index
- RowInserted(GetRowCount(), 1, sal_False);
- SetUpdateMode(sal_True);
+ RowInserted(GetRowCount(), 1, false);
+ SetUpdateMode(true);
GoToRowColumnId(0, COLUMN_ID_FIELDNAME);
}
@@ -319,7 +319,7 @@ namespace dbaui
OIndexField aNewField;
aNewField.sFieldName = sFieldSelected;
m_aFields.push_back(aNewField);
- RowInserted(GetRowCount(), 1, sal_True);
+ RowInserted(GetRowCount(), 1, true);
}
}
else
diff --git a/dbaccess/source/ui/inc/TableGrantCtrl.hxx b/dbaccess/source/ui/inc/TableGrantCtrl.hxx
index 63901b4cf167..1e6a5f92b494 100644
--- a/dbaccess/source/ui/inc/TableGrantCtrl.hxx
+++ b/dbaccess/source/ui/inc/TableGrantCtrl.hxx
@@ -88,7 +88,7 @@ protected:
virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol );
virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol );
virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const;
- virtual sal_Bool SeekRow( long nRow );
+ virtual bool SeekRow( long nRow );
virtual sal_Bool SaveModified();
virtual OUString GetCellText( long nRow, sal_uInt16 nColId ) const;
diff --git a/dbaccess/source/ui/inc/indexfieldscontrol.hxx b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
index cbad3b8dd248..509223b5e961 100644
--- a/dbaccess/source/ui/inc/indexfieldscontrol.hxx
+++ b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
@@ -71,7 +71,7 @@ namespace dbaui
protected:
// EditBrowseBox overridables
virtual void PaintCell( OutputDevice& _rDev, const Rectangle& _rRect, sal_uInt16 _nColumnId ) const;
- virtual sal_Bool SeekRow(long nRow);
+ virtual bool SeekRow(long nRow);
virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId);
virtual sal_Bool IsTabAllowed(sal_Bool bForward) const;
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 2291b683d057..55e2d83fc5c6 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -351,7 +351,7 @@ void OSelectionBrowseBox::Init()
if(m_bVisibleRow[i])
m_nVisibleCount++;
}
- RowInserted(0, m_nVisibleCount, sal_False);
+ RowInserted(0, m_nVisibleCount, false);
try
{
Reference< XConnection> xConnection = static_cast<OQueryController&>(getDesignView()->getController()).getConnection();
@@ -373,7 +373,7 @@ void OSelectionBrowseBox::Init()
void OSelectionBrowseBox::PreFill()
{
- SetUpdateMode(sal_False);
+ SetUpdateMode(false);
if (GetCurRow() != 0)
GoToRow(0);
@@ -384,12 +384,12 @@ void OSelectionBrowseBox::PreFill()
RemoveColumns();
InsertHandleColumn( HANDLE_COLUMN_WITDH );
- SetUpdateMode(sal_True);
+ SetUpdateMode(true);
}
void OSelectionBrowseBox::ClearAll()
{
- SetUpdateMode(sal_False);
+ SetUpdateMode(false);
OTableFields::reverse_iterator aIter = getFields().rbegin();
for ( ;aIter != getFields().rend(); ++aIter )
@@ -401,7 +401,7 @@ void OSelectionBrowseBox::ClearAll()
}
}
m_nLastSortColumn = SORT_COLUMN_NONE;
- SetUpdateMode(sal_True);
+ SetUpdateMode(true);
}
void OSelectionBrowseBox::SetReadOnly(sal_Bool bRO)
@@ -1177,7 +1177,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
if ( bAppendRow )
{
- RowInserted( GetRowCount()-1, 1, sal_True );
+ RowInserted( GetRowCount()-1, 1, true );
m_bVisibleRow.push_back(true);
++m_nVisibleCount;
}
@@ -1209,15 +1209,10 @@ sal_Bool OSelectionBrowseBox::SaveModified()
return pEntry != NULL && !bError;
}
-sal_Bool OSelectionBrowseBox::SeekRow(long nRow)
+bool OSelectionBrowseBox::SeekRow(long nRow)
{
- sal_Bool bRet = sal_False;
-
m_nSeekRow = nRow;
- if (nRow < m_nVisibleCount )
- bRet = sal_True;
-
- return bRet;
+ return nRow < m_nVisibleCount;
}
void OSelectionBrowseBox::PaintCell(OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId) const
@@ -1712,7 +1707,7 @@ void OSelectionBrowseBox::DuplicateConditionLevel( const sal_uInt16 nLevel)
pEntry->SetCriteria( nNewLevel, sValue);
if ( nNewLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1) )
{
- RowInserted( GetRowCount()-1, 1, sal_True );
+ RowInserted( GetRowCount()-1, 1, true );
m_bVisibleRow.push_back(true);
++m_nVisibleCount;
}
@@ -1759,7 +1754,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const O
pEntry->SetCriteria( nLevel, rValue);
if(nLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1))
{
- RowInserted( GetRowCount()-1, 1, sal_True );
+ RowInserted( GetRowCount()-1, 1, true );
m_bVisibleRow.push_back(true);
++m_nVisibleCount;
}
@@ -1787,7 +1782,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const O
pLastEntry->SetCriteria( nLevel, sCriteria);
if(nLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1))
{
- RowInserted( GetRowCount()-1, 1, sal_True );
+ RowInserted( GetRowCount()-1, 1, true );
m_bVisibleRow.push_back(true);
++m_nVisibleCount;
}
@@ -1803,7 +1798,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const O
pTmp->SetCriteria( nLevel, rValue);
if(nLevel == (m_nVisibleCount-BROW_CRIT1_ROW-1))
{
- RowInserted( GetRowCount()-1, 1, sal_True );
+ RowInserted( GetRowCount()-1, 1, true );
m_bVisibleRow.push_back(true);
++m_nVisibleCount;
}
@@ -1938,7 +1933,7 @@ void OSelectionBrowseBox::Command(const CommandEvent& rEvt)
sal_uInt16 nSelId = GetColumnId(
sal::static_int_cast< sal_uInt16 >(
FirstSelectedColumn() ) );
- ::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, sal_False ) );
+ ::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, false ) );
aMenuPos = aColRect.TopCenter();
}
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
index d3b5c30fe988..3ad4b7cdde8d 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
@@ -180,7 +180,7 @@ namespace dbaui
virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessibleCell( sal_Int32 nRow, sal_uInt16 nColumnId );
protected:
- virtual sal_Bool SeekRow( long nRow );
+ virtual bool SeekRow( long nRow );
virtual void PaintStatusCell(OutputDevice& rDev, const Rectangle& rRect) const;
virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect,
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 9d7ac5ce5d1e..67bbec08d73c 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -131,12 +131,12 @@ void OTableEditorCtrl::Init()
InitCellController();
// Insert the rows
- RowInserted(0, m_pRowList->size(), sal_True);
+ RowInserted(0, m_pRowList->size(), true);
}
void OTableEditorCtrl::UpdateAll()
{
- RowRemoved(0, GetRowCount(), sal_False);
+ RowRemoved(0, GetRowCount(), false);
m_nDataPos = 0;
InvalidateFeatures();
@@ -306,7 +306,7 @@ sal_Bool OTableEditorCtrl::SetDataPtr( long nRow )
return pActRow != 0;
}
-sal_Bool OTableEditorCtrl::SeekRow(long _nRow)
+bool OTableEditorCtrl::SeekRow(long _nRow)
{
// Call the Base class to remember which row must be repainted
EditBrowseBox::SeekRow(_nRow);
@@ -835,7 +835,7 @@ void OTableEditorCtrl::InsertRows( long nRow )
// RowInserted calls CursorMoved.
// The UI data should not be stored here.
bSaveOnMove = sal_False;
- RowInserted( nRow,vInsertedUndoRedoRows.size(),sal_True );
+ RowInserted( nRow,vInsertedUndoRedoRows.size(), true );
bSaveOnMove = sal_True;
// Create the Undo-Action
@@ -859,11 +859,11 @@ void OTableEditorCtrl::DeleteRows()
{
// Remove rows
m_pRowList->erase( m_pRowList->begin()+nIndex );
- RowRemoved( nIndex, 1, sal_True );
+ RowRemoved( nIndex, 1, true );
// Insert the empty row at the end
m_pRowList->push_back( ::boost::shared_ptr<OTableRow>(new OTableRow()));
- RowInserted( GetRowCount()-1, 1, sal_True );
+ RowInserted( GetRowCount()-1, 1, true );
nIndex = FirstSelectedRow();
}
@@ -892,7 +892,7 @@ void OTableEditorCtrl::InsertNewRows( long nRow )
// Insert the number of of selected rows
for( long i=nRow; i<(nRow+nInsertRows); i++ )
m_pRowList->insert( m_pRowList->begin()+i ,::boost::shared_ptr<OTableRow>(new OTableRow()));
- RowInserted( nRow, nInsertRows, sal_True );
+ RowInserted( nRow, nInsertRows, true );
GetView()->getController().setModified( sal_True );
InvalidateFeatures();
@@ -1379,13 +1379,13 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt)
sal_uInt16 nSelId = GetColumnId(
sal::static_int_cast< sal_uInt16 >(
FirstSelectedColumn() ) );
- ::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, sal_False ) );
+ ::Rectangle aColRect( GetFieldRectPixel( 0, nSelId, false ) );
aMenuPos = aColRect.TopCenter();
}
else if ( GetSelectRowCount() > 0 )
{
- ::Rectangle aColRect( GetFieldRectPixel( FirstSelectedRow(), HANDLE_ID, sal_True ) );
+ ::Rectangle aColRect( GetFieldRectPixel( FirstSelectedRow(), HANDLE_ID, true ) );
aMenuPos = aColRect.TopCenter();
}
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx
index 02c4c1d66518..b18ea7b9b67d 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx
@@ -88,7 +88,7 @@ namespace dbaui
protected:
virtual void Command( const CommandEvent& rEvt );
- virtual sal_Bool SeekRow(long nRow);
+ virtual bool SeekRow(long nRow);
virtual void PaintCell(OutputDevice& rDev, const Rectangle& rRect,
sal_uInt16 nColumnId ) const;
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx
index b4ef8f109513..43349f41f6b9 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.cxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx
@@ -254,7 +254,7 @@ void OTableEditorInsUndoAct::Undo()
pOriginalRows->erase(pOriginalRows->begin()+i);
}
- pTabEdCtrl->RowRemoved( m_nInsPos, m_vInsertedRows.size(), sal_True );
+ pTabEdCtrl->RowRemoved( m_nInsPos, m_vInsertedRows.size(), true );
pTabEdCtrl->InvalidateHandleColumn();
OTableEditorUndoAct::Undo();
@@ -275,7 +275,7 @@ void OTableEditorInsUndoAct::Redo()
nInsertRow++;
}
- pTabEdCtrl->RowInserted( m_nInsPos, m_vInsertedRows.size(), sal_True );
+ pTabEdCtrl->RowInserted( m_nInsPos, m_vInsertedRows.size(), true );
pTabEdCtrl->InvalidateHandleColumn();
OTableEditorUndoAct::Redo();
@@ -303,7 +303,7 @@ void OTableEditorInsNewUndoAct::Undo()
pOriginalRows->erase(pOriginalRows->begin()+i);
}
- pTabEdCtrl->RowRemoved( m_nInsPos, m_nInsRows, sal_True );
+ pTabEdCtrl->RowRemoved( m_nInsPos, m_nInsRows, true );
pTabEdCtrl->InvalidateHandleColumn();
OTableEditorUndoAct::Undo();
@@ -317,7 +317,7 @@ void OTableEditorInsNewUndoAct::Redo()
for( long i=m_nInsPos; i<(m_nInsPos+m_nInsRows); i++ )
pRowList->insert( pRowList->begin()+i,::boost::shared_ptr<OTableRow>(new OTableRow()) );
- pTabEdCtrl->RowInserted( m_nInsPos, m_nInsRows, sal_True );
+ pTabEdCtrl->RowInserted( m_nInsPos, m_nInsRows, true );
pTabEdCtrl->InvalidateHandleColumn();
OTableEditorUndoAct::Redo();