summaryrefslogtreecommitdiff
path: root/dbaccess/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-05 09:46:12 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-06 06:48:38 +0000
commitf3d9aab8410c00298f29ca0194c5d33d53c63ff2 (patch)
tree370d24d49547d8eb2cdbcb293992d9b9a4a670ed /dbaccess/source
parent654c98064d3fd2bd1e13ae2bda5f84e8d51d0071 (diff)
teach passstuffbyref plugin to check for..
unnecessarily passing primitives by const ref. Suggested by Tor Lillqvist Change-Id: I445e220542969ca3e252581e5953fb01cb2b2be6 Reviewed-on: https://gerrit.libreoffice.org/24672 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'dbaccess/source')
-rw-r--r--dbaccess/source/ui/dlg/dlgsave.cxx6
-rw-r--r--dbaccess/source/ui/inc/FieldDescriptions.hxx8
-rw-r--r--dbaccess/source/ui/inc/IUpdateHelper.hxx2
-rw-r--r--dbaccess/source/ui/inc/UITools.hxx2
-rw-r--r--dbaccess/source/ui/inc/dlgsave.hxx2
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx2
-rw-r--r--dbaccess/source/ui/misc/UpdateHelperImpl.hxx4
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescriptions.cxx8
8 files changed, 17 insertions, 17 deletions
diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx
index 7c89d7160a02..2a08d66ad7a1 100644
--- a/dbaccess/source/ui/dlg/dlgsave.cxx
+++ b/dbaccess/source/ui/dlg/dlgsave.cxx
@@ -64,7 +64,7 @@ public:
sal_Int32 m_nType;
sal_Int32 m_nFlags;
- OSaveAsDlgImpl( OSaveAsDlg* pParent,const sal_Int32& _rType,
+ OSaveAsDlgImpl( OSaveAsDlg* pParent, sal_Int32 _rType,
const css::uno::Reference< css::sdbc::XConnection>& _xConnection,
const OUString& rDefault,
const IObjectNameCheck& _rObjectNameCheck,
@@ -78,7 +78,7 @@ public:
} // dbaui
OSaveAsDlgImpl::OSaveAsDlgImpl(OSaveAsDlg* pParent,
- const sal_Int32& _rType,
+ sal_Int32 _rType,
const Reference< XConnection>& _xConnection,
const OUString& rDefault,
const IObjectNameCheck& _rObjectNameCheck,
@@ -170,7 +170,7 @@ void lcl_fillComboList( ComboBox& _rList, const Reference< XConnection >& _rxCon
}
OSaveAsDlg::OSaveAsDlg( vcl::Window * pParent,
- const sal_Int32& _rType,
+ sal_Int32 _rType,
const Reference< XComponentContext >& _rxContext,
const Reference< XConnection>& _xConnection,
const OUString& rDefault,
diff --git a/dbaccess/source/ui/inc/FieldDescriptions.hxx b/dbaccess/source/ui/inc/FieldDescriptions.hxx
index 19faa09fdc76..f4cd5cee3b62 100644
--- a/dbaccess/source/ui/inc/FieldDescriptions.hxx
+++ b/dbaccess/source/ui/inc/FieldDescriptions.hxx
@@ -74,10 +74,10 @@ namespace dbaui
void SetType(const TOTypeInfoSP& _pType);
void SetTypeValue(sal_Int32 _nType);
void SetTypeName(const OUString& _sTypeName);
- void SetPrecision(const sal_Int32& _rPrecision);
- void SetScale(const sal_Int32& _rScale);
- void SetIsNullable(const sal_Int32& _rIsNullable);
- void SetFormatKey(const sal_Int32& _rFormatKey);
+ void SetPrecision(sal_Int32 _rPrecision);
+ void SetScale(sal_Int32 _rScale);
+ void SetIsNullable(sal_Int32 _rIsNullable);
+ void SetFormatKey(sal_Int32 _rFormatKey);
void SetHorJustify(const SvxCellHorJustify& _rHorJustify);
void SetAutoIncrement(bool _bAuto);
void SetPrimaryKey(bool _bPKey);
diff --git a/dbaccess/source/ui/inc/IUpdateHelper.hxx b/dbaccess/source/ui/inc/IUpdateHelper.hxx
index 782887eb5f2a..93491a2989d6 100644
--- a/dbaccess/source/ui/inc/IUpdateHelper.hxx
+++ b/dbaccess/source/ui/inc/IUpdateHelper.hxx
@@ -30,7 +30,7 @@ namespace dbaui
public:
virtual void updateString(sal_Int32 _nPos, const OUString& _sValue) = 0;
virtual void updateDouble(sal_Int32 _nPos,const double& _nValue) = 0;
- virtual void updateInt(sal_Int32 _nPos,const sal_Int32& _nValue) = 0;
+ virtual void updateInt(sal_Int32 _nPos, sal_Int32 _nValue) = 0;
virtual void updateNull(sal_Int32 _nPos, ::sal_Int32 sqlType) = 0;
virtual void updateDate(sal_Int32 _nPos,const css::util::Date& _nValue) = 0;
virtual void updateTime(sal_Int32 _nPos,const css::util::Time& _nValue) = 0;
diff --git a/dbaccess/source/ui/inc/UITools.hxx b/dbaccess/source/ui/inc/UITools.hxx
index 0340ca2e2e3c..18a6c2dbf1c5 100644
--- a/dbaccess/source/ui/inc/UITools.hxx
+++ b/dbaccess/source/ui/inc/UITools.hxx
@@ -180,7 +180,7 @@ namespace dbaui
@param css::awt::TextAlign& _nAlignment
@return the corresponding SvxCellHorJustify
*/
- SvxCellHorJustify mapTextJustify(const sal_Int32& _nAlignment);
+ SvxCellHorJustify mapTextJustify(sal_Int32 _nAlignment);
/** call the format dialog and set the selected format at the column
@param _xAffectedCol Font to be converted
diff --git a/dbaccess/source/ui/inc/dlgsave.hxx b/dbaccess/source/ui/inc/dlgsave.hxx
index e01d3d2114be..e20cec77768c 100644
--- a/dbaccess/source/ui/inc/dlgsave.hxx
+++ b/dbaccess/source/ui/inc/dlgsave.hxx
@@ -52,7 +52,7 @@ namespace dbaui
OSaveAsDlgImpl* m_pImpl;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
public:
- OSaveAsDlg( vcl::Window * pParent,const sal_Int32& _rType,
+ OSaveAsDlg( vcl::Window * pParent, sal_Int32 _rType,
const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
const css::uno::Reference< css::sdbc::XConnection>& _xConnection,
const OUString& rDefault,
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index abde97068c2a..1029b77cf5e8 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -735,7 +735,7 @@ sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment)
return nAlignment;
}
-SvxCellHorJustify mapTextJustify(const sal_Int32& _nAlignment)
+SvxCellHorJustify mapTextJustify(sal_Int32 _nAlignment)
{
SvxCellHorJustify eJustify = SVX_HOR_JUSTIFY_LEFT;
switch (_nAlignment)
diff --git a/dbaccess/source/ui/misc/UpdateHelperImpl.hxx b/dbaccess/source/ui/misc/UpdateHelperImpl.hxx
index 54f9569d38bf..4d3d8271da1c 100644
--- a/dbaccess/source/ui/misc/UpdateHelperImpl.hxx
+++ b/dbaccess/source/ui/misc/UpdateHelperImpl.hxx
@@ -60,7 +60,7 @@ namespace dbaui
{
m_xRowUpdate->updateTimestamp(_nPos, _nValue);
}
- virtual void updateInt(sal_Int32 _nPos,const sal_Int32& _nValue) override
+ virtual void updateInt(sal_Int32 _nPos, sal_Int32 _nValue) override
{
m_xRowUpdate->updateInt(_nPos, _nValue);
}
@@ -110,7 +110,7 @@ namespace dbaui
{
m_xParameters->setTimestamp(_nPos, _nValue);
}
- virtual void updateInt(sal_Int32 _nPos,const sal_Int32& _nValue) override
+ virtual void updateInt(sal_Int32 _nPos, sal_Int32 _nValue) override
{
m_xParameters->setInt(_nPos, _nValue);
}
diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
index 7b9231817485..52cb0595527b 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
@@ -363,7 +363,7 @@ void OFieldDescription::SetTypeValue(sal_Int32 _nType)
}
}
-void OFieldDescription::SetPrecision(const sal_Int32& _rPrecision)
+void OFieldDescription::SetPrecision(sal_Int32 _rPrecision)
{
try
{
@@ -378,7 +378,7 @@ void OFieldDescription::SetPrecision(const sal_Int32& _rPrecision)
}
}
-void OFieldDescription::SetScale(const sal_Int32& _rScale)
+void OFieldDescription::SetScale(sal_Int32 _rScale)
{
try
{
@@ -393,7 +393,7 @@ void OFieldDescription::SetScale(const sal_Int32& _rScale)
}
}
-void OFieldDescription::SetIsNullable(const sal_Int32& _rIsNullable)
+void OFieldDescription::SetIsNullable(sal_Int32 _rIsNullable)
{
try
{
@@ -408,7 +408,7 @@ void OFieldDescription::SetIsNullable(const sal_Int32& _rIsNullable)
}
}
-void OFieldDescription::SetFormatKey(const sal_Int32& _rFormatKey)
+void OFieldDescription::SetFormatKey(sal_Int32 _rFormatKey)
{
try
{