summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-31 11:37:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-01 07:12:23 +0100
commitc45a3488af6455a3b307f9e64bed41d23b3bae53 (patch)
treec01870fee017c1b9edcad3836d6dc124b147db1b /dbaccess
parentdae6ba564fcf20299b7a560aeb346efc84364d41 (diff)
loplugin:constantparam in d*
Change-Id: I65c395157d2b68a549a6fecf9abf1fd46446d960 Reviewed-on: https://gerrit.libreoffice.org/44109 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx11
-rw-r--r--dbaccess/source/core/api/column.cxx4
-rw-r--r--dbaccess/source/core/api/definitioncolumn.cxx2
-rw-r--r--dbaccess/source/core/api/tablecontainer.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/ContentHelper.cxx2
-rw-r--r--dbaccess/source/core/inc/sdbcoretools.hxx2
-rw-r--r--dbaccess/source/core/misc/sdbcoretools.cxx4
-rw-r--r--dbaccess/source/ui/control/SqlNameEdit.cxx6
-rw-r--r--dbaccess/source/ui/dlg/adminpages.cxx4
-rw-r--r--dbaccess/source/ui/dlg/adminpages.hxx7
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx2
11 files changed, 19 insertions, 27 deletions
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index ea4169f58d00..915c13e75808 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -164,15 +164,14 @@ namespace
return sSQL;
}
- /** resets an SQL iterator, including deletion of the parse tree, and disposal if desired
+ /** resets an SQL iterator, including deletion of the parse tree, and dispose
*/
- void resetIterator( OSQLParseTreeIterator& _rIterator, bool _bDispose )
+ void resetIterator( OSQLParseTreeIterator& _rIterator )
{
const OSQLParseNode* pSqlParseNode = _rIterator.getParseTree();
_rIterator.setParseTree(nullptr);
delete pSqlParseNode;
- if ( _bDispose )
- _rIterator.dispose();
+ _rIterator.dispose();
}
void lcl_addFilterCriteria_throw(sal_Int32 i_nFilterOperator,const OUString& i_sValue,OUStringBuffer& o_sRet)
{
@@ -283,8 +282,8 @@ void SAL_CALL OSingleSelectQueryComposer::disposing()
MutexGuard aGuard(m_aMutex);
- resetIterator( m_aSqlIterator, true );
- resetIterator( m_aAdditiveIterator, true );
+ resetIterator( m_aSqlIterator );
+ resetIterator( m_aAdditiveIterator );
m_xConnectionTables = nullptr;
m_xConnection = nullptr;
diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx
index 66569a5e0f14..ee2df90ae9cb 100644
--- a/dbaccess/source/core/api/column.cxx
+++ b/dbaccess/source/core/api/column.cxx
@@ -379,7 +379,7 @@ sdbcx::ObjectType OColumns::appendObject( const OUString& _rForName, const Refer
if ( m_pColFactoryImpl )
m_pColFactoryImpl->columnAppended( descriptor );
- ::dbaccess::notifyDataSourceModified(m_xParent,true);
+ ::dbaccess::notifyDataSourceModified(m_xParent);
return xReturn;
}
@@ -409,7 +409,7 @@ void OColumns::dropObject(sal_Int32 _nPos, const OUString& _sElementName)
if ( m_pColFactoryImpl )
m_pColFactoryImpl->columnDropped(_sElementName);
- ::dbaccess::notifyDataSourceModified(m_xParent,true);
+ ::dbaccess::notifyDataSourceModified(m_xParent);
}
Reference< XInterface > SAL_CALL OColumns::getParent( )
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx
index 147d97d37c82..b99b7b199b81 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -114,7 +114,7 @@ Sequence< OUString > OTableColumnDescriptor::getSupportedServiceNames( )
void OTableColumnDescriptor::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& rValue )
{
OColumn::setFastPropertyValue_NoBroadcast( nHandle, rValue );
- ::dbaccess::notifyDataSourceModified( m_xParent, true );
+ ::dbaccess::notifyDataSourceModified( m_xParent );
}
Reference< XInterface > SAL_CALL OTableColumnDescriptor::getParent( )
diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx
index 0eb6fbe79c43..f797ff9aaa48 100644
--- a/dbaccess/source/core/api/tablecontainer.cxx
+++ b/dbaccess/source/core/api/tablecontainer.cxx
@@ -330,7 +330,7 @@ ObjectType OTableContainer::appendObject( const OUString& _rForName, const Refer
PROPERTY_ROW_HEIGHT, PROPERTY_TEXTCOLOR, PROPERTY_TEXTLINECOLOR,
PROPERTY_TEXTEMPHASIS, PROPERTY_TEXTRELIEF};
if ( bModified || !lcl_isPropertySetDefaulted(aNames,xTableDefinition) )
- ::dbaccess::notifyDataSourceModified(m_xTableDefinitions,true);
+ ::dbaccess::notifyDataSourceModified(m_xTableDefinitions);
return createObject( _rForName );
}
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index eec6d82b0cab..18db105b95d9 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -620,7 +620,7 @@ void SAL_CALL OContentHelper::rename( const OUString& newName )
void OContentHelper::notifyDataSourceModified()
{
- ::dbaccess::notifyDataSourceModified(m_xParentContainer,true);
+ ::dbaccess::notifyDataSourceModified(m_xParentContainer);
}
} // namespace dbaccess
diff --git a/dbaccess/source/core/inc/sdbcoretools.hxx b/dbaccess/source/core/inc/sdbcoretools.hxx
index 13afbb86c909..72f62194144f 100644
--- a/dbaccess/source/core/inc/sdbcoretools.hxx
+++ b/dbaccess/source/core/inc/sdbcoretools.hxx
@@ -31,7 +31,7 @@
namespace dbaccess
{
- void notifyDataSourceModified(const css::uno::Reference< css::uno::XInterface >& _rxObject,bool _bModified);
+ void notifyDataSourceModified(const css::uno::Reference< css::uno::XInterface >& _rxObject);
css::uno::Reference< css::uno::XInterface >
getDataSource( const css::uno::Reference< css::uno::XInterface >& _rxDependentObject );
diff --git a/dbaccess/source/core/misc/sdbcoretools.cxx b/dbaccess/source/core/misc/sdbcoretools.cxx
index edf8d2b9f214..96570276f6f9 100644
--- a/dbaccess/source/core/misc/sdbcoretools.cxx
+++ b/dbaccess/source/core/misc/sdbcoretools.cxx
@@ -49,7 +49,7 @@ namespace dbaccess
using namespace ::com::sun::star::embed;
using namespace ::com::sun::star::container;
- void notifyDataSourceModified(const css::uno::Reference< css::uno::XInterface >& _rxObject,bool _bModified)
+ void notifyDataSourceModified(const css::uno::Reference< css::uno::XInterface >& _rxObject)
{
Reference< XInterface > xDs = getDataSource( _rxObject );
Reference<XDocumentDataSource> xDocumentDataSource(xDs,UNO_QUERY);
@@ -57,7 +57,7 @@ namespace dbaccess
xDs = xDocumentDataSource->getDatabaseDocument();
Reference< XModifiable > xModi( xDs, UNO_QUERY );
if ( xModi.is() )
- xModi->setModified(_bModified);
+ xModi->setModified(true);
}
Reference< XInterface > getDataSource( const Reference< XInterface >& _rxDependentObject )
diff --git a/dbaccess/source/ui/control/SqlNameEdit.cxx b/dbaccess/source/ui/control/SqlNameEdit.cxx
index 27827a631bb4..585c4398d1b1 100644
--- a/dbaccess/source/ui/control/SqlNameEdit.cxx
+++ b/dbaccess/source/ui/control/SqlNameEdit.cxx
@@ -22,14 +22,14 @@
namespace dbaui
{
- bool isCharOk(sal_Unicode _cChar,bool _bFirstChar,bool _bUpperCase,const OUString& _sAllowedChars)
+ bool isCharOk(sal_Unicode _cChar,bool _bFirstChar, const OUString& _sAllowedChars)
{
return (
(_cChar >= 'A' && _cChar <= 'Z') ||
_cChar == '_' ||
_sAllowedChars.indexOf(_cChar) != -1 ||
(!_bFirstChar && (_cChar >= '0' && _cChar <= '9')) ||
- (!_bUpperCase && (_cChar >= 'a' && _cChar <= 'z'))
+ (_cChar >= 'a' && _cChar <= 'z')
);
}
bool OSQLNameChecker::checkString(const OUString& _sToCheck,
@@ -41,7 +41,7 @@ namespace dbaui
sal_Int32 nMatch = 0;
for (sal_Int32 i = nMatch; i < _sToCheck.getLength(); ++i)
{
- if ( !isCharOk( _sToCheck[i], i == 0, false/*bOnlyUpperCase*/, m_sAllowedChars ) )
+ if ( !isCharOk( _sToCheck[i], i == 0, m_sAllowedChars ) )
{
_rsCorrected += _sToCheck.copy(nMatch, i - nMatch);
bCorrected = true;
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index 92d62b0fcf1c..bf1caccd2417 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -272,14 +272,14 @@ namespace dbaui
}
// LayoutHelper
- void LayoutHelper::positionBelow( const Control& _rReference, Control& _rControl, const ControlRelation _eRelation,
+ void LayoutHelper::positionBelow( const Control& _rReference, Control& _rControl,
const long _nIndentAppFont )
{
Point aReference = _rReference.GetPosPixel();
aReference.Y() += _rReference.GetSizePixel().Height();
const vcl::Window* pConverter = _rControl.GetParent();
- Size aOffset = pConverter->LogicToPixel(Size(_nIndentAppFont, (_eRelation == RelatedControls ? 3 : 6)), MapMode(MapUnit::MapAppFont));
+ Size aOffset = pConverter->LogicToPixel(Size(_nIndentAppFont, 3), MapMode(MapUnit::MapAppFont));
Point aControlPos( aReference.X() + aOffset.Width(), aReference.Y() + aOffset.Height() );
_rControl.SetPosPixel( aControlPos );
diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx
index 0c5d7452e309..65025ba24ef1 100644
--- a/dbaccess/source/ui/dlg/adminpages.hxx
+++ b/dbaccess/source/ui/dlg/adminpages.hxx
@@ -214,12 +214,6 @@ namespace dbaui
DECL_LINK(OnTestConnectionClickHdl, Button*, void);
};
- // ControlRelation
- enum ControlRelation
- {
- RelatedControls, UnrelatedControls
- };
-
// LayoutHelper
class LayoutHelper
{
@@ -227,7 +221,6 @@ namespace dbaui
static void positionBelow(
const Control& _rReference,
Control& _rControl,
- const ControlRelation _eRelation,
const long _nIndentAppFont
);
/** fits the button size to be large enough to contain the buttons text
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 90fc389215eb..28a79c048981 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -578,7 +578,7 @@ namespace dbaui
SetText( OUString() );
- LayoutHelper::positionBelow( *m_pRB_ConnectDatabase, *m_pDatasourceType, RelatedControls, INDENT_BELOW_RADIO );
+ LayoutHelper::positionBelow( *m_pRB_ConnectDatabase, *m_pDatasourceType, INDENT_BELOW_RADIO );
if ( !bValid || bReadonly )
{