loplugin:unuseddefaultparams in dbaccess

Change-Id: I5f417aea43b4aa841ee45e947b982e6341c7b18b
This commit is contained in:
Noel Grandin 2016-03-02 16:53:51 +02:00
parent bd2bf6bd55
commit e13ba2d41d
17 changed files with 31 additions and 41 deletions

View File

@ -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()

View File

@ -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 >&

View File

@ -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,

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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;

View File

@ -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());
}

View File

@ -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:

View File

@ -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();

View File

@ -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;

View File

@ -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()
{

View File

@ -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)

View File

@ -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 );

View File

@ -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()

View File

@ -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;

View File

@ -107,8 +107,7 @@ namespace dbaui
*/
void appendError(
const OUString& _rErrorMessage,
const ::dbtools::StandardSQLState _eSQLState = ::dbtools::StandardSQLState::GENERAL_ERROR,
const sal_Int32 _nErrorCode = 1000
const ::dbtools::StandardSQLState _eSQLState = ::dbtools::StandardSQLState::GENERAL_ERROR
);
/** clears the error state.