diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-18 13:27:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-19 06:30:48 +0000 |
commit | ef637a1c4e16eb9228b6d5e01fc670c4d24afb9b (patch) | |
tree | ed4b8e9c3bbe97d444bac3e61d319c3b8ee2c225 /dbaccess | |
parent | 834809dbbef60de6677b80e26753c55c4edf96c2 (diff) |
loplugin:expandablemethodds in dbaccess..drawinglayer
Change-Id: Iee9143999f5c94040dadd378006f2a429ca0edb5
Reviewed-on: https://gerrit.libreoffice.org/30012
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/TableDeco.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/api/querydescriptor.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/api/querydescriptor.hxx | 1 | ||||
-rw-r--r-- | dbaccess/source/core/inc/TableDeco.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/brwctrlr.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbadmin.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/TableConnectionData.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/TableWindow.hxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/brwctrlr.hxx | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/dbadmin.hxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/TableConnectionData.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/querydesign/TableWindow.cxx | 11 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/ColumnModel.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/ColumnModel.hxx | 1 |
16 files changed, 14 insertions, 32 deletions
diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx index f16cfddf4f20..643ed9349ad3 100644 --- a/dbaccess/source/core/api/TableDeco.cxx +++ b/dbaccess/source/core/api/TableDeco.cxx @@ -511,7 +511,7 @@ void ODBTableDecorator::fillPrivileges() const xProp->getPropertyValue(PROPERTY_CATALOGNAME) >>= sCatalog; xProp->getPropertyValue(PROPERTY_SCHEMANAME) >>= sSchema; xProp->getPropertyValue(PROPERTY_NAME) >>= sName; - m_nPrivileges = ::dbtools::getTablePrivileges(getMetaData(),sCatalog,sSchema, sName); + m_nPrivileges = ::dbtools::getTablePrivileges(m_xMetaData, sCatalog,sSchema, sName); } } } diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx index 1ceea68758ae..ef49745ed791 100644 --- a/dbaccess/source/core/api/querydescriptor.cxx +++ b/dbaccess/source/core/api/querydescriptor.cxx @@ -183,7 +183,7 @@ Reference< XNameAccess > SAL_CALL OQueryDescriptor_Base::getColumns( ) throw (Ru { MutexGuard aGuard(m_rMutex); - if ( isColumnsOutOfDate() ) + if ( m_bColumnsOutOfDate ) { // clear the current columns clearColumns(); diff --git a/dbaccess/source/core/api/querydescriptor.hxx b/dbaccess/source/core/api/querydescriptor.hxx index c069bde240b3..da985b5d9368 100644 --- a/dbaccess/source/core/api/querydescriptor.hxx +++ b/dbaccess/source/core/api/querydescriptor.hxx @@ -60,7 +60,6 @@ protected: virtual ~OQueryDescriptor_Base(); void setColumnsOutOfDate( bool _bOutOfDate = true ); - bool isColumnsOutOfDate() const { return m_bColumnsOutOfDate; } sal_Int32 getColumnCount() const { return m_pColumns ? m_pColumns->getCount() : 0; } void clearColumns( ); diff --git a/dbaccess/source/core/inc/TableDeco.hxx b/dbaccess/source/core/inc/TableDeco.hxx index 71c45ea356d4..b8b8f501fc33 100644 --- a/dbaccess/source/core/inc/TableDeco.hxx +++ b/dbaccess/source/core/inc/TableDeco.hxx @@ -150,8 +150,6 @@ namespace dbaccess virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException, std::exception) override; static css::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId(); - const css::uno::Reference< css::sdbc::XDatabaseMetaData>& getMetaData() const { return m_xMetaData; } - // XColumnsSupplier virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getColumns( ) throw (css::uno::RuntimeException, std::exception) override; // XKeysSupplier diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index a95e5ec6adc2..bf6c989bb040 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1754,18 +1754,17 @@ void SbaXDataBrowserController::ExecuteFilterSortCrit(bool bFilter) Reference< XSingleSelectQueryComposer > xParser = createParser_nothrow(); try { - Reference< css::sdbcx::XColumnsSupplier> xSup = getColumnsSupplier(); Reference< XConnection> xCon(xFormSet->getPropertyValue(PROPERTY_ACTIVE_CONNECTION),UNO_QUERY); if(bFilter) { - ScopedVclPtrInstance< DlgFilterCrit > aDlg( getBrowserView(), getORB(), xCon, xParser, xSup->getColumns() ); + ScopedVclPtrInstance< DlgFilterCrit > aDlg( getBrowserView(), getORB(), xCon, xParser, m_xColumnsSupplier->getColumns() ); if ( !aDlg->Execute() ) return; // if so we don't need to update the grid aDlg->BuildWherePart(); } else { - ScopedVclPtrInstance< DlgOrderCrit > aDlg( getBrowserView(),xCon,xParser,xSup->getColumns() ); + ScopedVclPtrInstance< DlgOrderCrit > aDlg( getBrowserView(),xCon,xParser, m_xColumnsSupplier->getColumns() ); if(!aDlg->Execute()) { return; // if so we don't need to actualize the grid diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index b84b94c5c7d5..32abe730db98 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -79,7 +79,7 @@ void ODbAdminDialog::dispose() short ODbAdminDialog::Ok() { SfxTabDialog::Ok(); - disabledUI(); + m_bUIEnabled = false; return ( AR_LEAVE_MODIFIED == implApplyChanges() ) ? RET_OK : RET_CANCEL; // TODO : AR_ERROR is not handled correctly, we always close the dialog here } @@ -244,7 +244,7 @@ ODbAdminDialog::ApplyResult ODbAdminDialog::implApplyChanges() if ( !m_pImpl->saveChanges(*m_pExampleSet) ) return AR_KEEP; - if ( isUIEnabled() ) + if ( m_bUIEnabled ) ShowPage(GetCurPageId()); // This does the usual ActivatePage, so the pages can save their current status. // This way, next time they're asked what has changed since now and here, they really diff --git a/dbaccess/source/ui/inc/TableConnectionData.hxx b/dbaccess/source/ui/inc/TableConnectionData.hxx index c29d27831e76..99a4ddcdad78 100644 --- a/dbaccess/source/ui/inc/TableConnectionData.hxx +++ b/dbaccess/source/ui/inc/TableConnectionData.hxx @@ -91,8 +91,6 @@ namespace dbaui inline void setReferencingTable(const TTableWindowData::value_type& _pTable) { m_pReferencingTable = _pTable; } inline void setReferencedTable(const TTableWindowData::value_type& _pTable) { m_pReferencedTable = _pTable; } - const OUString& GetConnName() const { return m_aConnName; } - /** Update create a new connection @return true if successful diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx index aa9aa6ce9ee0..5f52996d07c3 100644 --- a/dbaccess/source/ui/inc/TableWindow.hxx +++ b/dbaccess/source/ui/inc/TableWindow.hxx @@ -165,15 +165,11 @@ namespace dbaui inline css::uno::Reference< css::container::XNameAccess > GetOriginalColumns() const { return m_pData->getColumns(); } inline css::uno::Reference< css::beans::XPropertySet > GetTable() const { return m_pData->getTable(); } - SizingFlags GetSizingFlags() const { return m_nSizingFlags; } /** set the sizing flag to the direction @param _rPos The EndPosition after resizing. */ void setSizingFlag(const Point& _rPos); - /** set the resizing flag to NONE. - */ - void resetSizingFlag() { m_nSizingFlags = SizingFlags::NONE; } /** returns the new sizing */ diff --git a/dbaccess/source/ui/inc/brwctrlr.hxx b/dbaccess/source/ui/inc/brwctrlr.hxx index 2c14d5806a73..d953491f793b 100644 --- a/dbaccess/source/ui/inc/brwctrlr.hxx +++ b/dbaccess/source/ui/inc/brwctrlr.hxx @@ -125,7 +125,6 @@ namespace dbaui // attribute access protected: const css::uno::Reference< css::sdbc::XRowSet >& getRowSet() const { return m_xRowSet; } - const css::uno::Reference< css::sdbcx::XColumnsSupplier >& getColumnsSupplier()const { return m_xColumnsSupplier; } const css::uno::Reference< css::form::XLoadable >& getLoadable() const { return m_xLoadable; } const css::uno::Reference< css::form::XFormComponent >& getFormComponent() const { return m_xGridModel; } diff --git a/dbaccess/source/ui/inc/dbadmin.hxx b/dbaccess/source/ui/inc/dbadmin.hxx index af843dd34fbd..eb92a0652205 100644 --- a/dbaccess/source/ui/inc/dbadmin.hxx +++ b/dbaccess/source/ui/inc/dbadmin.hxx @@ -103,10 +103,6 @@ protected: virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage) override; virtual short Ok() override; -protected: - inline bool isUIEnabled() const { return m_bUIEnabled; } - inline void disabledUI() { m_bUIEnabled = false; } - private: /// select a datasource with a given name, adjust the item set accordingly, and everything like that .. void impl_selectDataSource(const css::uno::Any& _aDataSourceName); diff --git a/dbaccess/source/ui/querydesign/TableConnectionData.cxx b/dbaccess/source/ui/querydesign/TableConnectionData.cxx index 7c3b866a5182..059f0a5549bf 100644 --- a/dbaccess/source/ui/querydesign/TableConnectionData.cxx +++ b/dbaccess/source/ui/querydesign/TableConnectionData.cxx @@ -71,7 +71,7 @@ OTableConnectionData& OTableConnectionData::operator=( const OTableConnectionDat m_pReferencingTable = rConnData.m_pReferencingTable; m_pReferencedTable = rConnData.m_pReferencedTable; - m_aConnName = rConnData.GetConnName(); + m_aConnName = rConnData.m_aConnName; // clear line list ResetConnLines(); diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index 9e879064ba99..5a3118e402d0 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -345,9 +345,8 @@ void OTableWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rR Rectangle OTableWindow::getSizingRect(const Point& _rPos,const Size& _rOutputSize) const { Rectangle aSizingRect = Rectangle( GetPosPixel(), GetSizePixel() ); - SizingFlags nSizingFlags = GetSizingFlags(); - if( nSizingFlags & SizingFlags::Top ) + if( m_nSizingFlags & SizingFlags::Top ) { if( _rPos.Y() < 0 ) aSizingRect.Top() = 0; @@ -355,7 +354,7 @@ Rectangle OTableWindow::getSizingRect(const Point& _rPos,const Size& _rOutputSiz aSizingRect.Top() = _rPos.Y(); } - if( nSizingFlags & SizingFlags::Bottom ) + if( m_nSizingFlags & SizingFlags::Bottom ) { if( _rPos.Y() > _rOutputSize.Height() ) aSizingRect.Bottom() = _rOutputSize.Height(); @@ -363,7 +362,7 @@ Rectangle OTableWindow::getSizingRect(const Point& _rPos,const Size& _rOutputSiz aSizingRect.Bottom() = _rPos.Y(); } - if( nSizingFlags & SizingFlags::Right ) + if( m_nSizingFlags & SizingFlags::Right ) { if( _rPos.X() > _rOutputSize.Width() ) aSizingRect.Right() = _rOutputSize.Width(); @@ -371,7 +370,7 @@ Rectangle OTableWindow::getSizingRect(const Point& _rPos,const Size& _rOutputSiz aSizingRect.Right() = _rPos.X(); } - if( nSizingFlags & SizingFlags::Left ) + if( m_nSizingFlags & SizingFlags::Left ) { if( _rPos.X() < 0 ) aSizingRect.Left() = 0; @@ -708,7 +707,7 @@ bool OTableWindow::PreNotify(NotifyEvent& rNEvt) m_nMoveIncrement = 1; } } - resetSizingFlag(); + m_nSizingFlags = SizingFlags::NONE; } else { diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx index bc4fef3b9125..d21025f5fd59 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx @@ -209,7 +209,7 @@ IClipboardTest* OTableFieldDescWin::getActiveChild() const pTest = getGenPage(); break; default: - pTest = getHelpBar(); + pTest = m_pHelpBar; break; } return pTest; diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx index 066a6c7dad91..2d2b0da73006 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx @@ -87,7 +87,6 @@ namespace dbaui virtual void paste() override; inline OFieldDescGenWin* getGenPage() const { return m_pGenPage; } - inline OTableDesignHelpBar* getHelpBar() const { return m_pHelpBar; } }; } diff --git a/dbaccess/source/ui/uno/ColumnModel.cxx b/dbaccess/source/ui/uno/ColumnModel.cxx index 125106f62dfa..51e538cf5bf0 100644 --- a/dbaccess/source/ui/uno/ColumnModel.cxx +++ b/dbaccess/source/ui/uno/ColumnModel.cxx @@ -104,7 +104,7 @@ void OColumnControlModel::registerProperties() // XCloneable Reference< XCloneable > SAL_CALL OColumnControlModel::createClone( ) throw (RuntimeException, std::exception) { - return new OColumnControlModel( this, getORB() ); + return new OColumnControlModel( this, m_xORB ); } css::uno::Sequence<sal_Int8> OColumnControlModel::getImplementationId() diff --git a/dbaccess/source/ui/uno/ColumnModel.hxx b/dbaccess/source/ui/uno/ColumnModel.hxx index 9a48fc7246d5..da75eb4e74ab 100644 --- a/dbaccess/source/ui/uno/ColumnModel.hxx +++ b/dbaccess/source/ui/uno/ColumnModel.hxx @@ -60,7 +60,6 @@ class OColumnControlModel : public ::comphelper::OMutexAndBroadcastHelper sal_Int32 m_nWidth; // [properties] - const css::uno::Reference< css::lang::XMultiServiceFactory>& getORB() const { return m_xORB; } void registerProperties(); protected: |