summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-03-20 11:14:54 +0200
committerNoel Grandin <noel@peralex.com>2014-03-24 08:12:09 +0200
commitf661ac03e049844fd529fb6ff02e628b32cac650 (patch)
treeec4c4c9ac697df5a3645e1d0c7d426d03968d50c /dbaccess
parentb1de52241c1c2045ceab4ea3526f51f145be2930 (diff)
svtools: sal_Bool->bool
Change-Id: I22d8869551f46d2a0607f670f937853f394b6acf
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx6
-rw-r--r--dbaccess/source/ui/control/RelationControl.cxx13
-rw-r--r--dbaccess/source/ui/control/TableGrantCtrl.cxx16
-rw-r--r--dbaccess/source/ui/dlg/indexfieldscontrol.cxx18
-rw-r--r--dbaccess/source/ui/inc/TableGrantCtrl.hxx4
-rw-r--r--dbaccess/source/ui/inc/indexfieldscontrol.hxx6
-rw-r--r--dbaccess/source/ui/inc/sbagrid.hxx4
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx12
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.hxx6
11 files changed, 48 insertions, 47 deletions
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 58093e8f88e9..64994cc88ef1 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -916,14 +916,14 @@ void SbaGridControl::CursorMoved()
FmGridControl::CursorMoved();
}
-void SbaGridControl::ActivateCell(long nRow, sal_uInt16 nCol, sal_Bool bSetCellFocus /*= sal_True*/ )
+void SbaGridControl::ActivateCell(long nRow, sal_uInt16 nCol, bool bSetCellFocus /*= sal_True*/ )
{
FmGridControl::ActivateCell(nRow, nCol, bSetCellFocus);
if (m_pMasterListener)
m_pMasterListener->CellActivated();
}
-void SbaGridControl::DeactivateCell(sal_Bool bUpdate /*= sal_True*/)
+void SbaGridControl::DeactivateCell(bool bUpdate /*= sal_True*/)
{
FmGridControl::DeactivateCell(bUpdate);
if (m_pMasterListener)
@@ -1277,7 +1277,7 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
// no valid cell under the mouse cursor
break;
- Rectangle aRect = GetCellRect(nRow, nCol, sal_False);
+ Rectangle aRect = GetCellRect(nRow, nCol, false);
if (!aRect.IsInside(rEvt.maPosPixel))
// not dropped within a cell (a cell isn't as wide as the column - the are small spaces)
break;
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index babadfef58b8..0b92c7e36e50 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -107,7 +107,7 @@ namespace dbaui
virtual Size GetOptimalSize() const;
virtual bool PreNotify(NotifyEvent& rNEvt );
- virtual sal_Bool IsTabAllowed(sal_Bool bForward) const;
+ virtual bool IsTabAllowed(bool bForward) const;
virtual void Init(const TTableConnectionData::value_type& _pConnData);
virtual void Init() { ORelationControl_Base::Init(); }
@@ -115,7 +115,7 @@ namespace dbaui
virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol );
virtual void PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColId ) const;
virtual bool SeekRow( long nRow );
- virtual sal_Bool SaveModified();
+ virtual bool SaveModified();
virtual OUString GetCellText( long nRow, sal_uInt16 nColId ) const;
virtual void CellModified();
@@ -218,18 +218,18 @@ namespace dbaui
return 0L;
}
- sal_Bool ORelationControl::IsTabAllowed(sal_Bool bForward) const
+ bool ORelationControl::IsTabAllowed(bool bForward) const
{
long nRow = GetCurRow();
sal_uInt16 nCol = GetCurColumnId();
- sal_Bool bRet = !(( ( bForward && (nCol == DEST_COLUMN) && (nRow == GetRowCount() - 1)))
+ bool bRet = !(( ( bForward && (nCol == DEST_COLUMN) && (nRow == GetRowCount() - 1)))
|| (!bForward && (nCol == SOURCE_COLUMN) && (nRow == 0)));
return bRet && EditBrowseBox::IsTabAllowed(bForward);
}
- sal_Bool ORelationControl::SaveModified()
+ bool ORelationControl::SaveModified()
{
long nRow = GetCurRow();
if ( nRow != BROWSER_ENDOFSELECTION )
@@ -267,8 +267,9 @@ namespace dbaui
m_ops.push_back(make_pair(MODIFY, make_pair(line, newSize)));
m_ops.push_back(make_pair(DELETE, make_pair(newSize, oldSize)));
- return sal_True;
+ return true;
}
+
sal_uInt16 ORelationControl::getColumnIdent( sal_uInt16 _nColId ) const
{
sal_uInt16 nId = _nColId;
diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx
index 438b1d404edd..86504edd8e00 100644
--- a/dbaccess/source/ui/control/TableGrantCtrl.cxx
+++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx
@@ -175,16 +175,16 @@ IMPL_LINK_NOARG(OTableGrantControl, AsynchDeactivate)
return 0L;
}
-sal_Bool OTableGrantControl::IsTabAllowed(sal_Bool bForward) const
+bool OTableGrantControl::IsTabAllowed(bool bForward) const
{
long nRow = GetCurRow();
sal_uInt16 nCol = GetCurColumnId();
if (bForward && (nCol == 2) && (nRow == GetRowCount() - 1))
- return sal_False;
+ return false;
if (!bForward && (nCol == 1) && (nRow == 0))
- return sal_False;
+ return false;
return EditBrowseBox::IsTabAllowed(bForward);
}
@@ -195,15 +195,15 @@ sal_Bool OTableGrantControl::IsTabAllowed(sal_Bool bForward) const
else \
xAuth->revokePrivileges(sTableName,PrivilegeObject::TABLE,what)
-sal_Bool OTableGrantControl::SaveModified()
+bool OTableGrantControl::SaveModified()
{
sal_Int32 nRow = GetCurRow();
if(nRow == -1 || nRow >= m_aTableNames.getLength())
- return sal_False;
+ return false;
OUString sTableName = m_aTableNames[nRow];
- sal_Bool bErg = sal_True;
+ bool bErg = true;
try
{
@@ -242,7 +242,7 @@ sal_Bool OTableGrantControl::SaveModified()
}
catch(SQLException& e)
{
- bErg = sal_False;
+ bErg = false;
::dbaui::showError(::dbtools::SQLExceptionInfo(e),GetParent(),m_xContext);
}
if(bErg && Controller().Is())
@@ -396,7 +396,7 @@ void OTableGrantControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect,
if(aFind != m_aPrivMap.end())
PaintTristate(rDev, rRect, isAllowed(nColumnId,aFind->second.nRights) ? TRISTATE_TRUE : TRISTATE_FALSE,isAllowed(nColumnId,aFind->second.nWithGrant));
else
- PaintTristate(rDev, rRect, TRISTATE_FALSE,sal_False);
+ PaintTristate(rDev, rRect, TRISTATE_FALSE, false);
}
else
{
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index 1e0268bbe553..286f46cb6bb9 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -51,7 +51,7 @@ namespace dbaui
void SetAdditionalModifyHdl(const Link& _rHdl);
protected:
- virtual sal_Bool WantMouseEvent() const { return sal_True; }
+ virtual bool WantMouseEvent() const { return true; }
virtual void SetModifyHdl(const Link& _rHdl);
private:
@@ -295,15 +295,15 @@ namespace dbaui
return sal_True;
}
- sal_Bool IndexFieldsControl::IsModified() const
+ bool IndexFieldsControl::IsModified() const
{
return EditBrowseBox::IsModified();
}
- sal_Bool IndexFieldsControl::SaveModified()
+ bool IndexFieldsControl::SaveModified()
{
if (!IsModified())
- return sal_True;
+ return true;
switch (GetCurColumnId())
{
@@ -337,12 +337,12 @@ namespace dbaui
// invalidate the row to force repaint
Invalidate(GetRowRectPixel(nRow));
- return sal_True;
+ return true;
}
if (sFieldSelected == aPos->sFieldName)
// nothing changed
- return sal_True;
+ return true;
aPos->sFieldName = sFieldSelected;
}
@@ -366,7 +366,7 @@ namespace dbaui
default:
OSL_FAIL("IndexFieldsControl::SaveModified: invalid column id!");
}
- return sal_True;
+ return true;
}
void IndexFieldsControl::InitController(CellControllerRef& /*_rController*/, long _nRow, sal_uInt16 _nColumnId)
@@ -455,9 +455,9 @@ namespace dbaui
}
return OUString();
}
- sal_Bool IndexFieldsControl::IsTabAllowed(sal_Bool /*bForward*/) const
+ bool IndexFieldsControl::IsTabAllowed(bool /*bForward*/) const
{
- return sal_False;
+ return false;
}
} // namespace dbaui
diff --git a/dbaccess/source/ui/inc/TableGrantCtrl.hxx b/dbaccess/source/ui/inc/TableGrantCtrl.hxx
index 1e6a5f92b494..352fb83c88a1 100644
--- a/dbaccess/source/ui/inc/TableGrantCtrl.hxx
+++ b/dbaccess/source/ui/inc/TableGrantCtrl.hxx
@@ -84,12 +84,12 @@ protected:
virtual bool PreNotify(NotifyEvent& rNEvt );
- virtual sal_Bool IsTabAllowed(sal_Bool bForward) const;
+ virtual bool IsTabAllowed(bool bForward) const;
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 bool SeekRow( long nRow );
- virtual sal_Bool SaveModified();
+ virtual bool SaveModified();
virtual OUString GetCellText( long nRow, sal_uInt16 nColId ) const;
virtual void CellModified();
diff --git a/dbaccess/source/ui/inc/indexfieldscontrol.hxx b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
index 509223b5e961..b88e0599235a 100644
--- a/dbaccess/source/ui/inc/indexfieldscontrol.hxx
+++ b/dbaccess/source/ui/inc/indexfieldscontrol.hxx
@@ -58,8 +58,8 @@ namespace dbaui
void initializeFrom(const IndexFields& _rFields);
void commitTo(IndexFields& _rFields);
- sal_Bool SaveModified();
- sal_Bool IsModified() const;
+ bool SaveModified();
+ bool IsModified() const;
const IndexFields& GetSavedValue() const { return m_aSavedValue; }
void SaveValue() { m_aSavedValue = m_aFields; }
@@ -73,7 +73,7 @@ namespace dbaui
virtual void PaintCell( OutputDevice& _rDev, const Rectangle& _rRect, sal_uInt16 _nColumnId ) const;
virtual bool SeekRow(long nRow);
virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId);
- virtual sal_Bool IsTabAllowed(sal_Bool bForward) const;
+ virtual bool IsTabAllowed(bool bForward) const;
::svt::CellController* GetController(long _nRow, sal_uInt16 _nColumnId);
void InitController(::svt::CellControllerRef&, long _nRow, sal_uInt16 _nColumnId);
diff --git a/dbaccess/source/ui/inc/sbagrid.hxx b/dbaccess/source/ui/inc/sbagrid.hxx
index 84cd557eda03..24fae790b1aa 100644
--- a/dbaccess/source/ui/inc/sbagrid.hxx
+++ b/dbaccess/source/ui/inc/sbagrid.hxx
@@ -242,8 +242,8 @@ namespace dbaui
void SetMasterListener(SbaGridListener* pListener) { m_pMasterListener = pListener; }
- virtual void ActivateCell(long nRow, sal_uInt16 nCol, sal_Bool bSetCellFocus = sal_True);
- virtual void DeactivateCell(sal_Bool bUpdate = sal_True);
+ virtual void ActivateCell(long nRow, sal_uInt16 nCol, bool bSetCellFocus = true);
+ virtual void DeactivateCell(bool bUpdate = true);
void ActivateCell() { FmGridControl::ActivateCell(); }
sal_Bool IsAllSelected() const { return (GetSelectRowCount() == GetRowCount()) && (GetRowCount() > 0); }
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 55e2d83fc5c6..4e77e389c174 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -888,7 +888,7 @@ sal_Bool OSelectionBrowseBox::saveField(OUString& _sFieldName ,OTableFieldDescRe
return bError;
}
-sal_Bool OSelectionBrowseBox::SaveModified()
+bool OSelectionBrowseBox::SaveModified()
{
OQueryController& rController = static_cast<OQueryController&>(getDesignView()->getController());
OTableFieldDescRef pEntry = NULL;
@@ -956,7 +956,7 @@ sal_Bool OSelectionBrowseBox::SaveModified()
OUString sColumnName = aFieldName.copy(sTableAlias.getLength()+1,aFieldName.getLength() - sTableAlias.getLength() -1);
Reference<XConnection> xConnection = rController.getConnection();
if ( !xConnection.is() )
- return sal_False;
+ return false;
bError = fillColumnRef( sColumnName, sTableAlias, xConnection->getMetaData(), pEntry, bListAction );
}
else
@@ -2583,7 +2583,7 @@ void OSelectionBrowseBox::GetFocus()
EditBrowseBox::GetFocus();
}
-void OSelectionBrowseBox::DeactivateCell(sal_Bool _bUpdate)
+void OSelectionBrowseBox::DeactivateCell(bool _bUpdate)
{
m_bWasEditing = sal_True;
EditBrowseBox::DeactivateCell(_bUpdate);
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
index 3ad4b7cdde8d..750a904c438f 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
@@ -130,7 +130,7 @@ namespace dbaui
void copy();
virtual void GetFocus();
- virtual void DeactivateCell(sal_Bool bUpdate = sal_True);
+ virtual void DeactivateCell(bool bUpdate = true);
virtual void ColumnMoved( sal_uInt16 nColId ) { ColumnMoved(nColId,sal_True); }
void ColumnMoved( sal_uInt16 nColId,sal_Bool _bCreateUndo);
@@ -197,7 +197,7 @@ namespace dbaui
virtual ::svt::CellController* GetController(long nRow, sal_uInt16 nCol);
virtual void InitController(::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol);
virtual void CellModified();
- virtual sal_Bool SaveModified();
+ virtual bool SaveModified();
virtual void Init();
virtual sal_uInt32 GetTotalCellWidth(long nRow, sal_uInt16 nColId) const;
virtual void ColumnResized( sal_uInt16 nColId );
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 67bbec08d73c..531e0b7006a7 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -596,7 +596,7 @@ sal_Bool OTableEditorCtrl::SaveData(long nRow, sal_uInt16 nColId)
return sal_True;
}
-sal_Bool OTableEditorCtrl::SaveModified()
+bool OTableEditorCtrl::SaveModified()
{
sal_uInt16 nColId = GetCurColumnId();
@@ -610,14 +610,14 @@ sal_Bool OTableEditorCtrl::SaveModified()
} break;
}
- return sal_True;
+ return true;
}
-sal_Bool OTableEditorCtrl::CursorMoving(long nNewRow, sal_uInt16 nNewCol)
+bool OTableEditorCtrl::CursorMoving(long nNewRow, sal_uInt16 nNewCol)
{
if (!EditBrowseBox::CursorMoving(nNewRow, nNewCol))
- return sal_False;
+ return false;
// Called after SaveModified(), current row is still the old one
m_nDataPos = nNewRow;
@@ -635,7 +635,7 @@ sal_Bool OTableEditorCtrl::CursorMoving(long nNewRow, sal_uInt16 nNewCol)
if( SetDataPtr(m_nDataPos) && pDescrWin)
pDescrWin->DisplayData( pActRow->GetActFieldDescr() );
- return sal_True;
+ return true;
}
IMPL_LINK( OTableEditorCtrl, InvalidateFieldType, void*, /*EMPTYTAG*/ )
@@ -1683,7 +1683,7 @@ OTableDesignView* OTableEditorCtrl::GetView() const
return static_cast<OTableDesignView*>(GetParent()->GetParent());
}
-void OTableEditorCtrl::DeactivateCell(sal_Bool bUpdate)
+void OTableEditorCtrl::DeactivateCell(bool bUpdate)
{
OTableRowView::DeactivateCell(bUpdate);
// now we have to deactivate the field description
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx
index b18ea7b9b67d..0b6ca5856a83 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx
@@ -99,7 +99,7 @@ namespace dbaui
virtual void InitController(::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol);
virtual void CellModified();
- virtual sal_Bool SaveModified(); // is called before changing a cell (false prevents change)
+ virtual bool SaveModified(); // is called before changing a cell (false prevents change)
virtual void Undo();
virtual void Redo();
@@ -125,7 +125,7 @@ namespace dbaui
public:
OTableEditorCtrl(Window* pParentWin);
virtual ~OTableEditorCtrl();
- virtual sal_Bool CursorMoving(long nNewRow, sal_uInt16 nNewCol);
+ virtual bool CursorMoving(long nNewRow, sal_uInt16 nNewCol);
virtual void UpdateAll();
SfxUndoManager& GetUndoManager() const;
@@ -156,7 +156,7 @@ namespace dbaui
void SetReadOnly( sal_Bool bRead=sal_True );
virtual void Init();
- virtual void DeactivateCell(sal_Bool bUpdate = sal_True);
+ virtual void DeactivateCell(bool bUpdate = true);
sal_Bool IsCutAllowed( long nRow = -1 );
sal_Bool IsCopyAllowed( long nRow = -1 );