summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-02 16:53:51 +0200
committerNoel Grandin <noel@peralex.com>2016-03-03 08:11:02 +0200
commite13ba2d41deb93da53607a924e234730f4e0349c (patch)
treed341449e68d0be70a6e8c1e79776f40024b43c54 /dbaccess
parentbd2bf6bd559163389d1e6b6b948fc29cee5f13f5 (diff)
loplugin:unuseddefaultparams in dbaccess
Change-Id: I5f417aea43b4aa841ee45e947b982e6341c7b18b
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx5
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.hxx3
-rw-r--r--dbaccess/source/ui/app/AppController.cxx4
-rw-r--r--dbaccess/source/ui/app/AppController.hxx5
-rw-r--r--dbaccess/source/ui/app/AppView.cxx4
-rw-r--r--dbaccess/source/ui/app/AppView.hxx5
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx11
-rw-r--r--dbaccess/source/ui/browser/dsbrowserDnD.cxx4
-rw-r--r--dbaccess/source/ui/inc/WNameMatch.hxx2
-rw-r--r--dbaccess/source/ui/inc/brwctrlr.hxx6
-rw-r--r--dbaccess/source/ui/inc/unodatbr.hxx2
-rw-r--r--dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx5
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx5
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.hxx2
16 files changed, 30 insertions, 39 deletions
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index c4c5c5e76417..aef17d1380ec 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1009,9 +1009,10 @@ void ODatabaseModelImpl::commitStorages()
getDocumentStorageAccess()->commitStorages();
}
-Reference< XStorage > ODatabaseModelImpl::getStorage( const ObjectType _eType, const sal_Int32 _nDesiredMode )
+Reference< XStorage > ODatabaseModelImpl::getStorage( const ObjectType _eType )
{
- return getDocumentStorageAccess()->getDocumentSubStorage( getObjectContainerStorageName( _eType ), _nDesiredMode );
+ return getDocumentStorageAccess()->getDocumentSubStorage( getObjectContainerStorageName( _eType ),
+ css::embed::ElementModes::READWRITE );
}
const AsciiPropertyValue* ODatabaseModelImpl::getDefaultDataSourceSettings()
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx
index 9455767e236c..b2fa15b9fdaa 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.hxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx
@@ -285,8 +285,7 @@ public:
inline OUString getDocFileLocation() const { return m_sDocFileLocation; }
css::uno::Reference< css::embed::XStorage >
- getStorage(
- const ObjectType _eType, const sal_Int32 _nDesiredMode = css::embed::ElementModes::READWRITE );
+ getStorage( const ObjectType _eType );
// helper
const css::uno::Reference< css::util::XNumberFormatsSupplier >&
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 47f3e465fdae..55aa240a9997 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1765,9 +1765,9 @@ bool OApplicationController::impl_isAlterableView_nothrow( const OUString& _rTab
}
Reference< XComponent > OApplicationController::openElement(const OUString& _sName, ElementType _eType,
- ElementOpenMode _eOpenMode, sal_uInt16 _nInstigatorCommand )
+ ElementOpenMode _eOpenMode )
{
- return openElementWithArguments( _sName, _eType, _eOpenMode, _nInstigatorCommand, ::comphelper::NamedValueCollection() );
+ return openElementWithArguments( _sName, _eType, _eOpenMode, 0, ::comphelper::NamedValueCollection() );
}
Reference< XComponent > OApplicationController::openElementWithArguments( const OUString& _sName, ElementType _eType,
diff --git a/dbaccess/source/ui/app/AppController.hxx b/dbaccess/source/ui/app/AppController.hxx
index e73f1eab3f7c..f5fd97fd13a9 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -152,15 +152,12 @@ namespace dbaui
Defines the type to open
@param _eOpenMode
denotes the mode in which to open the object
- @param _nInstigatorCommand
- denotes the command which instigated the action. Might be 0.
@return the form or report model will only be returned, otherwise <NULL/>
*/
css::uno::Reference< css::lang::XComponent > openElement(
const OUString& _sName,
ElementType _eType,
- ElementOpenMode _eOpenMode,
- sal_uInt16 _nInstigatorCommand = 0
+ ElementOpenMode _eOpenMode
);
/** opens a new sub frame with a table/query/form/report/view, passing additional arguments
diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx
index 56947d139f90..8365235a8736 100644
--- a/dbaccess/source/ui/app/AppView.cxx
+++ b/dbaccess/source/ui/app/AppView.cxx
@@ -448,11 +448,11 @@ void OApplicationView::elementReplaced(ElementType _eType
getDetailView()->elementReplaced(_eType, _rOldName, _rNewName );
}
-void OApplicationView::clearPages(bool _bTaskAlso)
+void OApplicationView::clearPages()
{
OSL_ENSURE(m_pWin && getDetailView() && getPanel(),"Detail view is NULL! -> GPF");
getPanel()->clearSelection();
- getDetailView()->clearPages(_bTaskAlso);
+ getDetailView()->clearPages();
}
void OApplicationView::selectContainer(ElementType _eType)
diff --git a/dbaccess/source/ui/app/AppView.hxx b/dbaccess/source/ui/app/AppView.hxx
index 556fcf9fcaf5..66ff3b86a0cc 100644
--- a/dbaccess/source/ui/app/AppView.hxx
+++ b/dbaccess/source/ui/app/AppView.hxx
@@ -181,10 +181,9 @@ namespace dbaui
sal_Int32 getSelectionCount();
/** clears the detail page and the selection on the left side.
- @param _bTaskAlso
- If <TRUE/> the task window will also be cleared.
+ The task window will also be cleared.
*/
- void clearPages(bool _bTaskAlso = true);
+ void clearPages();
/** returns the element names which are selected
@param _rNames
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index f47a075fa737..73a4073270c6 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -2295,18 +2295,15 @@ IMPL_LINK_TYPED(SbaXDataBrowserController, OnInvalidateClipboard, Timer*, _pTime
InvalidateFeature(ID_BROWSER_PASTE);
}
-Reference< XPropertySet > SbaXDataBrowserController::getBoundField(sal_uInt16 nViewPos) const
+Reference< XPropertySet > SbaXDataBrowserController::getBoundField() const
{
Reference< XPropertySet > xEmptyReturn;
// get the current column from the grid
- if (nViewPos == (sal_uInt16)-1)
- {
- Reference< css::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY);
- if (!xGrid.is())
+ Reference< css::form::XGrid > xGrid(getBrowserView()->getGridControl(), UNO_QUERY);
+ if (!xGrid.is())
return xEmptyReturn;
- nViewPos = xGrid->getCurrentColumnPosition();
- }
+ sal_uInt16 nViewPos = xGrid->getCurrentColumnPosition();
sal_uInt16 nCurrentCol = getBrowserView()->View2ModelPos(nViewPos);
if (nCurrentCol == (sal_uInt16)-1)
return xEmptyReturn;
diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
index d7e8e292bb18..c1fd6697ed21 100644
--- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx
+++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
@@ -61,7 +61,7 @@ namespace dbaui
using namespace ::dbtools;
using namespace ::svx;
- TransferableHelper* SbaTableQueryBrowser::implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType, bool _bAllowConnection )
+ TransferableHelper* SbaTableQueryBrowser::implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType )
{
try
{
@@ -72,7 +72,7 @@ namespace dbaui
SharedConnection xConnection;
if ( CommandType::QUERY != _nCommandType )
{
- if ( _bAllowConnection && !ensureConnection( _pApplyTo, xConnection) )
+ if ( !ensureConnection( _pApplyTo, xConnection) )
return nullptr;
pData = new ODataClipboard(aDSName, _nCommandType, aName, xConnection, getNumberFormatter(), getORB());
}
diff --git a/dbaccess/source/ui/inc/WNameMatch.hxx b/dbaccess/source/ui/inc/WNameMatch.hxx
index e4a96a568518..4b4a3f3aeefd 100644
--- a/dbaccess/source/ui/inc/WNameMatch.hxx
+++ b/dbaccess/source/ui/inc/WNameMatch.hxx
@@ -39,7 +39,7 @@ namespace dbaui
OColumnTreeBox( vcl::Window* pParent, WinBits nBits = WB_BORDER );
void FillListBox( const ODatabaseExport::TColumnVector& _rList);
- void SetReadOnly(bool _bRo=true) { m_bReadOnly = _bRo; }
+ void SetReadOnly() { m_bReadOnly = true; }
virtual bool Select( SvTreeListEntry* pEntry, bool bSelect=true ) override;
private:
diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx
index 1db7c72962a1..0a08bcddce1f 100644
--- a/dbaccess/source/ui/inc/brwctrlr.hxx
+++ b/dbaccess/source/ui/inc/brwctrlr.hxx
@@ -288,9 +288,9 @@ namespace dbaui
bool SaveModified(bool bAskFor = true);
// save the modified record
- css::uno::Reference< css::beans::XPropertySet > getBoundField(sal_uInt16 nViewPos = (sal_uInt16)-1) const;
- // a PropertySet corresponding to the cursor field a column is bound to
- // if nViewPos is (sal_uInt16)-1 (the default) then the field for the current column will be retrieved
+ css::uno::Reference< css::beans::XPropertySet > getBoundField() const;
+ // a PropertySet corresponding to the cursor field a column is bound to.
+ // The field for the current column will be retrieved.
void enterFormAction();
void leaveFormAction();
diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx
index c70fa481c47b..ca3daa2cb096 100644
--- a/dbaccess/source/ui/inc/unodatbr.hxx
+++ b/dbaccess/source/ui/inc/unodatbr.hxx
@@ -330,7 +330,7 @@ namespace dbaui
void implAdministrate( SvTreeListEntry* _pApplyTo );
TransferableHelper*
- implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType, bool _bAllowConnection = true );
+ implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType );
EntryType getEntryType( const SvTreeListEntry* _pEntry ) const;
EntryType getChildType( SvTreeListEntry* _pEntry ) const;
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index 03c6e0235467..3d0a423b961d 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -372,11 +372,10 @@ namespace dbaui
DBSubComponentController_Base::disposing( _rSource );
}
- void DBSubComponentController::appendError( const OUString& _rErrorMessage, const ::dbtools::StandardSQLState _eSQLState,
- const sal_Int32 _nErrorCode )
+ void DBSubComponentController::appendError( const OUString& _rErrorMessage, const ::dbtools::StandardSQLState _eSQLState )
{
m_pImpl->m_aCurrentError.append( ::dbtools::SQLExceptionInfo::TYPE::SQLException, _rErrorMessage, getStandardSQLState( _eSQLState ),
- _nErrorCode );
+ 1000 );
}
void DBSubComponentController::clearError()
{
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 2f321a9cda5e..d6d22bb3e0b7 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -1534,7 +1534,7 @@ void OSelectionBrowseBox::InsertColumn(OTableFieldDescRef pEntry, sal_uInt16& _n
invalidateUndoRedo();
}
-OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition, bool bVis, bool bActivate)
+OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition, bool bVis)
{
OQueryTableWindow* pSourceWin = static_cast<OQueryTableWindow*>(jxdSource.pListBox->GetTabWin());
if (!pSourceWin)
@@ -1555,7 +1555,7 @@ OTableFieldDescRef OSelectionBrowseBox::InsertField(const OJoinExchangeData& jxd
aInfo->SetDataType(pInf->GetDataType());
aInfo->SetVisible(bVis);
- return InsertField(aInfo, _nColumnPosition, bVis, bActivate);
+ return InsertField(aInfo, _nColumnPosition, bVis);
}
OTableFieldDescRef OSelectionBrowseBox::InsertField(const OTableFieldDescRef& _rInfo, sal_uInt16 _nColumnPosition, bool bVis, bool bActivate)
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
index 3af7c69202d4..6f80ff7d251c 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx
@@ -82,7 +82,7 @@ namespace dbaui
virtual void dispose() override;
void initialize();
- OTableFieldDescRef InsertField( const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, bool bVis=true, bool bActivate=true );
+ OTableFieldDescRef InsertField( const OJoinExchangeData& jxdSource, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, bool bVis=true );
OTableFieldDescRef InsertField( const OTableFieldDescRef& rInfo, sal_uInt16 _nColumnPosition = BROWSER_INVALIDID, bool bVis=true, bool bActivate=true );
void InsertColumn( OTableFieldDescRef pEntry, sal_uInt16& _nColumnPosition );
void RemoveColumn( sal_uInt16 _nColumnId );
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index a6e0effa2cd6..a7c9e4c456ce 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -436,7 +436,7 @@ void OTableEditorCtrl::SaveCurRow()
pDescrWin->SaveData( pActRow->GetActFieldDescr() );
}
-void OTableEditorCtrl::DisplayData(long nRow, bool bGrabFocus)
+void OTableEditorCtrl::DisplayData(long nRow)
{
// go to the correct cell
SetDataPtr(nRow);
@@ -459,8 +459,7 @@ void OTableEditorCtrl::DisplayData(long nRow, bool bGrabFocus)
RowModified(nRow);
// and re-enable edit mode
- if (bWasEditing || bGrabFocus)
- ActivateCell(nRow, GetCurColumnId(), bGrabFocus);
+ ActivateCell(nRow, GetCurColumnId());
}
void OTableEditorCtrl::CursorMoved()
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx
index 729cbff95f9b..88786772b255 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.hxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx
@@ -134,7 +134,7 @@ namespace dbaui
void SwitchType( const TOTypeInfoSP& _pType );
/// force displaying of the given row
- void DisplayData( long nRow, bool bGrabFocus = true );
+ void DisplayData( long nRow );
virtual void SetCellData( long nRow, sal_uInt16 nColId, const TOTypeInfoSP& _pTypeInfo ) override;
virtual void SetCellData( long nRow, sal_uInt16 nColId, const css::uno::Any& _rSaveData ) override;