summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/browser
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-04-17 11:16:55 +0200
committerNoel Grandin <noel@peralex.com>2014-04-17 11:17:21 +0200
commitfee4efcb54c8162955f6fe626d9b68c3b74b3068 (patch)
treedf8989eab6d8aacb5f37f0673a1a14eb5584a394 /dbaccess/source/ui/browser
parent6907b67d3d3208eb54289db2476132188d86dfec (diff)
dbaccess: sal_Bool->bool
Change-Id: Ieb52470f9638b74898954db3890aaf2cf202290a
Diffstat (limited to 'dbaccess/source/ui/browser')
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx120
-rw-r--r--dbaccess/source/ui/browser/brwview.cxx10
-rw-r--r--dbaccess/source/ui/browser/dbexchange.cxx2
-rw-r--r--dbaccess/source/ui/browser/dbloader.cxx6
-rw-r--r--dbaccess/source/ui/browser/dsEntriesNoExp.cxx8
-rw-r--r--dbaccess/source/ui/browser/dsbrowserDnD.cxx16
-rw-r--r--dbaccess/source/ui/browser/exsrcbrw.cxx26
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx12
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx56
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx196
10 files changed, 226 insertions, 226 deletions
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 1a9e93740bec..3c98652ae366 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -104,9 +104,9 @@ using namespace ::svt;
#define HANDLE_SQL_ERRORS( action, successflag, context, message ) \
try \
{ \
- successflag = sal_False; \
+ successflag = false; \
action; \
- successflag = sal_True; \
+ successflag = true; \
} \
catch(SQLException& e) \
{ \
@@ -542,7 +542,7 @@ SbaXDataBrowserController::SbaXDataBrowserController(const Reference< ::com::sun
,m_sModuleIdentifier( OUString( "com.sun.star.sdb.DataSourceBrowser" ) )
,m_pFormControllerImpl(NULL)
,m_nFormActionNestingLevel(0)
- ,m_bLoadCanceled( sal_False )
+ ,m_bLoadCanceled( false )
,m_bCannotSelectUnfiltered( true )
{
SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::SbaXDataBrowserController" );
@@ -601,7 +601,7 @@ void SbaXDataBrowserController::stopFrameListening( const Reference< XFrame >& _
void SbaXDataBrowserController::onStartLoading( const Reference< XLoadable >& _rxLoadable )
{
- m_bLoadCanceled = sal_False;
+ m_bLoadCanceled = false;
m_bCannotSelectUnfiltered = false;
Reference< XWarningsSupplier > xWarnings( _rxLoadable, UNO_QUERY );
@@ -620,7 +620,7 @@ void SbaXDataBrowserController::impl_checkForCannotSelectUnfiltered( const SQLEx
}
}
-sal_Bool SbaXDataBrowserController::reloadForm( const Reference< XLoadable >& _rxLoadable )
+bool SbaXDataBrowserController::reloadForm( const Reference< XLoadable >& _rxLoadable )
{
SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::reloadForm" );
WaitObject aWO(getBrowserView());
@@ -833,11 +833,11 @@ bool SbaXDataBrowserController::Construct(Window* pParent)
return LoadForm();
}
-sal_Bool SbaXDataBrowserController::LoadForm()
+bool SbaXDataBrowserController::LoadForm()
{
SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::LoadForm" );
reloadForm( m_xLoadable );
- return sal_True;
+ return true;
}
void SbaXDataBrowserController::AddColumnListener(const Reference< XPropertySet > & /*xCol*/)
@@ -1099,7 +1099,7 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t
&& !::comphelper::getBOOL(evt.NewValue)
)
{ // -> the current field isn't modified anymore, too
- setCurrentModified( sal_False );
+ setCurrentModified( false );
}
// switching to a new record ?
@@ -1140,7 +1140,7 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t
void SbaXDataBrowserController::modified(const ::com::sun::star::lang::EventObject& /*aEvent*/) throw( RuntimeException, std::exception )
{
SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::modified" );
- setCurrentModified( sal_True );
+ setCurrentModified( true );
}
void SbaXDataBrowserController::elementInserted(const ::com::sun::star::container::ContainerEvent& evt) throw( RuntimeException, std::exception )
@@ -1185,7 +1185,7 @@ sal_Bool SbaXDataBrowserController::suspend(sal_Bool /*bSuspend*/) throw( Runtim
m_aAsyncDisplayError.CancelCall();
m_aAsyncInvalidateAll.CancelCall();
- sal_Bool bSuccess = SaveModified();
+ bool bSuccess = SaveModified();
return bSuccess;
}
@@ -1411,7 +1411,7 @@ void SbaXDataBrowserController::resetted(const ::com::sun::star::lang::EventObje
SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::resetted" );
OSL_ENSURE(rEvent.Source == getControlModel(), "SbaXDataBrowserController::resetted : where did this come from ?");
(void)rEvent;
- setCurrentModified( sal_False );
+ setCurrentModified( false );
}
sal_Bool SbaXDataBrowserController::confirmDelete(const ::com::sun::star::sdb::RowChangeEvent& /*aEvent*/) throw( RuntimeException, std::exception )
@@ -1463,8 +1463,8 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const
case ID_BROWSER_INSERT_ROW:
{
// check if it is available
- sal_Bool bInsertPrivilege = ( m_nRowSetPrivileges & Privilege::INSERT) != 0;
- sal_Bool bAllowInsertions = sal_True;
+ bool bInsertPrivilege = ( m_nRowSetPrivileges & Privilege::INSERT) != 0;
+ bool bAllowInsertions = true;
try
{
Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW );
@@ -1480,10 +1480,10 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const
case SID_FM_DELETEROWS:
{
// check if it is available
- sal_Bool bDeletePrivilege = ( m_nRowSetPrivileges & Privilege::INSERT) != 0;
- sal_Bool bAllowDeletions = sal_True;
+ bool bDeletePrivilege = ( m_nRowSetPrivileges & Privilege::INSERT) != 0;
+ bool bAllowDeletions = true;
sal_Int32 nRowCount = 0;
- sal_Bool bInsertionRow = sal_False;
+ bool bInsertionRow = false;
try
{
Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW );
@@ -1513,8 +1513,8 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const
if (xCurrentController.Is() && xCurrentController->ISA(EditCellController))
{
Edit& rEdit = (Edit&)xCurrentController->GetWindow();
- sal_Bool bHasLen = (rEdit.GetSelection().Len() != 0);
- sal_Bool bIsReadOnly = rEdit.IsReadOnly();
+ bool bHasLen = (rEdit.GetSelection().Len() != 0);
+ bool bIsReadOnly = rEdit.IsReadOnly();
switch (nId)
{
case ID_BROWSER_CUT: aReturn.bEnabled = m_aCurrentFrame.isActive() && bHasLen && !bIsReadOnly; break;
@@ -1604,9 +1604,9 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const
break; // no datasource -> no edit mode
sal_Int32 nDataSourcePrivileges = ::comphelper::getINT32(xDataSourceSet->getPropertyValue(PROPERTY_PRIVILEGES));
- sal_Bool bInsertAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::INSERT) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowInserts"));
- sal_Bool bUpdateAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::UPDATE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowUpdates"));
- sal_Bool bDeleteAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::DELETE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowDeletes"));
+ bool bInsertAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::INSERT) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowInserts"));
+ bool bUpdateAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::UPDATE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowUpdates"));
+ bool bDeleteAllowedAndPossible = ((nDataSourcePrivileges & ::com::sun::star::sdbcx::Privilege::DELETE) != 0) && ::comphelper::getBOOL(xDataSourceSet->getPropertyValue("AllowDeletes"));
if (!bInsertAllowedAndPossible && !bUpdateAllowedAndPossible && !bDeleteAllowedAndPossible)
break; // no insert/update/delete -> no edit mode
@@ -1660,7 +1660,7 @@ void SbaXDataBrowserController::applyParserOrder(const OUString& _rOldOrder,cons
}
sal_uInt16 nPos = getCurrentColumnPosition();
- sal_Bool bSuccess = sal_False;
+ bool bSuccess = false;
try
{
xFormSet->setPropertyValue(PROPERTY_ORDER, makeAny(_xParser->getOrder()));
@@ -1690,7 +1690,7 @@ void SbaXDataBrowserController::applyParserOrder(const OUString& _rOldOrder,cons
setCurrentColumnPosition(nPos);
}
-void SbaXDataBrowserController::applyParserFilter(const OUString& _rOldFilter, sal_Bool _bOldFilterApplied,const ::OUString& _sOldHaving,const Reference< XSingleSelectQueryComposer >& _xParser)
+void SbaXDataBrowserController::applyParserFilter(const OUString& _rOldFilter, bool _bOldFilterApplied,const ::OUString& _sOldHaving,const Reference< XSingleSelectQueryComposer >& _xParser)
{
SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::applyParserFilter" );
Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY);
@@ -1702,7 +1702,7 @@ void SbaXDataBrowserController::applyParserFilter(const OUString& _rOldFilter, s
sal_uInt16 nPos = getCurrentColumnPosition();
- sal_Bool bSuccess = sal_False;
+ bool bSuccess = false;
try
{
FormErrorHelper aError(this);
@@ -1782,7 +1782,7 @@ Reference< XSingleSelectQueryComposer > SbaXDataBrowserController::createParser_
return xComposer;
}
-void SbaXDataBrowserController::ExecuteFilterSortCrit(sal_Bool bFilter)
+void SbaXDataBrowserController::ExecuteFilterSortCrit(bool bFilter)
{
SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::ExecuteFilterSortCrit" );
if (!SaveModified())
@@ -1826,7 +1826,7 @@ void SbaXDataBrowserController::ExecuteFilterSortCrit(sal_Bool bFilter)
}
OUString sNewVal = bFilter ? xParser->getFilter() : xParser->getOrder();
- sal_Bool bOldFilterApplied(sal_False);
+ bool bOldFilterApplied(false);
if (bFilter)
{
try { bOldFilterApplied = ::comphelper::getBOOL(xFormSet->getPropertyValue(PROPERTY_APPLYFILTER)); } catch(Exception&) { } ;
@@ -1906,7 +1906,7 @@ void SbaXDataBrowserController::ExecuteSearch()
void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< PropertyValue >& _rArgs)
{
SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::Execute" );
- sal_Bool bSortUp = sal_True;
+ bool bSortUp = true;
switch (nId)
{
@@ -1951,7 +1951,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
if (SaveModified())
{
Reference< XPropertySet > xActiveSet(getRowSet(), UNO_QUERY);
- sal_Bool bApplied = ::comphelper::getBOOL(xActiveSet->getPropertyValue(PROPERTY_APPLYFILTER));
+ bool bApplied = ::comphelper::getBOOL(xActiveSet->getPropertyValue(PROPERTY_APPLYFILTER));
xActiveSet->setPropertyValue(PROPERTY_APPLYFILTER, ::comphelper::makeBoolAny(!bApplied));
reloadForm(m_xLoadable);
}
@@ -2017,7 +2017,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
break;
case ID_BROWSER_SORTDOWN:
- bSortUp = sal_False;
+ bSortUp = false;
// DON'T break
case ID_BROWSER_SORTUP:
{
@@ -2034,7 +2034,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
Reference< XSingleSelectQueryComposer > xParser = createParser_nothrow();
const OUString sOldSort = xParser->getOrder();
- sal_Bool bParserSuccess = sal_False;
+ bool bParserSuccess = false;
HANDLE_SQL_ERRORS(
xParser->setOrder(OUString()); xParser->appendOrderByColumn(xField, bSortUp),
bParserSuccess,
@@ -2060,7 +2060,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
break;
// check if the column is a aggregate function
- sal_Bool bHaving = sal_False;
+ bool bHaving = false;
OUString sName;
xField->getPropertyValue(PROPERTY_NAME) >>= sName;
Reference< XColumnsSupplier > xColumnsSupplier(m_xParser, UNO_QUERY);
@@ -2078,7 +2078,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
const OUString sOldHaving = xParser->getHavingClause();
Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY);
- sal_Bool bApplied = ::comphelper::getBOOL(xFormSet->getPropertyValue(PROPERTY_APPLYFILTER));
+ bool bApplied = ::comphelper::getBOOL(xFormSet->getPropertyValue(PROPERTY_APPLYFILTER));
// do we have a filter but it's not applied ?
// -> completely overwrite it, else append one
if (!bApplied)
@@ -2086,7 +2086,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
DO_SAFE( (bHaving ? xParser->setHavingClause(OUString()) : xParser->setFilter(::OUString())), "SbaXDataBrowserController::Execute : caught an exception while resetting the new filter !" );
}
- sal_Bool bParserSuccess = sal_False;
+ bool bParserSuccess = false;
const sal_Int32 nOp = SQLFilterOperator::EQUAL;
@@ -2118,11 +2118,11 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
break;
case ID_BROWSER_ORDERCRIT:
- ExecuteFilterSortCrit(sal_False);
+ ExecuteFilterSortCrit(false);
break;
case ID_BROWSER_FILTERCRIT:
- ExecuteFilterSortCrit(sal_True);
+ ExecuteFilterSortCrit(true);
InvalidateFeature(ID_BROWSER_FILTERED);
break;
@@ -2131,7 +2131,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
if (!SaveModified())
break;
- sal_Bool bNeedPostReload = preReloadForm();
+ bool bNeedPostReload = preReloadForm();
// reset the filter and the sort property simutaneously so only _one_ new statement has to be
// sent
Reference< XPropertySet > xSet(getRowSet(), UNO_QUERY);
@@ -2165,7 +2165,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
case ID_BROWSER_SAVERECORD:
if ( SaveModified( sal_False ) )
- setCurrentModified( sal_False );
+ setCurrentModified( false );
break;
case ID_BROWSER_UNDORECORD:
@@ -2198,12 +2198,12 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
{
}
- setCurrentModified( sal_False );
+ setCurrentModified( false );
}
}
}
-sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor)
+bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor)
{
SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::SaveModified" );
if ( bAskFor && GetState(ID_BROWSER_SAVERECORD).bEnabled )
@@ -2216,17 +2216,17 @@ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor)
{
case RET_NO:
Execute(ID_BROWSER_UNDORECORD,Sequence<PropertyValue>());
- return sal_True;
+ return true;
case RET_CANCEL:
- return sal_False;
+ return false;
}
}
if ( !CommitCurrent() ) // das aktuelle Control committen lassen
- return sal_False;
+ return false;
Reference< XPropertySet > xFormSet(getRowSet(), UNO_QUERY);
- sal_Bool bResult = sal_False;
+ bool bResult = false;
try
{
if (::comphelper::getBOOL(xFormSet->getPropertyValue(PROPERTY_ISMODIFIED)))
@@ -2237,7 +2237,7 @@ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor)
else
xCursor->updateRow();
}
- bResult = sal_True;
+ bResult = true;
}
catch(SQLException&)
{
@@ -2245,7 +2245,7 @@ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor)
catch(Exception&)
{
SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::SaveModified : could not save the current record !");
- bResult = sal_False;
+ bResult = false;
}
InvalidateFeature(ID_BROWSER_SAVERECORD);
@@ -2253,15 +2253,15 @@ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor)
return bResult;
}
-sal_Bool SbaXDataBrowserController::CommitCurrent()
+bool SbaXDataBrowserController::CommitCurrent()
{
SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::CommitCurrent" );
if (!getBrowserView())
- return sal_True;
+ return true;
Reference< ::com::sun::star::awt::XControl > xActiveControl(getBrowserView()->getGridControl());
Reference< ::com::sun::star::form::XBoundControl > xLockingTest(xActiveControl, UNO_QUERY);
- sal_Bool bControlIsLocked = xLockingTest.is() && xLockingTest->getLock();
+ bool bControlIsLocked = xLockingTest.is() && xLockingTest->getLock();
if (xActiveControl.is() && !bControlIsLocked)
{
// zunaechst das Control fragen ob es das IFace unterstuetzt
@@ -2269,12 +2269,12 @@ sal_Bool SbaXDataBrowserController::CommitCurrent()
if (!xBoundControl.is())
xBoundControl = Reference< ::com::sun::star::form::XBoundComponent > (xActiveControl->getModel(), UNO_QUERY);
if (xBoundControl.is() && !xBoundControl->commit())
- return sal_False;
+ return false;
}
- return sal_True;
+ return true;
}
-void SbaXDataBrowserController::setCurrentModified( sal_Bool _bSet )
+void SbaXDataBrowserController::setCurrentModified( bool _bSet )
{
SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::setCurrentModified" );
m_bCurrentlyModified = _bSet;
@@ -2285,7 +2285,7 @@ void SbaXDataBrowserController::setCurrentModified( sal_Bool _bSet )
void SbaXDataBrowserController::RowChanged()
{
SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::RowChanged" );
- setCurrentModified( sal_False );
+ setCurrentModified( false );
}
void SbaXDataBrowserController::ColumnChanged()
@@ -2298,7 +2298,7 @@ void SbaXDataBrowserController::ColumnChanged()
InvalidateFeature(ID_BROWSER_AUTOFILTER);
InvalidateFeature(ID_BROWSER_REMOVEFILTER);
- setCurrentModified( sal_False );
+ setCurrentModified( false );
}
void SbaXDataBrowserController::SelectionChanged()
@@ -2624,22 +2624,22 @@ void SbaXDataBrowserController::leaveFormAction()
m_aAsyncDisplayError.Call();
}
-sal_Bool SbaXDataBrowserController::isLoaded() const
+bool SbaXDataBrowserController::isLoaded() const
{
SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::isLoaded" );
return m_xLoadable.is() && m_xLoadable->isLoaded();
}
-sal_Bool SbaXDataBrowserController::isValidCursor() const
+bool SbaXDataBrowserController::isValidCursor() const
{
SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::isValidCursor" );
if (!m_xColumnsSupplier.is())
- return sal_False;
+ return false;
Reference< ::com::sun::star::container::XNameAccess > xCols = m_xColumnsSupplier->getColumns();
if (!xCols.is() || !xCols->hasElements())
- return sal_False;
+ return false;
- sal_Bool bIsValid = !(m_xRowSet->isBeforeFirst() || m_xRowSet->isAfterLast());
+ bool bIsValid = !(m_xRowSet->isBeforeFirst() || m_xRowSet->isAfterLast());
if ( !bIsValid )
{
Reference<XPropertySet> xProp(m_xRowSet,UNO_QUERY);
@@ -2710,10 +2710,10 @@ void SbaXDataBrowserController::addColumnListeners(const Reference< ::com::sun::
}
}
-sal_Bool SbaXDataBrowserController::InitializeGridModel(const Reference< ::com::sun::star::form::XFormComponent > & /*xGrid*/)
+bool SbaXDataBrowserController::InitializeGridModel(const Reference< ::com::sun::star::form::XFormComponent > & /*xGrid*/)
{
SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::InitializeGridModel" );
- return sal_True;
+ return true;
}
} // namespace dbaui
diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx
index ea2d4d6dadf3..f348dc678810 100644
--- a/dbaccess/source/ui/browser/brwview.cxx
+++ b/dbaccess/source/ui/browser/brwview.cxx
@@ -42,14 +42,14 @@ using namespace ::com::sun::star::lang;
namespace
{
- sal_Bool isGrabVclControlFocusAllowed(const UnoDataBrowserView* _pView)
+ bool isGrabVclControlFocusAllowed(const UnoDataBrowserView* _pView)
{
- sal_Bool bGrabFocus = sal_False;
+ bool bGrabFocus = false;
SbaGridControl* pVclControl = _pView->getVclControl();
Reference< ::com::sun::star::awt::XControl > xGrid = _pView->getGridControl();
if (pVclControl && xGrid.is())
{
- bGrabFocus = sal_True;
+ bGrabFocus = true;
if(!pVclControl->HasChildPathFocus())
{
Reference<XChild> xChild(xGrid->getModel(),UNO_QUERY);
@@ -284,7 +284,7 @@ void UnoDataBrowserView::GetFocus()
m_pTreeView->GrabFocus();
else if (m_pVclControl && m_xGrid.is())
{
- sal_Bool bGrabFocus = sal_False;
+ bool bGrabFocus = false;
if(!m_pVclControl->HasChildPathFocus())
{
bGrabFocus = isGrabVclControlFocusAllowed(this);
@@ -307,7 +307,7 @@ bool UnoDataBrowserView::PreNotify( NotifyEvent& rNEvt )
bool nDone = false;
if(rNEvt.GetType() == EVENT_KEYINPUT)
{
- sal_Bool bGrabAllowed = isGrabVclControlFocusAllowed(this);
+ bool bGrabAllowed = isGrabVclControlFocusAllowed(this);
if ( bGrabAllowed )
{
const KeyEvent* pKeyEvt = rNEvt.GetKeyEvent();
diff --git a/dbaccess/source/ui/browser/dbexchange.cxx b/dbaccess/source/ui/browser/dbexchange.cxx
index 9a0fd8201062..e2cdbbba4395 100644
--- a/dbaccess/source/ui/browser/dbexchange.cxx
+++ b/dbaccess/source/ui/browser/dbexchange.cxx
@@ -93,7 +93,7 @@ namespace dbaui
ODataClipboard::ODataClipboard( const Reference< XPropertySet >& i_rAliveForm,
const Sequence< Any >& i_rSelectedRows,
- const sal_Bool i_bBookmarkSelection,
+ const bool i_bBookmarkSelection,
const Reference< XComponentContext >& i_rORB )
:ODataAccessObjectTransferable( i_rAliveForm )
,m_pHtml(NULL)
diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx
index dcfd8af5bc16..fb5bae3b9f6c 100644
--- a/dbaccess/source/ui/browser/dbloader.cxx
+++ b/dbaccess/source/ui/browser/dbloader.cxx
@@ -191,7 +191,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
if ( sComponentURL == URL_COMPONENT_DATASOURCEBROWSER )
{
- sal_Bool bDisableBrowser = ( sal_False == aLoadArgs.getOrDefault( "ShowTreeViewButton", sal_True ) ) // compatibility name
+ bool bDisableBrowser = ( sal_False == aLoadArgs.getOrDefault( "ShowTreeViewButton", sal_True ) ) // compatibility name
|| ( sal_False == aLoadArgs.getOrDefault( (OUString)PROPERTY_ENABLE_BROWSER, sal_True ) );
if ( bDisableBrowser )
@@ -210,7 +210,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
if ( sComponentURL == URL_COMPONENT_REPORTDESIGN )
{
- sal_Bool bPreview = aLoadArgs.getOrDefault( "Preview", sal_False );
+ bool bPreview = aLoadArgs.getOrDefault( "Preview", sal_False );
if ( bPreview )
{ // report designs cannot be previewed
if ( rListener.is() )
@@ -227,7 +227,7 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU
}
}
- sal_Bool bSuccess = xController.is();
+ bool bSuccess = xController.is();
Reference< XModel > xDatabaseDocument;
if ( bSuccess )
{
diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
index 712613447aac..a73f5ed0b7cd 100644
--- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
+++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
@@ -101,7 +101,7 @@ SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( const SvTree
return etQueryContainer;
}
-void SbaTableQueryBrowser::select(SvTreeListEntry* _pEntry, sal_Bool _bSelect)
+void SbaTableQueryBrowser::select(SvTreeListEntry* _pEntry, bool _bSelect)
{
SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL;
if (pTextItem)
@@ -114,7 +114,7 @@ void SbaTableQueryBrowser::select(SvTreeListEntry* _pEntry, sal_Bool _bSelect)
}
}
-void SbaTableQueryBrowser::selectPath(SvTreeListEntry* _pEntry, sal_Bool _bSelect)
+void SbaTableQueryBrowser::selectPath(SvTreeListEntry* _pEntry, bool _bSelect)
{
while (_pEntry)
{
@@ -123,7 +123,7 @@ void SbaTableQueryBrowser::selectPath(SvTreeListEntry* _pEntry, sal_Bool _bSelec
}
}
-sal_Bool SbaTableQueryBrowser::isSelected(SvTreeListEntry* _pEntry) const
+bool SbaTableQueryBrowser::isSelected(SvTreeListEntry* _pEntry) const
{
SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL;
if (pTextItem)
@@ -131,7 +131,7 @@ sal_Bool SbaTableQueryBrowser::isSelected(SvTreeListEntry* _pEntry) const
else {
OSL_FAIL("SbaTableQueryBrowser::isSelected: invalid entry!");
}
- return sal_False;
+ return false;
}
void SbaTableQueryBrowser::SelectionChanged()
diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
index e4d02c99bd6a..ddb081a916c8 100644
--- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx
+++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
@@ -60,7 +60,7 @@ namespace dbaui
using namespace ::dbtools;
using namespace ::svx;
- TransferableHelper* SbaTableQueryBrowser::implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType, sal_Bool _bAllowConnection )
+ TransferableHelper* SbaTableQueryBrowser::implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType, bool _bAllowConnection )
{
try
{
@@ -107,7 +107,7 @@ namespace dbaui
Reference<XStorable> xStore;
xStore = Reference<XStorable>( xChild.is() ? getDataSourceOrModel(xChild->getParent()) : Reference<XInterface>(),UNO_QUERY );
// check for the concrete type
- if ( xStore.is() && !xStore->isReadonly() && ::std::find_if(_rFlavors.begin(),_rFlavors.end(),TAppSupportedSotFunctor(E_TABLE,sal_True)) != _rFlavors.end())
+ if ( xStore.is() && !xStore->isReadonly() && ::std::find_if(_rFlavors.begin(),_rFlavors.end(),TAppSupportedSotFunctor(E_TABLE,true)) != _rFlavors.end())
return DND_ACTION_COPY;
}
}
@@ -135,8 +135,8 @@ namespace dbaui
m_aAsyncDrop.aDroppedData.clear();
m_aAsyncDrop.nType = E_TABLE;
m_aAsyncDrop.nAction = _rEvt.mnAction;
- m_aAsyncDrop.bError = sal_False;
- m_aAsyncDrop.bHtml = sal_False;
+ m_aAsyncDrop.bError = false;
+ m_aAsyncDrop.bHtml = false;
m_aAsyncDrop.pDroppedAt = NULL;
m_aAsyncDrop.aUrl = OUString();
@@ -170,19 +170,19 @@ namespace dbaui
return DND_ACTION_NONE;
}
- sal_Bool SbaTableQueryBrowser::requestDrag( sal_Int8 /*_nAction*/, const Point& _rPosPixel )
+ bool SbaTableQueryBrowser::requestDrag( sal_Int8 /*_nAction*/, const Point& _rPosPixel )
{
// get the affected list entry
// ensure that the entry which the user clicked at is selected
SvTreeListEntry* pHitEntry = m_pTreeView->getListBox().GetEntry( _rPosPixel );
if (!pHitEntry)
// no drag of no entry was hit ....
- return sal_False;
+ return false;
// it must be a query/table
EntryType eEntryType = getEntryType( pHitEntry );
if (!isObject(eEntryType))
- return DND_ACTION_NONE;
+ return false;
TransferableHelper* pTransfer = implCopyObject( pHitEntry, ( etTableOrView == eEntryType ) ? CommandType::TABLE : CommandType::QUERY);
Reference< XTransferable> xEnsureDelete = pTransfer;
@@ -199,7 +199,7 @@ namespace dbaui
copyEntry( pSelected );
return 0;
}
- sal_Bool SbaTableQueryBrowser::isEntryCopyAllowed(SvTreeListEntry* _pEntry) const
+ bool SbaTableQueryBrowser::isEntryCopyAllowed(SvTreeListEntry* _pEntry) const
{
EntryType eType = getEntryType(_pEntry);
return ( eType == etTableOrView || eType == etQuery );
diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx
index 9a450b637fb5..e7bf020c8d06 100644
--- a/dbaccess/source/ui/browser/exsrcbrw.cxx
+++ b/dbaccess/source/ui/browser/exsrcbrw.cxx
@@ -63,7 +63,7 @@ SbaExternalSourceBrowser::SbaExternalSourceBrowser(const Reference< ::com::sun::
:SbaXDataBrowserController(_rM)
,m_aModifyListeners(getMutex())
,m_pDataSourceImpl(NULL)
- ,m_bInQueryDispatch( sal_False )
+ ,m_bInQueryDispatch( false )
{
}
@@ -106,16 +106,16 @@ Reference< XRowSet > SbaExternalSourceBrowser::CreateForm()
return m_pDataSourceImpl;
}
-sal_Bool SbaExternalSourceBrowser::InitializeForm(const Reference< XPropertySet > & /*i_formProperties*/)
+bool SbaExternalSourceBrowser::InitializeForm(const Reference< XPropertySet > & /*i_formProperties*/)
{
- return sal_True;
+ return true;
}
-sal_Bool SbaExternalSourceBrowser::LoadForm()
+bool SbaExternalSourceBrowser::LoadForm()
{
// as we don't have a main form (yet), we have nothing to do
// we don't call FormLoaded, because this expects a working data source
- return sal_True;
+ return true;
}
void SbaExternalSourceBrowser::modified(const ::com::sun::star::lang::EventObject& aEvent) throw( RuntimeException, std::exception )
@@ -143,21 +143,21 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U
{
if ( pArguments->Name == "ColumnType" )
{
- sal_Bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const OUString*)0));
+ bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const OUString*)0));
OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnType\" !");
if (bCorrectType)
sControlType = ::comphelper::getString(pArguments->Value);
}
else if ( pArguments->Name == "ColumnPosition" )
{
- sal_Bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const sal_Int16*)0));
+ bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const sal_Int16*)0));
OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnPosition\" !");
if (bCorrectType)
nControlPos = ::comphelper::getINT16(pArguments->Value);
}
else if ( pArguments->Name == "ColumnProperties" )
{
- sal_Bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const Sequence< ::com::sun::star::beans::PropertyValue>*)0));
+ bool bCorrectType = pArguments->Value.getValueType().equals(::getCppuType((const Sequence< ::com::sun::star::beans::PropertyValue>*)0));
OSL_ENSURE(bCorrectType, "invalid type for argument \"ColumnProperties\" !");
if (bCorrectType)
aControlProps = *(Sequence< ::com::sun::star::beans::PropertyValue>*)pArguments->Value.getValue();
@@ -244,7 +244,7 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrows
if (m_bInQueryDispatch)
return xReturn;
- m_bInQueryDispatch = sal_True;
+ m_bInQueryDispatch = true;
if ( ( aURL.Complete == ".uno:FormSlots/AttachToForm" )
// attach a new external form
@@ -287,7 +287,7 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrows
if (!xReturn.is())
xReturn = SbaXDataBrowserController::queryDispatch(aURL, aTargetFrameName, nSearchFlags);
- m_bInQueryDispatch = sal_False;
+ m_bInQueryDispatch = false;
return xReturn;
}
@@ -326,9 +326,9 @@ void SAL_CALL SbaExternalSourceBrowser::unloading(const ::com::sun::star::lang::
void SbaExternalSourceBrowser::Attach(const Reference< XRowSet > & xMaster)
{
Any aOldPos;
- sal_Bool bWasInsertRow = sal_False;
- sal_Bool bBeforeFirst = sal_True;
- sal_Bool bAfterLast = sal_True;
+ bool bWasInsertRow = false;
+ bool bBeforeFirst = true;
+ bool bAfterLast = true;
Reference< XRowLocate > xCursor(xMaster, UNO_QUERY);
Reference< XPropertySet > xMasterProps(xMaster, UNO_QUERY);
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index d59ac626d4bf..dd7d6f800222 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -444,7 +444,7 @@ namespace
if ( !!_rFeatureState.sTitle )
_out_rStates.push_back( makeAny( *_rFeatureState.sTitle ) );
if ( !!_rFeatureState.bChecked )
- _out_rStates.push_back( makeAny( (sal_Bool)*_rFeatureState.bChecked ) );
+ _out_rStates.push_back( makeAny( *_rFeatureState.bChecked ) );
if ( !!_rFeatureState.bInvisible )
_out_rStates.push_back( makeAny( Visibility( !*_rFeatureState.bInvisible ) ) );
if ( _rFeatureState.aValue.hasValue() )
@@ -464,7 +464,7 @@ void OGenericUnoController::ImplBroadcastFeatureState(const OUString& _rFeature,
{
// check if we really need to notify the listeners : this method may be called much more often than needed, so check
// the cached state of the feature
- sal_Bool bAlreadyCached = ( m_aStateCache.find(nFeat) != m_aStateCache.end() );
+ bool bAlreadyCached = ( m_aStateCache.find(nFeat) != m_aStateCache.end() );
if ( bAlreadyCached )
if ( ( rCachedState.bEnabled == aFeatState.bEnabled )
&& ( rCachedState.bChecked == aFeatState.bChecked )
@@ -542,7 +542,7 @@ void OGenericUnoController::InvalidateFeature_Impl()
++s_nRecursions;
#endif
- sal_Bool bEmpty = sal_True;
+ bool bEmpty = true;
FeatureListener aNextFeature;
{
::osl::MutexGuard aGuard( m_aFeatureMutex);
@@ -610,7 +610,7 @@ void OGenericUnoController::ImplInvalidateFeature( sal_Int32 _nId, const Referen
aListener.xListener = _xListener;
aListener.bForceBroadcast = _bForceBroadcast;
- sal_Bool bWasEmpty;
+ bool bWasEmpty;
{
::osl::MutexGuard aGuard( m_aFeatureMutex );
bWasEmpty = m_aFeaturesToInvalidate.empty();
@@ -748,7 +748,7 @@ void OGenericUnoController::removeStatusListener(const Reference< XStatusListene
{
Dispatch::iterator iterSearch = m_arrStatusListener.begin();
- sal_Bool bRemoveForAll = _rURL.Complete.isEmpty();
+ bool bRemoveForAll = _rURL.Complete.isEmpty();
while ( iterSearch != m_arrStatusListener.end() )
{
DispatchTarget& rCurrent = *iterSearch;
@@ -1231,7 +1231,7 @@ void OGenericUnoController::openHelpAgent(OUString const& _suHelpStringURL )
OUString sLanguage( "Language=" );
if (suURL.indexOf(sLanguage) == -1)
{
- AppendConfigToken(suURL, sal_False /* sal_False := add '&' */ );
+ AppendConfigToken(suURL, false /* sal_False := add '&' */ );
}
URL aURL;
aURL.Complete = suURL;
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 29987bbadad2..1790b90779e4 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -583,10 +583,10 @@ void SbaGridHeader::MouseButtonDown( const MouseEvent& _rMEvt )
FmGridHeader::MouseButtonDown(_rMEvt);
}
-sal_Bool SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMousePos)
+bool SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMousePos)
{
sal_uInt16 nId = GetItemId(_rMousePos);
- sal_Bool bResizingCol = sal_False;
+ bool bResizingCol = false;
if (HEADERBAR_ITEM_NOTFOUND != nId)
{
Rectangle aColRect = GetItemRect(nId);
@@ -610,10 +610,10 @@ sal_Bool SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMo
_rMousePos.Y() - GetSizePixel().Height()
)
);
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMenu)
@@ -621,7 +621,7 @@ void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rM
FmGridHeader::PreExecuteColumnContextMenu(nColId, rMenu);
// some items are valid only if the db isn't readonly
- sal_Bool bDBIsReadOnly = ((SbaGridControl*)GetParent())->IsReadOnlyDB();
+ bool bDBIsReadOnly = ((SbaGridControl*)GetParent())->IsReadOnlyDB();
if (bDBIsReadOnly)
{
@@ -639,7 +639,7 @@ void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rM
}
// prepend some new items
- sal_Bool bColAttrs = (nColId != (sal_uInt16)-1) && (nColId != 0);
+ bool bColAttrs = (nColId != (sal_uInt16)-1) && (nColId != 0);
if ( bColAttrs && !bDBIsReadOnly)
{
PopupMenu aNewItems(ModuleRes(RID_SBA_GRID_COLCTXMENU));
@@ -711,7 +711,7 @@ SbaGridControl::SbaGridControl(Reference< XComponentContext > _rM,
,m_pMasterListener(NULL)
,m_nAsyncDropEvent(0)
,m_nCurrentActionColId((sal_uInt16)-1)
- ,m_bActivatingForDrop(sal_False)
+ ,m_bActivatingForDrop(false)
{
}
@@ -786,7 +786,7 @@ void SbaGridControl::SetColWidth(sal_uInt16 nColId)
Any aWidth = xAffectedCol->getPropertyValue(PROPERTY_WIDTH);
sal_Int32 nCurWidth = aWidth.hasValue() ? ::comphelper::getINT32(aWidth) : -1;
- DlgSize aDlgColWidth(this, nCurWidth, sal_False);
+ DlgSize aDlgColWidth(this, nCurWidth, false);
if (aDlgColWidth.Execute())
{
sal_Int32 nValue = aDlgColWidth.GetValue();
@@ -815,7 +815,7 @@ void SbaGridControl::SetRowHeight()
Any aHeight = xCols->getPropertyValue(PROPERTY_ROW_HEIGHT);
sal_Int32 nCurHeight = aHeight.hasValue() ? ::comphelper::getINT32(aHeight) : -1;
- DlgSize aDlgRowHeight(this, nCurHeight, sal_True);
+ DlgSize aDlgRowHeight(this, nCurHeight, true);
if (aDlgRowHeight.Execute())
{
sal_Int32 nValue = aDlgRowHeight.GetValue();
@@ -979,10 +979,10 @@ Reference< XPropertySet > SbaGridControl::getField(sal_uInt16 nModelPos)
return xEmptyReturn;
}
-sal_Bool SbaGridControl::IsReadOnlyDB() const
+bool SbaGridControl::IsReadOnlyDB() const
{
// assume yes if anything fails
- sal_Bool bDBIsReadOnly = sal_True;
+ bool bDBIsReadOnly = true;
// the db is the implemented by the parent of the grid control's model ...
Reference< XChild > xColumns(GetPeer()->getColumns(), UNO_QUERY);
@@ -1012,7 +1012,7 @@ void SbaGridControl::MouseButtonDown( const BrowserMouseEvent& rMEvt)
sal_uInt16 nViewPos = (nColPos == BROWSER_INVALIDID) ? (sal_uInt16)-1 : nColPos-1;
// 'the handle column' and 'no valid column' will both result in a view position of -1 !
- sal_Bool bHitEmptySpace = (nRow > GetRowCount()) || (nViewPos == (sal_uInt16)-1);
+ bool bHitEmptySpace = (nRow > GetRowCount()) || (nViewPos == (sal_uInt16)-1);
if (bHitEmptySpace && (rMEvt.GetClicks() == 2) && rMEvt.IsMod1())
Control::MouseButtonDown(rMEvt);
@@ -1025,7 +1025,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
SolarMutexGuard aGuard;
// in the new DnD API, the solar mutex is not locked when StartDrag get's called
- sal_Bool bHandled = sal_False;
+ bool bHandled = false;
do
{
@@ -1038,7 +1038,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
sal_uInt16 nViewPos = (nColPos == BROWSER_INVALIDID) ? (sal_uInt16)-1 : nColPos-1;
// 'the handle column' and 'no valid column' will both result in a view position of -1 !
- sal_Bool bCurrentRowVirtual = IsCurrentAppending() && IsModified();
+ bool bCurrentRowVirtual = IsCurrentAppending() && IsModified();
// the current row doesn't really exist : the user's appendign a new one and already has entered some data,
// so the row contains data which has no counter part within the data source
@@ -1051,7 +1051,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
if ((nColPos == BROWSER_INVALIDID) || (nRow >= nCorrectRowCount))
break;
- sal_Bool bHitHandle = (nColPos == 0);
+ bool bHitHandle = (nColPos == 0);
// check which kind of dragging has to be initiated
if ( bHitHandle // the handle column
@@ -1079,7 +1079,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
getMouseEvent().Clear();
DoRowDrag((sal_Int16)nRow);
- bHandled = sal_True;
+ bHandled = true;
}
else if ( (nRow < 0) // the header
&& (!bHitHandle) // non-handle column
@@ -1092,7 +1092,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
getMouseEvent().Clear();
DoColumnDrag(nViewPos);
- bHandled = sal_True;
+ bHandled = true;
}
else if ( !bHitHandle // non-handle column
&& (nRow >= 0) // non-header row
@@ -1104,7 +1104,7 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel )
getMouseEvent().Clear();
DoFieldDrag(nViewPos, (sal_Int16)nRow);
- bHandled = sal_True;
+ bHandled = true;
}
}
while (false);
@@ -1172,19 +1172,19 @@ void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfC
// build the sequence of numbers of selected rows
Sequence< Any > aSelectedRows;
- sal_Bool bSelectionBookmarks = sal_True;
+ bool bSelectionBookmarks = true;
// collect the affected rows
if ((GetSelectRowCount() == 0) && (nRowPos >= 0))
{
aSelectedRows.realloc( 1 );
aSelectedRows[0] <<= (sal_Int32)(nRowPos + 1);
- bSelectionBookmarks = sal_False;
+ bSelectionBookmarks = false;
}
else if ( !IsAllSelected() && GetSelectRowCount() )
{
aSelectedRows = getSelectionBookmarks();
- bSelectionBookmarks = sal_True;
+ bSelectionBookmarks = true;
}
Reference< XResultSet> xRowSetClone;
@@ -1232,8 +1232,8 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos)
/// unary_function Functor object for class ZZ returntype is void
struct SbaGridControlPrec : ::std::unary_function<DataFlavorExVector::value_type,bool>
{
- sal_Bool bQueryDrop;
- SbaGridControlPrec(sal_Bool _bQueryDrop)
+ bool bQueryDrop;
+ SbaGridControlPrec(bool _bQueryDrop)
: bQueryDrop(_bQueryDrop)
{
}
@@ -1321,9 +1321,9 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
css::uno::UNO_QUERY);
if (xColControl.is())
{
- m_bActivatingForDrop = sal_True;
+ m_bActivatingForDrop = true;
GoToRowColumnId(nRow, nCol);
- m_bActivatingForDrop = sal_False;
+ m_bActivatingForDrop = false;
nAction = DND_ACTION_COPY;
}
@@ -1339,7 +1339,7 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt )
if(nAction != DND_ACTION_COPY && GetEmptyRow().Is())
{
const DataFlavorExVector& _rFlavors = GetDataFlavors();
- if(::std::find_if(_rFlavors.begin(),_rFlavors.end(),SbaGridControlPrec(sal_True)) != _rFlavors.end())
+ if(::std::find_if(_rFlavors.begin(),_rFlavors.end(),SbaGridControlPrec(true)) != _rFlavors.end())
nAction = DND_ACTION_COPY;
}
@@ -1400,7 +1400,7 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt )
if(GetEmptyRow().Is())
{
const DataFlavorExVector& _rFlavors = GetDataFlavors();
- DataFlavorExVector::const_iterator aFind = ::std::find_if(_rFlavors.begin(),_rFlavors.end(),SbaGridControlPrec(sal_True));
+ DataFlavorExVector::const_iterator aFind = ::std::find_if(_rFlavors.begin(),_rFlavors.end(),SbaGridControlPrec(true));
if( aFind != _rFlavors.end())
{
TransferableDataHelper aDropped( rEvt.maDropEvent.Transferable );
@@ -1434,7 +1434,7 @@ IMPL_LINK(SbaGridControl, AsynchDropEvent, void*, /*EMPTY_ARG*/)
Reference< XPropertySet > xDataSource = getDataSource();
if ( xDataSource.is() )
{
- sal_Bool bCountFinal = sal_False;
+ bool bCountFinal = false;
xDataSource->getPropertyValue(PROPERTY_ISROWCOUNTFINAL) >>= bCountFinal;
if ( !bCountFinal )
setDataSource(NULL); // deattach from grid control
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 9103d70f28ca..b076da07ff76 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -219,10 +219,10 @@ SbaTableQueryBrowser::SbaTableQueryBrowser(const Reference< XComponentContext >&
,m_pCurrentlyDisplayed(NULL)
,m_nAsyncDrop(0)
,m_nBorder(1)
- ,m_bQueryEscapeProcessing( sal_False )
- ,m_bShowMenu(sal_False)
- ,m_bInSuspend(sal_False)
- ,m_bEnableBrowser(sal_True)
+ ,m_bQueryEscapeProcessing( false )
+ ,m_bShowMenu(false)
+ ,m_bInSuspend(false)
+ ,m_bEnableBrowser(true)
{
}
@@ -411,7 +411,7 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow()
try
{
Reference< XPropertySet > xRowSetProps( getRowSet(), UNO_QUERY_THROW );
- sal_Bool bEscapeProcessing = sal_False;
+ bool bEscapeProcessing = false;
OSL_VERIFY( xRowSetProps->getPropertyValue( PROPERTY_ESCAPE_PROCESSING ) >>= bEscapeProcessing );
if ( !bEscapeProcessing )
// don't touch or interpret anything if escape processing is disabled
@@ -520,10 +520,10 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow()
}
}
-sal_Bool SbaTableQueryBrowser::InitializeForm( const Reference< XPropertySet > & i_formProperties )
+bool SbaTableQueryBrowser::InitializeForm( const Reference< XPropertySet > & i_formProperties )
{
if(!m_pCurrentlyDisplayed)
- return sal_True;
+ return true;
// this method set all format settings from the orignal table or query
try
@@ -566,10 +566,10 @@ sal_Bool SbaTableQueryBrowser::InitializeForm( const Reference< XPropertySet > &
catch ( const Exception& )
{
DBG_UNHANDLED_EXCEPTION();
- return sal_False;
+ return false;
}
- return sal_True;
+ return true;
}
void SbaTableQueryBrowser::initializePreviewMode()
@@ -589,7 +589,7 @@ void SbaTableQueryBrowser::initializePreviewMode()
}
}
-sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::star::form::XFormComponent > & xGrid)
+bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::star::form::XFormComponent > & xGrid)
{
try
{
@@ -612,7 +612,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(m_pCurrentlyDisplayed->GetUserData());
OSL_ENSURE( pData->xObjectProperties.is(), "SbaTableQueryBrowser::InitializeGridModel: No table available!" );
if ( !pData->xObjectProperties.is() )
- return sal_False;
+ return false;
OUString* pStringIter = aProperties.getArray();
Any* pValueIter = aValues.getArray();
@@ -663,7 +663,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
Reference<XChild> xChild(xConnection,UNO_QUERY);
Reference<XPropertySet> xDataSourceProp(xChild->getParent(),UNO_QUERY);
- sal_Bool bSuppressVersionCol = sal_False;
+ bool bSuppressVersionCol = false;
OSL_VERIFY( xDataSourceProp->getPropertyValue( PROPERTY_SUPPRESSVERSIONCL ) >>= bSuppressVersionCol );
// insert the column into the gridcontrol so that we see something :-)
@@ -690,7 +690,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
continue;
// use the result set column's type to determine the type of grid column to create
- sal_Bool bFormattedIsNumeric = sal_True;
+ bool bFormattedIsNumeric = true;
sal_Int32 nType = ::comphelper::getINT32( xColumn->getPropertyValue( PROPERTY_TYPE ) );
::std::vector< NamedValue > aInitialValues;
@@ -710,7 +710,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
OSL_VERIFY( xColumn->getPropertyValue( PROPERTY_ISNULLABLE ) >>= nNullable );
aInitialValues.push_back( NamedValue(
OUString( "TriState" ),
- makeAny( sal_Bool( ColumnValue::NO_NULLS != nNullable ) )
+ makeAny( ColumnValue::NO_NULLS != nNullable )
) );
if ( ColumnValue::NO_NULLS == nNullable )
aDefault <<= (sal_Int16)TRISTATE_FALSE;
@@ -719,7 +719,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
case DataType::LONGVARCHAR:
case DataType::CLOB:
- aInitialValues.push_back( NamedValue( OUString( "MultiLine" ), makeAny( (sal_Bool)sal_True ) ) );
+ aInitialValues.push_back( NamedValue( OUString( "MultiLine" ), makeAny( true ) ) );
// NO break!
case DataType::BINARY:
case DataType::VARBINARY:
@@ -730,7 +730,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
case DataType::VARCHAR:
case DataType::CHAR:
- bFormattedIsNumeric = sal_False;
+ bFormattedIsNumeric = false;
// NO break!
default:
aCurrentModelType = "FormattedField";
@@ -738,7 +738,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
if ( xSupplier.is() )
aInitialValues.push_back( NamedValue( OUString("FormatsSupplier"), makeAny( xSupplier ) ) );
- aInitialValues.push_back( NamedValue( OUString("TreatAsNumber"), makeAny( (sal_Bool)bFormattedIsNumeric ) ) );
+ aInitialValues.push_back( NamedValue( OUString("TreatAsNumber"), makeAny( bFormattedIsNumeric ) ) );
aCopyProperties.push_back( static_cast<const OUString&>(PROPERTY_FORMATKEY) );
break;
}
@@ -819,10 +819,10 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::
catch(const Exception&)
{
DBG_UNHANDLED_EXCEPTION();
- return sal_False;
+ return false;
}
- return sal_True;
+ return true;
}
Reference<XPropertySet> getColumnHelper(SvTreeListEntry* _pCurrentlyDisplayed,const Reference<XPropertySet>& _rxSource)
@@ -932,7 +932,7 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw(
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(m_pCurrentlyDisplayed->GetUserData());
OSL_ENSURE( pData->xObjectProperties.is(), "No table available!" );
- sal_Bool bDefault = !evt.NewValue.hasValue();
+ bool bDefault = !evt.NewValue.hasValue();
if (bDefault)
pData->xObjectProperties->setPropertyValue(PROPERTY_ROW_HEIGHT,makeAny((sal_Int32)45));
else
@@ -966,10 +966,10 @@ sal_Bool SbaTableQueryBrowser::suspend(sal_Bool bSuspend) throw( RuntimeExceptio
::osl::MutexGuard aGuard( getMutex() );
if ( getView() && getView()->IsInModalMode() )
return sal_False;
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if ( !m_bInSuspend )
{
- m_bInSuspend = sal_True;
+ m_bInSuspend = true;
if ( rBHelper.bDisposed )
throw DisposedException( OUString(), *this );
@@ -977,7 +977,7 @@ sal_Bool SbaTableQueryBrowser::suspend(sal_Bool bSuspend) throw( RuntimeExceptio
if ( bRet && getView() )
getView()->Hide();
- m_bInSuspend = sal_False;
+ m_bInSuspend = false;
}
return bRet;
@@ -1006,7 +1006,7 @@ void SAL_CALL SbaTableQueryBrowser::statusChanged( const FeatureStateEvent& _rEv
// if it's the slot for the document data source, remember the state
Sequence< PropertyValue > aDescriptor;
#if OSL_DEBUG_LEVEL > 0
- sal_Bool bProperFormat =
+ bool bProperFormat =
#endif
_rEvent.State >>= aDescriptor;
OSL_ENSURE(bProperFormat, "SbaTableQueryBrowser::statusChanged: need a data access descriptor here!");
@@ -1040,14 +1040,14 @@ void SbaTableQueryBrowser::checkDocumentDataSource()
{
SvTreeListEntry* pDataSourceEntry = NULL;
SvTreeListEntry* pContainerEntry = NULL;
- SvTreeListEntry* pObjectEntry = getObjectEntry( m_aDocumentDataSource, &pDataSourceEntry, &pContainerEntry, sal_False );
- sal_Bool bKnownDocDataSource = (NULL != pObjectEntry);
+ SvTreeListEntry* pObjectEntry = getObjectEntry( m_aDocumentDataSource, &pDataSourceEntry, &pContainerEntry, false );
+ bool bKnownDocDataSource = (NULL != pObjectEntry);
if (!bKnownDocDataSource)
{
if (NULL != pDataSourceEntry)
{ // at least the data source is known
if (NULL != pContainerEntry)
- bKnownDocDataSource = sal_True; // assume we know it.
+ bKnownDocDataSource = true; // assume we know it.
// TODO: should we expand the object container? This may be too expensive just for checking ....
else
{
@@ -1066,13 +1066,13 @@ void SbaTableQueryBrowser::checkDocumentDataSource()
}
if ( !bKnownDocDataSource )
- m_aExternalFeatures[ ID_BROWSER_DOCUMENT_DATASOURCE ].bEnabled = sal_False;
+ m_aExternalFeatures[ ID_BROWSER_DOCUMENT_DATASOURCE ].bEnabled = false;
// update the toolbox
implCheckExternalSlot(ID_BROWSER_DOCUMENT_DATASOURCE);
}
-void SbaTableQueryBrowser::extractDescriptorProps(const ::svx::ODataAccessDescriptor& _rDescriptor, OUString& _rDataSource, OUString& _rCommand, sal_Int32& _rCommandType, sal_Bool& _rEscapeProcessing)
+void SbaTableQueryBrowser::extractDescriptorProps(const ::svx::ODataAccessDescriptor& _rDescriptor, OUString& _rDataSource, OUString& _rCommand, sal_Int32& _rCommandType, bool& _rEscapeProcessing)
{
_rDataSource = _rDescriptor.getDataSource();
if ( _rDescriptor.has(daCommand) )
@@ -1081,7 +1081,7 @@ void SbaTableQueryBrowser::extractDescriptorProps(const ::svx::ODataAccessDescri
_rDescriptor[daCommandType] >>= _rCommandType;
// escape processing is the only one allowed not to be present
- _rEscapeProcessing = sal_True;
+ _rEscapeProcessing = true;
if (_rDescriptor.has(daEscapeProcessing))
_rEscapeProcessing = ::cppu::any2bool(_rDescriptor[daEscapeProcessing]);
}
@@ -1130,7 +1130,7 @@ OUString SbaTableQueryBrowser::getDataSourceAcessor( SvTreeListEntry* _pDataSour
}
SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSource, const OUString& _rCommand, sal_Int32 _nCommandType,
- SvTreeListEntry** _ppDataSourceEntry, SvTreeListEntry** _ppContainerEntry, sal_Bool _bExpandAncestors,
+ SvTreeListEntry** _ppDataSourceEntry, SvTreeListEntry** _ppContainerEntry, bool _bExpandAncestors,
const SharedConnection& _rxConnection )
{
if (_ppDataSourceEntry)
@@ -1257,13 +1257,13 @@ SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSour
SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const ::svx::ODataAccessDescriptor& _rDescriptor,
SvTreeListEntry** _ppDataSourceEntry, SvTreeListEntry** _ppContainerEntry,
- sal_Bool _bExpandAncestors)
+ bool _bExpandAncestors)
{
// extract the props from the descriptor
OUString sDataSource;
OUString sCommand;
sal_Int32 nCommandType = CommandType::COMMAND;
- sal_Bool bEscapeProcessing = sal_True;
+ bool bEscapeProcessing = true;
extractDescriptorProps(_rDescriptor, sDataSource, sCommand, nCommandType, bEscapeProcessing);
return getObjectEntry( sDataSource, sCommand, nCommandType, _ppDataSourceEntry, _ppContainerEntry, _bExpandAncestors, SharedConnection() );
@@ -1401,7 +1401,7 @@ void SAL_CALL SbaTableQueryBrowser::disposing( const com::sun::star::lang::Event
{
// we set the connection to null to avoid a second disposing of the connection
pData->xConnection.clear();
- closeConnection(pDSLoop,sal_False);
+ closeConnection(pDSLoop,false);
break;
}
@@ -1462,7 +1462,7 @@ sal_Bool SAL_CALL SbaTableQueryBrowser::select( const Any& _rSelection ) throw (
throw IllegalArgumentException(OUString(), *this, 1);
// TODO: error message
- return implSelect(aDescriptor,sal_True);
+ return implSelect(aDescriptor,true);
}
Any SAL_CALL SbaTableQueryBrowser::getSelection( ) throw (RuntimeException, std::exception)
@@ -1618,7 +1618,7 @@ void SbaTableQueryBrowser::RemoveColumnListener(const Reference< XPropertySet >
void SbaTableQueryBrowser::criticalFail()
{
SbaXDataBrowserController::criticalFail();
- unloadAndCleanup( sal_False );
+ unloadAndCleanup( false );
}
void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch)
@@ -1626,12 +1626,12 @@ void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch)
SbaXDataBrowserController::LoadFinished(_bWasSynch);
m_sQueryCommand = "";
- m_bQueryEscapeProcessing = sal_False;
+ m_bQueryEscapeProcessing = false;
if (isValid() && !loadingCancelled())
{
// did we load a query?
- sal_Bool bTemporary; // needed because we m_bQueryEscapeProcessing is only one bit wide (and we want to pass it by reference)
+ bool bTemporary; // needed because we m_bQueryEscapeProcessing is only one bit wide (and we want to pass it by reference)
if ( implGetQuerySignature( m_sQueryCommand, bTemporary ) )
m_bQueryEscapeProcessing = bTemporary;
}
@@ -1641,9 +1641,9 @@ void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch)
m_aSelectionListeners.notifyEach( &XSelectionChangeListener::selectionChanged, aEvent );
}
-sal_Bool SbaTableQueryBrowser::getExternalSlotState( sal_uInt16 _nId ) const
+bool SbaTableQueryBrowser::getExternalSlotState( sal_uInt16 _nId ) const
{
- sal_Bool bEnabled = sal_False;
+ bool bEnabled = false;
ExternalFeaturesMap::const_iterator aPos = m_aExternalFeatures.find( _nId );
if ( ( m_aExternalFeatures.end() != aPos ) && aPos->second.xDispatcher.is() )
bEnabled = aPos->second.bEnabled;
@@ -1706,7 +1706,7 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
{
::utl::OConfigurationTreeRoot aConfig( ::utl::OConfigurationTreeRoot::createWithComponentContext( getORB(),
OUString( "/org.openoffice.Office.DataAccess/Policies/Features/Common" ) ) );
- sal_Bool bHaveEditDatabase( sal_True );
+ bool bHaveEditDatabase( true );
OSL_VERIFY( aConfig.getNodeValue( "EditDatabaseFromDataSourceView" ) >>= bHaveEditDatabase );
aReturn.bEnabled = getORB().is() && ( pDataSourceEntry != NULL ) && bHaveEditDatabase;
}
@@ -1725,18 +1725,18 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const
try
{
- sal_Bool bHandled = sal_False;
+ bool bHandled = false;
switch (nId)
{
case ID_BROWSER_DOCUMENT_DATASOURCE:
// the slot is enabled if we have an external dispatcher able to handle it,
// and the dispatcher must have enabled the slot in general
aReturn.bEnabled = getExternalSlotState( ID_BROWSER_DOCUMENT_DATASOURCE );
- bHandled = sal_True;
+ bHandled = true;
break;
case ID_BROWSER_REFRESH:
aReturn.bEnabled = true;
- bHandled = sal_True;
+ bHandled = true;
break;
}
@@ -1871,15 +1871,15 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue
// nothing to do
break;
- sal_Bool bFullReinit = sal_False;
+ bool bFullReinit = false;
// check if the query signature (if the form is based on a query) has changed
if ( !m_sQueryCommand.isEmpty() )
{
OUString sNewQueryCommand;
- sal_Bool bNewQueryEP;
+ bool bNewQueryEP;
#if OSL_DEBUG_LEVEL > 0
- sal_Bool bIsQuery =
+ bool bIsQuery =
#endif
implGetQuerySignature( sNewQueryCommand, bNewQueryEP );
OSL_ENSURE( bIsQuery, "SbaTableQueryBrowser::Execute: was a query before, but is not anymore?" );
@@ -1903,7 +1903,7 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue
SvTreeListEntry* pSelected = m_pCurrentlyDisplayed;
// unload
- unloadAndCleanup( sal_False );
+ unloadAndCleanup( false );
// reselect the entry
if ( pSelected )
@@ -2270,11 +2270,11 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvTreeListEntry*, _pParent)
return 1L;
}
-sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvTreeListEntry* _pEntry )
+bool SbaTableQueryBrowser::ensureEntryObject( SvTreeListEntry* _pEntry )
{
OSL_ENSURE(_pEntry, "SbaTableQueryBrowser::ensureEntryObject: invalid argument!");
if (!_pEntry)
- return sal_False;
+ return false;
EntryType eType = getEntryType( _pEntry );
@@ -2284,14 +2284,14 @@ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvTreeListEntry* _pEntry )
SvTreeListEntry* pDataSourceEntry = m_pTreeView->getListBox().GetRootLevelParent(_pEntry);
- sal_Bool bSuccess = sal_False;
+ bool bSuccess = false;
switch (eType)
{
case etQueryContainer:
if ( pEntryData->xContainer.is() )
{
// nothing to do
- bSuccess = sal_True;
+ bSuccess = true;
break;
}
@@ -2354,21 +2354,21 @@ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvTreeListEntry* _pEntry )
return bSuccess;
}
-sal_Bool SbaTableQueryBrowser::implSelect(const ::svx::ODataAccessDescriptor& _rDescriptor,sal_Bool _bSelectDirect)
+bool SbaTableQueryBrowser::implSelect(const ::svx::ODataAccessDescriptor& _rDescriptor, bool _bSelectDirect)
{
// extract the props
OUString sDataSource;
OUString sCommand;
sal_Int32 nCommandType = CommandType::COMMAND;
- sal_Bool bEscapeProcessing = sal_True;
+ bool bEscapeProcessing = true;
extractDescriptorProps(_rDescriptor, sDataSource, sCommand, nCommandType, bEscapeProcessing);
// select it
return implSelect( sDataSource, sCommand, nCommandType, bEscapeProcessing, SharedConnection(), _bSelectDirect );
}
-sal_Bool SbaTableQueryBrowser::implLoadAnything(const OUString& _rDataSourceName, const OUString& _rCommand,
- const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing, const SharedConnection& _rxConnection)
+bool SbaTableQueryBrowser::implLoadAnything(const OUString& _rDataSourceName, const OUString& _rCommand,
+ const sal_Int32 _nCommandType, const bool _bEscapeProcessing, const SharedConnection& _rxConnection)
{
try
{
@@ -2395,7 +2395,7 @@ sal_Bool SbaTableQueryBrowser::implLoadAnything(const OUString& _rDataSourceName
getBrowserView()->getGridControl()->setDesignMode(sal_True);
InitializeForm( xProp );
- sal_Bool bSuccess = sal_True;
+ bool bSuccess = true;
{
{
@@ -2448,19 +2448,19 @@ sal_Bool SbaTableQueryBrowser::implLoadAnything(const OUString& _rDataSourceName
}
InvalidateAll();
- return sal_False;
+ return false;
}
-sal_Bool SbaTableQueryBrowser::implSelect(const OUString& _rDataSourceName, const OUString& _rCommand,
- const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing,
- const SharedConnection& _rxConnection
- ,sal_Bool _bSelectDirect)
+bool SbaTableQueryBrowser::implSelect(const OUString& _rDataSourceName, const OUString& _rCommand,
+ const sal_Int32 _nCommandType, const bool _bEscapeProcessing,
+ const SharedConnection& _rxConnection,
+ bool _bSelectDirect)
{
if (_rDataSourceName.getLength() && _rCommand.getLength() && (-1 != _nCommandType))
{
SvTreeListEntry* pDataSource = NULL;
SvTreeListEntry* pCommandType = NULL;
- SvTreeListEntry* pCommand = getObjectEntry( _rDataSourceName, _rCommand, _nCommandType, &pDataSource, &pCommandType, sal_True, _rxConnection );
+ SvTreeListEntry* pCommand = getObjectEntry( _rDataSourceName, _rCommand, _nCommandType, &pDataSource, &pCommandType, true, _rxConnection );
if (pCommand)
{
@@ -2484,7 +2484,7 @@ sal_Bool SbaTableQueryBrowser::implSelect(const OUString& _rDataSourceName, cons
{
if ( m_pCurrentlyDisplayed )
{ // tell the old entry (if any) it has been deselected
- selectPath(m_pCurrentlyDisplayed, sal_False);
+ selectPath(m_pCurrentlyDisplayed, false);
m_pCurrentlyDisplayed = NULL;
}
@@ -2492,7 +2492,7 @@ sal_Bool SbaTableQueryBrowser::implSelect(const OUString& _rDataSourceName, cons
return implLoadAnything(_rDataSourceName, _rCommand, _nCommandType, _bEscapeProcessing, _rxConnection);
}
}
- return sal_False;
+ return false;
}
IMPL_LINK(SbaTableQueryBrowser, OnSelectionChange, void*, /*NOINTERESTEDIN*/)
@@ -2587,20 +2587,20 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry )
WaitObject aWaitCursor(getBrowserView());
// tell the old entry it has been deselected
- selectPath(m_pCurrentlyDisplayed, sal_False);
+ selectPath(m_pCurrentlyDisplayed, false);
m_pCurrentlyDisplayed = NULL;
// not really loaded
m_pCurrentlyDisplayed = _pEntry;
// tell the new entry it has been selected
- selectPath(m_pCurrentlyDisplayed, sal_True);
+ selectPath(m_pCurrentlyDisplayed, true);
// get the name of the data source currently selected
ensureConnection( m_pCurrentlyDisplayed, pConData->xConnection );
if ( !pConData->xConnection.is() )
{
- unloadAndCleanup( sal_False );
+ unloadAndCleanup( false );
return false;
}
@@ -2639,7 +2639,7 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry )
sStatus = sStatus.replaceFirst("$name$", aName);
BrowserViewStatusDisplay aShowStatus(static_cast<UnoDataBrowserView*>(getView()), sStatus);
- sal_Bool bEscapeProcessing = sal_True;
+ bool bEscapeProcessing = true;
if(xNameAccess.is() && xNameAccess->hasByName(sSimpleName))
{
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(_pEntry->GetUserData());
@@ -2766,7 +2766,7 @@ void SAL_CALL SbaTableQueryBrowser::elementInserted( const ContainerEvent& _rEve
OSL_ENSURE(pContainerData, "elementInserted: There must be user data for this type!");
DBTreeListUserData* pNewData = new DBTreeListUserData;
- sal_Bool bIsTable = etTableContainer == pContainerData->eType;
+ bool bIsTable = etTableContainer == pContainerData->eType;
if ( bIsTable )
{
_rEvent.Element >>= pNewData->xObjectProperties;// remember the new element
@@ -2788,7 +2788,7 @@ void SAL_CALL SbaTableQueryBrowser::elementInserted( const ContainerEvent& _rEve
SbaXDataBrowserController::elementInserted(_rEvent);
}
-sal_Bool SbaTableQueryBrowser::isCurrentlyDisplayedChanged(const OUString& _sName,SvTreeListEntry* _pContainer)
+bool SbaTableQueryBrowser::isCurrentlyDisplayedChanged(const OUString& _sName,SvTreeListEntry* _pContainer)
{
return m_pCurrentlyDisplayed
&& getEntryType(m_pCurrentlyDisplayed) == getChildType(_pContainer)
@@ -2815,7 +2815,7 @@ void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEven
SvTreeListEntry* pTemp = m_pCurrentlyDisplayed;
// unload
- unloadAndCleanup( sal_False ); // don't dispose the connection
+ unloadAndCleanup( false ); // don't dispose the connection
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pTemp->GetUserData());
pTemp->SetUserData(NULL);
@@ -2863,7 +2863,7 @@ void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEve
// we need to remember the old value
SvTreeListEntry* pTemp = m_pCurrentlyDisplayed;
- unloadAndCleanup( sal_False ); // don't dispose the connection
+ unloadAndCleanup( false ); // don't dispose the connection
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pTemp->GetUserData());
if (pData)
@@ -2959,7 +2959,7 @@ void SbaTableQueryBrowser::disposeConnection( SvTreeListEntry* _pDSEntry )
}
}
-void SbaTableQueryBrowser::closeConnection(SvTreeListEntry* _pDSEntry,sal_Bool _bDisposeConnection)
+void SbaTableQueryBrowser::closeConnection(SvTreeListEntry* _pDSEntry, bool _bDisposeConnection)
{
OSL_ENSURE(_pDSEntry, "SbaTableQueryBrowser::closeConnection: invalid entry (NULL)!");
OSL_ENSURE( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::closeConnection: invalid entry (not top-level)!");
@@ -2994,7 +2994,7 @@ void SbaTableQueryBrowser::closeConnection(SvTreeListEntry* _pDSEntry,sal_Bool _
disposeConnection( _pDSEntry );
}
-void SbaTableQueryBrowser::unloadAndCleanup( sal_Bool _bDisposeConnection )
+void SbaTableQueryBrowser::unloadAndCleanup( bool _bDisposeConnection )
{
if (!m_pCurrentlyDisplayed)
// nothing to do
@@ -3005,7 +3005,7 @@ void SbaTableQueryBrowser::unloadAndCleanup( sal_Bool _bDisposeConnection )
// de-select the path for the currently displayed table/query
if (m_pCurrentlyDisplayed)
{
- selectPath(m_pCurrentlyDisplayed, sal_False);
+ selectPath(m_pCurrentlyDisplayed, false);
}
m_pCurrentlyDisplayed = NULL;
@@ -3093,7 +3093,7 @@ void SbaTableQueryBrowser::impl_initialize()
OUString aTableName, aCatalogName, aSchemaName;
- sal_Bool bEsacpeProcessing = sal_True;
+ bool bEsacpeProcessing = true;
sal_Int32 nInitialDisplayCommandType = CommandType::COMMAND;
OUString sInitialDataSourceName;
OUString sInitialCommand;
@@ -3113,14 +3113,14 @@ void SbaTableQueryBrowser::impl_initialize()
// disable the browser if either of ShowTreeViewButton (compatibility name) or EnableBrowser
// is present and set to FALSE
- sal_Bool bDisableBrowser = ( sal_False == rArguments.getOrDefault( "ShowTreeViewButton", sal_True ) ) // compatibility name
+ bool bDisableBrowser = ( sal_False == rArguments.getOrDefault( "ShowTreeViewButton", sal_True ) ) // compatibility name
|| ( sal_False == rArguments.getOrDefault( (OUString)PROPERTY_ENABLE_BROWSER, sal_True ) );
OSL_ENSURE( !rArguments.has( "ShowTreeViewButton" ),
"SbaTableQueryBrowser::impl_initialize: ShowTreeViewButton is superseded by EnableBrowser!" );
m_bEnableBrowser = !bDisableBrowser;
// hide the tree view it is disabled in general, or if the settings tell to hide it initially
- sal_Bool bHideTreeView = ( !m_bEnableBrowser )
+ bool bHideTreeView = ( !m_bEnableBrowser )
|| ( sal_False == rArguments.getOrDefault( "ShowTreeView", sal_True ) ) // compatibility name
|| ( sal_False == rArguments.getOrDefault( (OUString)PROPERTY_SHOW_BROWSER, sal_True ) );
OSL_ENSURE( !rArguments.has( "ShowTreeView" ),
@@ -3234,7 +3234,7 @@ void SbaTableQueryBrowser::impl_initialize()
m_aDocScriptSupport = ::boost::optional< bool >( Reference< XEmbeddedScripts >( xDocument, UNO_QUERY ).is() );
}
- if ( implSelect( sInitialDataSourceName, sInitialCommand, nInitialDisplayCommandType, bEsacpeProcessing, xConnection, sal_True ) )
+ if ( implSelect( sInitialDataSourceName, sInitialCommand, nInitialDisplayCommandType, bEsacpeProcessing, xConnection, true ) )
{
try
{
@@ -3253,7 +3253,7 @@ void SbaTableQueryBrowser::impl_initialize()
InvalidateAll();
}
-sal_Bool SbaTableQueryBrowser::haveExplorer() const
+bool SbaTableQueryBrowser::haveExplorer() const
{
return m_pTreeView && m_pTreeView->IsVisible();
}
@@ -3287,7 +3287,7 @@ void SbaTableQueryBrowser::showExplorer()
InvalidateFeature(ID_BROWSER_EXPLORER);
}
-sal_Bool SbaTableQueryBrowser::ensureConnection(SvTreeListEntry* _pAnyEntry, SharedConnection& _rConnection)
+bool SbaTableQueryBrowser::ensureConnection(SvTreeListEntry* _pAnyEntry, SharedConnection& _rConnection)
{
SvTreeListEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent(_pAnyEntry);
DBTreeListUserData* pDSData =
@@ -3310,7 +3310,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
SAL_WNODEPRECATED_DECLARATIONS_POP
-sal_Bool SbaTableQueryBrowser::getExistentConnectionFor( SvTreeListEntry* _pAnyEntry, SharedConnection& _rConnection )
+bool SbaTableQueryBrowser::getExistentConnectionFor( SvTreeListEntry* _pAnyEntry, SharedConnection& _rConnection )
{
SvTreeListEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent( _pAnyEntry );
DBTreeListUserData* pDSData =
@@ -3330,7 +3330,7 @@ bool SbaTableQueryBrowser::impl_isDataSourceEntry( SvTreeListEntry* _pEntry ) co
#endif
-sal_Bool SbaTableQueryBrowser::ensureConnection( SvTreeListEntry* _pDSEntry, void* pDSData, SharedConnection& _rConnection )
+bool SbaTableQueryBrowser::ensureConnection( SvTreeListEntry* _pDSEntry, void* pDSData, SharedConnection& _rConnection )
{
OSL_ENSURE( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::ensureConnection: this entry does not denote a data source!" );
if(_pDSEntry)
@@ -3480,15 +3480,15 @@ void SbaTableQueryBrowser::implAdministrate( SvTreeListEntry* _pApplyTo )
}
}
-sal_Bool SbaTableQueryBrowser::requestQuickHelp( const SvTreeListEntry* _pEntry, OUString& _rText ) const
+bool SbaTableQueryBrowser::requestQuickHelp( const SvTreeListEntry* _pEntry, OUString& _rText ) const
{
const DBTreeListUserData* pData = static_cast< const DBTreeListUserData* >( _pEntry->GetUserData() );
if ( ( pData->eType == etDatasource ) && !pData->sAccessor.isEmpty() )
{
_rText = ::svt::OFileNotation( pData->sAccessor ).get( ::svt::OFileNotation::N_SYSTEM );
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
PopupMenu* SbaTableQueryBrowser::getContextMenu( Control& _rControl ) const
@@ -3551,10 +3551,10 @@ Any SbaTableQueryBrowser::getCurrentSelection( Control& _rControl ) const
return makeAny( aSelectedObject );
}
-sal_Bool SbaTableQueryBrowser::implGetQuerySignature( OUString& _rCommand, sal_Bool& _bEscapeProcessing )
+bool SbaTableQueryBrowser::implGetQuerySignature( OUString& _rCommand, bool& _bEscapeProcessing )
{
_rCommand = "";
- _bEscapeProcessing = sal_False;
+ _bEscapeProcessing = false;
try
{
@@ -3570,7 +3570,7 @@ sal_Bool SbaTableQueryBrowser::implGetQuerySignature( OUString& _rCommand, sal_B
// do we need to do anything?
if ( CommandType::QUERY != nCommandType )
- return sal_False;
+ return false;
// get the query object
Reference< XQueryDefinitionsSupplier > xSuppQueries;
@@ -3588,7 +3588,7 @@ sal_Bool SbaTableQueryBrowser::implGetQuerySignature( OUString& _rCommand, sal_B
{
xQuery->getPropertyValue( PROPERTY_COMMAND ) >>= _rCommand;
_bEscapeProcessing = ::cppu::any2bool( xQuery->getPropertyValue( PROPERTY_ESCAPE_PROCESSING ) );
- return sal_True;
+ return true;
}
}
catch( const Exception& )
@@ -3596,7 +3596,7 @@ sal_Bool SbaTableQueryBrowser::implGetQuerySignature( OUString& _rCommand, sal_B
DBG_UNHANDLED_EXCEPTION();
}
- return sal_False;
+ return false;
}
void SbaTableQueryBrowser::frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( RuntimeException, std::exception )
@@ -3673,9 +3673,9 @@ OUString SbaTableQueryBrowser::getPrivateTitle() const
return sTitle;
}
-sal_Bool SbaTableQueryBrowser::preReloadForm()
+bool SbaTableQueryBrowser::preReloadForm()
{
- sal_Bool bIni = sal_False;
+ bool bIni = false;
if ( !m_pCurrentlyDisplayed )
{
// switch the grid to design mode while loading
@@ -3687,14 +3687,14 @@ sal_Bool SbaTableQueryBrowser::preReloadForm()
OUString sDataSource;
OUString sCommand;
sal_Int32 nCommandType = CommandType::COMMAND;
- sal_Bool bEscapeProcessing = sal_True;
+ bool bEscapeProcessing = true;
extractDescriptorProps(aDesc, sDataSource, sCommand, nCommandType, bEscapeProcessing);
if ( !sDataSource.isEmpty() && !sCommand.isEmpty() && (-1 != nCommandType) )
{
SvTreeListEntry* pDataSource = NULL;
SvTreeListEntry* pCommandType = NULL;
- m_pCurrentlyDisplayed = getObjectEntry( sDataSource, sCommand, nCommandType, &pDataSource, &pCommandType, sal_True, SharedConnection() );
- bIni = sal_True;
+ m_pCurrentlyDisplayed = getObjectEntry( sDataSource, sCommand, nCommandType, &pDataSource, &pCommandType, true, SharedConnection() );
+ bIni = true;
}
}
return bIni;
@@ -3769,7 +3769,7 @@ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const OUString& _rDataSo
{ // a table or query belonging to the deleted data source is currently beeing displayed.
OSL_ENSURE( m_pTreeView->getListBox().GetRootLevelParent( m_pCurrentlyDisplayed ) == pDataSourceEntry,
"SbaTableQueryBrowser::impl_cleanupDataSourceEntry: inconsistence (1)!" );
- unloadAndCleanup( sal_True );
+ unloadAndCleanup( true );
}
else
OSL_ENSURE(