Kaydet (Commit) 73c1ac01 authored tarafından Noel Grandin's avatar Noel Grandin

connectivity: sal_Bool->bool

Change-Id: Ia45f9776e0b27720647c664541a41b5f46eedc37
üst 3194d22a
...@@ -86,7 +86,7 @@ namespace dbtools ...@@ -86,7 +86,7 @@ namespace dbtools
} }
void FilterManager::setApplyPublicFilter( sal_Bool _bApply ) void FilterManager::setApplyPublicFilter( bool _bApply )
{ {
if ( m_bApplyPublicFilter == _bApply ) if ( m_bApplyPublicFilter == _bApply )
return; return;
......
...@@ -76,7 +76,7 @@ namespace dbtools ...@@ -76,7 +76,7 @@ namespace dbtools
//= OPredicateInputController //= OPredicateInputController
sal_Bool OPredicateInputController::getSeparatorChars( const Locale& _rLocale, sal_Unicode& _rDecSep, sal_Unicode& _rThdSep ) const bool OPredicateInputController::getSeparatorChars( const Locale& _rLocale, sal_Unicode& _rDecSep, sal_Unicode& _rThdSep ) const
{ {
_rDecSep = '.'; _rDecSep = '.';
_rThdSep = ','; _rThdSep = ',';
...@@ -88,14 +88,14 @@ namespace dbtools ...@@ -88,14 +88,14 @@ namespace dbtools
aLocaleData = m_xLocaleData->getLocaleItem( _rLocale ); aLocaleData = m_xLocaleData->getLocaleItem( _rLocale );
_rDecSep = lcl_getSeparatorChar( aLocaleData.decimalSeparator, _rDecSep ); _rDecSep = lcl_getSeparatorChar( aLocaleData.decimalSeparator, _rDecSep );
_rThdSep = lcl_getSeparatorChar( aLocaleData.decimalSeparator, _rThdSep ); _rThdSep = lcl_getSeparatorChar( aLocaleData.decimalSeparator, _rThdSep );
return sal_True; return true;
} }
} }
catch( const Exception& ) catch( const Exception& )
{ {
OSL_FAIL( "OPredicateInputController::getSeparatorChars: caught an exception!" ); OSL_FAIL( "OPredicateInputController::getSeparatorChars: caught an exception!" );
} }
return sal_False; return false;
} }
...@@ -245,13 +245,13 @@ namespace dbtools ...@@ -245,13 +245,13 @@ namespace dbtools
} }
sal_Bool OPredicateInputController::normalizePredicateString( bool OPredicateInputController::normalizePredicateString(
OUString& _rPredicateValue, const Reference< XPropertySet > & _rxField, OUString* _pErrorMessage ) const OUString& _rPredicateValue, const Reference< XPropertySet > & _rxField, OUString* _pErrorMessage ) const
{ {
OSL_ENSURE( m_xConnection.is() && m_xFormatter.is() && _rxField.is(), OSL_ENSURE( m_xConnection.is() && m_xFormatter.is() && _rxField.is(),
"OPredicateInputController::normalizePredicateString: invalid state or params!" ); "OPredicateInputController::normalizePredicateString: invalid state or params!" );
sal_Bool bSuccess = sal_False; bool bSuccess = false;
if ( m_xConnection.is() && m_xFormatter.is() && _rxField.is() ) if ( m_xConnection.is() && m_xFormatter.is() && _rxField.is() )
{ {
// parse the string // parse the string
...@@ -275,7 +275,7 @@ namespace dbtools ...@@ -275,7 +275,7 @@ namespace dbtools
_rPredicateValue = sTransformedText; _rPredicateValue = sTransformedText;
delete pParseNode; delete pParseNode;
bSuccess = sal_True; bSuccess = true;
} }
} }
...@@ -285,7 +285,7 @@ namespace dbtools ...@@ -285,7 +285,7 @@ namespace dbtools
OUString OPredicateInputController::getPredicateValue( OUString OPredicateInputController::getPredicateValue(
const OUString& _rPredicateValue, const Reference< XPropertySet > & _rxField, const OUString& _rPredicateValue, const Reference< XPropertySet > & _rxField,
sal_Bool _bForStatementUse, OUString* _pErrorMessage ) const bool _bForStatementUse, OUString* _pErrorMessage ) const
{ {
OSL_ENSURE( _rxField.is(), "OPredicateInputController::getPredicateValue: invalid params!" ); OSL_ENSURE( _rxField.is(), "OPredicateInputController::getPredicateValue: invalid params!" );
OUString sReturn; OUString sReturn;
...@@ -331,7 +331,7 @@ namespace dbtools ...@@ -331,7 +331,7 @@ namespace dbtools
} }
OUString OPredicateInputController::getPredicateValue( OUString OPredicateInputController::getPredicateValue(
const OUString& _sField, const OUString& _rPredicateValue, sal_Bool _bForStatementUse, OUString* _pErrorMessage ) const const OUString& _sField, const OUString& _rPredicateValue, bool _bForStatementUse, OUString* _pErrorMessage ) const
{ {
OUString sReturn = _rPredicateValue; OUString sReturn = _rPredicateValue;
OUString sError; OUString sError;
...@@ -381,7 +381,7 @@ namespace dbtools ...@@ -381,7 +381,7 @@ namespace dbtools
return pParseNode ? implParseNode(pParseNode,_bForStatementUse) : sReturn; return pParseNode ? implParseNode(pParseNode,_bForStatementUse) : sReturn;
} }
OUString OPredicateInputController::implParseNode(OSQLParseNode* pParseNode,sal_Bool _bForStatementUse) const OUString OPredicateInputController::implParseNode(OSQLParseNode* pParseNode, bool _bForStatementUse) const
{ {
OUString sReturn; OUString sReturn;
if ( pParseNode ) if ( pParseNode )
......
...@@ -1513,11 +1513,11 @@ namespace ...@@ -1513,11 +1513,11 @@ namespace
if ( i_xSelectColumns.is() && i_xSelectColumns->hasByName(pAndIter->Name) ) if ( i_xSelectColumns.is() && i_xSelectColumns->hasByName(pAndIter->Name) )
{ {
Reference<XPropertySet> xColumn(i_xSelectColumns->getByName(pAndIter->Name),UNO_QUERY); Reference<XPropertySet> xColumn(i_xSelectColumns->getByName(pAndIter->Name),UNO_QUERY);
sValue = i_aPredicateInputController.getPredicateValue(sValue,xColumn,sal_True); sValue = i_aPredicateInputController.getPredicateValue(sValue,xColumn,true);
} }
else else
{ {
sValue = i_aPredicateInputController.getPredicateValue(pAndIter->Name,sValue,sal_True); sValue = i_aPredicateInputController.getPredicateValue(pAndIter->Name,sValue,true);
} }
lcl_addFilterCriteria_throw(pAndIter->Handle,sValue,sRet); lcl_addFilterCriteria_throw(pAndIter->Handle,sValue,sRet);
++pAndIter; ++pAndIter;
......
...@@ -248,7 +248,7 @@ namespace dbaui ...@@ -248,7 +248,7 @@ namespace dbaui
OUString sValue; OUString sValue;
pValues->Value >>= sValue; pValues->Value >>= sValue;
pValues->Value <<= OUString( m_aPredicateInput.getPredicateValue( sValue, xParamAsSet, sal_False ) ); pValues->Value <<= OUString( m_aPredicateInput.getPredicateValue( sValue, xParamAsSet, false ) );
} }
} }
catch(Exception&) catch(Exception&)
......
...@@ -346,7 +346,7 @@ sal_Bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rCom ...@@ -346,7 +346,7 @@ sal_Bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rCom
_rFilter.Handle = GetOSQLPredicateType( _rComp.GetSelectEntry() ); _rFilter.Handle = GetOSQLPredicateType( _rComp.GetSelectEntry() );
if ( SQLFilterOperator::SQLNULL != _rFilter.Handle && _rFilter.Handle != SQLFilterOperator::NOT_SQLNULL ) if ( SQLFilterOperator::SQLNULL != _rFilter.Handle && _rFilter.Handle != SQLFilterOperator::NOT_SQLNULL )
{ {
OUString sPredicateValue = m_aPredicateInput.getPredicateValue( _rValue.GetText(), getMatchingColumn( _rValue ), sal_False ); OUString sPredicateValue = m_aPredicateInput.getPredicateValue( _rValue.GetText(), getMatchingColumn( _rValue ), false );
if ( _rFilter.Handle == SQLFilterOperator::LIKE || if ( _rFilter.Handle == SQLFilterOperator::LIKE ||
_rFilter.Handle == SQLFilterOperator::NOT_LIKE ) _rFilter.Handle == SQLFilterOperator::NOT_LIKE )
::Replace_OS_PlaceHolder( sPredicateValue ); ::Replace_OS_PlaceHolder( sPredicateValue );
......
...@@ -72,7 +72,7 @@ namespace dbtools ...@@ -72,7 +72,7 @@ namespace dbtools
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
m_xComponentAggregate; m_xComponentAggregate;
::std::vector< OUString > m_aFilterComponents; ::std::vector< OUString > m_aFilterComponents;
sal_Bool m_bApplyPublicFilter; bool m_bApplyPublicFilter;
public: public:
/// ctor /// ctor
...@@ -87,8 +87,8 @@ namespace dbtools ...@@ -87,8 +87,8 @@ namespace dbtools
const OUString& getFilterComponent( FilterComponent _eWhich ) const; const OUString& getFilterComponent( FilterComponent _eWhich ) const;
void setFilterComponent( FilterComponent _eWhich, const OUString& _rComponent ); void setFilterComponent( FilterComponent _eWhich, const OUString& _rComponent );
inline sal_Bool isApplyPublicFilter( ) const { return m_bApplyPublicFilter; } inline bool isApplyPublicFilter( ) const { return m_bApplyPublicFilter; }
void setApplyPublicFilter( sal_Bool _bApply ); void setApplyPublicFilter( bool _bApply );
private: private:
/** retrieves a filter which is a conjunction of all single filter components /** retrieves a filter which is a conjunction of all single filter components
......
...@@ -68,7 +68,7 @@ namespace dbtools ...@@ -68,7 +68,7 @@ namespace dbtools
If not <NULL/>, and a parsing error occurs, the error message will be copied to the string the argument If not <NULL/>, and a parsing error occurs, the error message will be copied to the string the argument
points to. points to.
*/ */
sal_Bool normalizePredicateString( bool normalizePredicateString(
OUString& _rPredicateValue, OUString& _rPredicateValue,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxField,
OUString* _pErrorMessage = NULL OUString* _pErrorMessage = NULL
...@@ -90,14 +90,14 @@ namespace dbtools ...@@ -90,14 +90,14 @@ namespace dbtools
OUString getPredicateValue( OUString getPredicateValue(
const OUString& _rPredicateValue, const OUString& _rPredicateValue,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & _rxField, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & _rxField,
sal_Bool _bForStatementUse, bool _bForStatementUse,
OUString* _pErrorMessage = NULL OUString* _pErrorMessage = NULL
) const; ) const;
OUString getPredicateValue( OUString getPredicateValue(
const OUString& _sField const OUString& _sField
, const OUString& _rPredicateValue , const OUString& _rPredicateValue
, sal_Bool _bForStatementUse , bool _bForStatementUse
, OUString* _pErrorMessage = NULL) const; , OUString* _pErrorMessage = NULL) const;
private: private:
...@@ -107,13 +107,13 @@ namespace dbtools ...@@ -107,13 +107,13 @@ namespace dbtools
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & _rxField const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & _rxField
) const; ) const;
sal_Bool getSeparatorChars( bool getSeparatorChars(
const ::com::sun::star::lang::Locale& _rLocale, const ::com::sun::star::lang::Locale& _rLocale,
sal_Unicode& _rDecSep, sal_Unicode& _rDecSep,
sal_Unicode& _rThdSep sal_Unicode& _rThdSep
) const; ) const;
OUString implParseNode(::connectivity::OSQLParseNode* pParseNode,sal_Bool _bForStatementUse) const; OUString implParseNode(::connectivity::OSQLParseNode* pParseNode, bool _bForStatementUse) const;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment