diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-22 13:39:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-23 09:00:40 +0200 |
commit | 55ff9d3e2d160132f905b8c932b622c0c8575478 (patch) | |
tree | 00f3bf9c0745e9684a29f09e351ffd51e62af31b /dbaccess | |
parent | 222bc56e21356520a55a871c9cdfc26d2fc3fcb2 (diff) |
loplugin:unusedfields in dbaccess
Change-Id: I3f32573f25b4861799124905cefb3d9166570989
Reviewed-on: https://gerrit.libreoffice.org/39135
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
37 files changed, 29 insertions, 131 deletions
diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx index 7a599e940c44..af261a6d2a0f 100644 --- a/dbaccess/source/core/api/FilteredContainer.cxx +++ b/dbaccess/source/core/api/FilteredContainer.cxx @@ -239,11 +239,9 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::vector< const Reference< XConnection >& _xCon, bool _bCase, IRefreshListener* _pRefreshListener, - ::dbtools::WarningsContainer* _pWarningsContainer - ,oslInterlockedCount& _nInAppend) + oslInterlockedCount& _nInAppend) :OCollection(_rParent,_bCase,_rMutex,std::vector< OUString>()) ,m_bConstructed(false) - ,m_pWarningsContainer(_pWarningsContainer) ,m_pRefreshListener(_pRefreshListener) ,m_nInAppend(_nInAppend) ,m_xConnection(_xCon) @@ -385,7 +383,6 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::vector< m_xMasterContainer = nullptr; m_xMetaData = nullptr; - m_pWarningsContainer = nullptr; m_pRefreshListener = nullptr; m_bConstructed = false; } diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 2d23d0c19e8f..8f191ed318be 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -2270,7 +2270,7 @@ Reference< XNameAccess > ORowSet::impl_getTables_throw() DBG_UNHANDLED_EXCEPTION(); } - m_pTables = new OTableContainer(*this,m_aMutex,m_xActiveConnection,bCase,nullptr,nullptr,nullptr,m_nInAppend); + m_pTables = new OTableContainer(*this,m_aMutex,m_xActiveConnection,bCase,nullptr,nullptr,m_nInAppend); xTables = m_pTables; Sequence<OUString> aTableFilter { "%" }; m_pTables->construct(aTableFilter,Sequence< OUString>()); diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index 9ab1c9c66509..9f63adbc7d5a 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -1373,9 +1373,6 @@ ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet ) :m_pRowSet( _pRowSet ) ,m_bWasNew( false ) ,m_bWasModified( false ) -#ifdef DBG_UTIL - ,m_bNotifyCalled( false ) -#endif { OSL_ENSURE( m_pRowSet, "ORowSetNotifier::ORowSetNotifier: invalid row set. This wil crash." ); @@ -1394,9 +1391,6 @@ ORowSetNotifier::ORowSetNotifier( ORowSetBase* _pRowSet,const ORowSetValueVector ,m_pRowSet( _pRowSet ) ,m_bWasNew( false ) ,m_bWasModified( false ) -#ifdef DBG_UTIL - ,m_bNotifyCalled( false ) -#endif { OSL_ENSURE( m_pRowSet, "ORowSetNotifier::ORowSetNotifier: invalid row set. This wil crash." ); @@ -1421,10 +1415,6 @@ void ORowSetNotifier::fire() && ( m_bWasNew != m_pRowSet->isNew( ORowSetBase::GrantNotifierAccess() ) ) ) m_pRowSet->fireProperty( PROPERTY_ID_ISNEW, false, true, ORowSetBase::GrantNotifierAccess() ); - -#ifdef DBG_UTIL - m_bNotifyCalled = true; -#endif } std::vector<sal_Int32>& ORowSetNotifier::getChangedColumns() const diff --git a/dbaccess/source/core/api/RowSetBase.hxx b/dbaccess/source/core/api/RowSetBase.hxx index 504abfa5e88e..51caea40de89 100644 --- a/dbaccess/source/core/api/RowSetBase.hxx +++ b/dbaccess/source/core/api/RowSetBase.hxx @@ -364,10 +364,6 @@ namespace dbaccess bool m_bWasNew; bool m_bWasModified; -#ifdef DBG_UTIL - bool m_bNotifyCalled; -#endif - public: /** constructs the object, and cancels the insertion diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 58e059f71713..e29cf1f4e4f2 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -102,7 +102,6 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs, ,m_bRowCountFinal(false) ,m_bBeforeFirst(true) ,m_bAfterLast( false ) - ,m_bUpdated(false) ,m_bModified(_bModified) ,m_bNew(_bNew) { @@ -1405,7 +1404,7 @@ void ORowSetCache::cancelRowUpdates( ) void ORowSetCache::moveToInsertRow( ) { m_bNew = true; - m_bUpdated = m_bAfterLast = false; + m_bAfterLast = false; m_aInsertRow = m_pInsertMatrix->begin(); if(!m_aInsertRow->is()) diff --git a/dbaccess/source/core/api/RowSetCache.hxx b/dbaccess/source/core/api/RowSetCache.hxx index d0fb4f3882d2..9488c76e7078 100644 --- a/dbaccess/source/core/api/RowSetCache.hxx +++ b/dbaccess/source/core/api/RowSetCache.hxx @@ -87,7 +87,6 @@ namespace dbaccess bool m_bRowCountFinal ; bool m_bBeforeFirst ; bool m_bAfterLast ; - bool m_bUpdated ; bool& m_bModified ; // points to the rowset member m_bModified bool& m_bNew ; // points to the rowset member m_bNew diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx index c9853f0fe967..eb20c7a1fa21 100644 --- a/dbaccess/source/core/api/query.cxx +++ b/dbaccess/source/core/api/query.cxx @@ -292,7 +292,7 @@ void OQuery::setFastPropertyValue_NoBroadcast( sal_Int32 _nHandle, const Any& _r { // the base class holds the property values itself, but we have to forward this to our CommandDefinition m_eDoingCurrently = SETTING_PROPERTIES; - OAutoActionReset aAutoReset(this); + OAutoActionReset aAutoReset(*this); m_xCommandDefinition->setPropertyValue(sAggPropName, _rValue); if ( PROPERTY_ID_COMMAND == _nHandle ) diff --git a/dbaccess/source/core/api/query.hxx b/dbaccess/source/core/api/query.hxx index dc70aa915e03..749c454333a4 100644 --- a/dbaccess/source/core/api/query.hxx +++ b/dbaccess/source/core/api/query.hxx @@ -76,10 +76,10 @@ protected: friend class OAutoActionReset; class OAutoActionReset { - OQuery* m_pActor; + OQuery& m_rActor; public: - explicit OAutoActionReset(OQuery* _pActor) : m_pActor(_pActor) { } - ~OAutoActionReset() { m_pActor->m_eDoingCurrently = NONE; } + explicit OAutoActionReset(OQuery& _rActor) : m_rActor(_rActor) { } + ~OAutoActionReset() { m_rActor.m_eDoingCurrently = NONE; } }; protected: diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx index 246c0fd21cc9..0add2d493d5e 100644 --- a/dbaccess/source/core/api/querycontainer.cxx +++ b/dbaccess/source/core/api/querycontainer.cxx @@ -183,7 +183,7 @@ void SAL_CALL OQueryContainer::appendByDescriptor( const Reference< XPropertySet // insert the basic object into the definition container { m_eDoingCurrently = INSERTING; - OAutoActionReset aAutoReset(this); + OAutoActionReset aAutoReset(*this); m_xCommandDefinitions->insertByName(sNewObjectName, makeAny(xCommandDefinitionPart)); } diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx index fee4f5fa2cee..925552954ff3 100644 --- a/dbaccess/source/core/api/tablecontainer.cxx +++ b/dbaccess/source/core/api/tablecontainer.cxx @@ -101,12 +101,10 @@ OTableContainer::OTableContainer(::cppu::OWeakObject& _rParent, bool _bCase, const Reference< XNameContainer >& _xTableDefinitions, IRefreshListener* _pRefreshListener, - ::dbtools::WarningsContainer* _pWarningsContainer - ,oslInterlockedCount& _nInAppend) - :OFilteredContainer(_rParent,_rMutex,_xCon,_bCase,_pRefreshListener,_pWarningsContainer,_nInAppend) + oslInterlockedCount& _nInAppend) + :OFilteredContainer(_rParent,_rMutex,_xCon,_bCase,_pRefreshListener,_nInAppend) ,m_xTableDefinitions(_xTableDefinitions) ,m_pTableMediator( nullptr ) - ,m_bInDrop(false) { } @@ -345,7 +343,6 @@ ObjectType OTableContainer::appendObject( const OUString& _rForName, const Refer // XDrop void OTableContainer::dropObject(sal_Int32 _nPos, const OUString& _sElementName) { - m_bInDrop = true; try { Reference< XDrop > xDrop(m_xMasterContainer,UNO_QUERY); @@ -400,10 +397,8 @@ void OTableContainer::dropObject(sal_Int32 _nPos, const OUString& _sElementName) } catch(const Exception&) { - m_bInDrop = false; throw; } - m_bInDrop = false; } void SAL_CALL OTableContainer::elementInserted( const ContainerEvent& Event ) diff --git a/dbaccess/source/core/api/viewcontainer.cxx b/dbaccess/source/core/api/viewcontainer.cxx index 87aa114e1189..3ca37659ed55 100644 --- a/dbaccess/source/core/api/viewcontainer.cxx +++ b/dbaccess/source/core/api/viewcontainer.cxx @@ -62,9 +62,8 @@ OViewContainer::OViewContainer(::cppu::OWeakObject& _rParent ,const Reference< XConnection >& _xCon ,bool _bCase ,IRefreshListener* _pRefreshListener - ,::dbtools::WarningsContainer* _pWarningsContainer ,oslInterlockedCount& _nInAppend) - :OFilteredContainer(_rParent,_rMutex,_xCon,_bCase,_pRefreshListener,_pWarningsContainer,_nInAppend) + :OFilteredContainer(_rParent,_rMutex,_xCon,_bCase,_pRefreshListener,_nInAppend) ,m_bInElementRemoved(false) { } diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx index 95a53242d9b2..2a19133c1f8c 100644 --- a/dbaccess/source/core/dataaccess/connection.cxx +++ b/dbaccess/source/core/dataaccess/connection.cxx @@ -311,7 +311,7 @@ OConnection::OConnection(ODatabaseSource& _rDB { } Reference< XNameContainer > xTableDefinitions(_rDB.getTables(),UNO_QUERY); - m_pTables = new OTableContainer( *this, m_aMutex, this, bCase, xTableDefinitions, this, &m_aWarnings,m_nInAppend ); + m_pTables = new OTableContainer( *this, m_aMutex, this, bCase, xTableDefinitions, this, m_nInAppend ); // check if we supports types if ( xMeta.is() ) @@ -340,7 +340,7 @@ OConnection::OConnection(ODatabaseSource& _rDB } if(m_bSupportsViews) { - m_pViews = new OViewContainer(*this, m_aMutex, this, bCase,this,&m_aWarnings,m_nInAppend); + m_pViews = new OViewContainer(*this, m_aMutex, this, bCase, this, m_nInAppend); m_pViews->addContainerListener(m_pTables); m_pTables->addContainerListener(m_pViews); } diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index 919577442777..216183adaf52 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -219,14 +219,9 @@ namespace dbaccess } // OEmbeddedClientHelper - typedef ::cppu::WeakImplHelper< XEmbeddedClient - > EmbeddedClientHelper_BASE; - class OEmbeddedClientHelper : public EmbeddedClientHelper_BASE + class OEmbeddedClientHelper : public ::cppu::WeakImplHelper<XEmbeddedClient> { - ODocumentDefinition* m_pClient; public: - explicit OEmbeddedClientHelper(ODocumentDefinition* _pClient) :m_pClient(_pClient) {} - virtual void SAL_CALL saveObject( ) override { } @@ -240,7 +235,6 @@ namespace dbaccess virtual void SAL_CALL visibilityChanged( sal_Bool /*bVisible*/ ) override { } - void resetClient() { m_pClient = nullptr; } }; // LockModifiable @@ -454,11 +448,7 @@ void ODocumentDefinition::closeObject() { } m_xEmbeddedObject = nullptr; - if ( m_pClientHelper.is() ) - { - m_pClientHelper->resetClient(); - m_pClientHelper.clear(); - } + m_pClientHelper.clear(); } } @@ -1616,7 +1606,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_ { if ( !m_pClientHelper.is() ) { - m_pClientHelper = new OEmbeddedClientHelper(this); + m_pClientHelper = new OEmbeddedClientHelper; } Reference<XEmbeddedClient> xClient = m_pClientHelper.get(); m_xEmbeddedObject->setClientSite(xClient); @@ -1638,7 +1628,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_ { if ( !m_pClientHelper.is() ) { - m_pClientHelper = new OEmbeddedClientHelper(this); + m_pClientHelper = new OEmbeddedClientHelper; } Reference<XEmbeddedClient> xClient = m_pClientHelper.get(); m_xEmbeddedObject->setClientSite(xClient); diff --git a/dbaccess/source/core/inc/FilteredContainer.hxx b/dbaccess/source/core/inc/FilteredContainer.hxx index 5ba75652b80d..03b30c341f2c 100644 --- a/dbaccess/source/core/inc/FilteredContainer.hxx +++ b/dbaccess/source/core/inc/FilteredContainer.hxx @@ -39,7 +39,6 @@ namespace dbaccess mutable bool m_bConstructed; // late ctor called protected: - ::dbtools::WarningsContainer* m_pWarningsContainer; IRefreshListener* m_pRefreshListener; oslInterlockedCount& m_nInAppend; @@ -104,7 +103,6 @@ namespace dbaccess const css::uno::Reference< css::sdbc::XConnection >& _xCon, bool _bCase, IRefreshListener* _pRefreshListener, - ::dbtools::WarningsContainer* _pWarningsContainer, oslInterlockedCount& _nInAppend ); diff --git a/dbaccess/source/core/inc/querycontainer.hxx b/dbaccess/source/core/inc/querycontainer.hxx index 50def772615a..6d50c4b1a045 100644 --- a/dbaccess/source/core/inc/querycontainer.hxx +++ b/dbaccess/source/core/inc/querycontainer.hxx @@ -78,10 +78,10 @@ namespace dbaccess friend class OAutoActionReset; class OAutoActionReset { - OQueryContainer* m_pActor; + OQueryContainer& m_rActor; public: - OAutoActionReset(OQueryContainer* _pActor) : m_pActor(_pActor) { } - ~OAutoActionReset() { m_pActor->m_eDoingCurrently = NONE; } + OAutoActionReset(OQueryContainer& _rActor) : m_rActor(_rActor) { } + ~OAutoActionReset() { m_rActor.m_eDoingCurrently = NONE; } }; // ODefinitionContainer diff --git a/dbaccess/source/core/inc/tablecontainer.hxx b/dbaccess/source/core/inc/tablecontainer.hxx index 3f70afe41bc6..9d9df2b0866d 100644 --- a/dbaccess/source/core/inc/tablecontainer.hxx +++ b/dbaccess/source/core/inc/tablecontainer.hxx @@ -47,7 +47,6 @@ namespace dbaccess { css::uno::Reference< css::container::XNameContainer > m_xTableDefinitions; ::rtl::Reference< OContainerMediator > m_pTableMediator; - bool m_bInDrop; // set when we are in the drop method // OFilteredContainer virtual void addMasterContainerListener() override; @@ -90,7 +89,6 @@ namespace dbaccess bool _bCase, const css::uno::Reference< css::container::XNameContainer >& _xTableDefinitions, IRefreshListener* _pRefreshListener, - ::dbtools::WarningsContainer* _pWarningsContainer, oslInterlockedCount& _nInAppend ); diff --git a/dbaccess/source/core/inc/viewcontainer.hxx b/dbaccess/source/core/inc/viewcontainer.hxx index c6b212771222..cc95885ceaab 100644 --- a/dbaccess/source/core/inc/viewcontainer.hxx +++ b/dbaccess/source/core/inc/viewcontainer.hxx @@ -62,7 +62,6 @@ namespace dbaccess const css::uno::Reference< css::sdbc::XConnection >& _xCon, bool _bCase, IRefreshListener* _pRefreshListener, - ::dbtools::WarningsContainer* _pWarningsContainer, oslInterlockedCount& _nInAppend ); diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index 07fcb331ce65..f6fb342290f5 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -373,7 +373,6 @@ bool DBTreeListBox::EditingEntry( SvTreeListEntry* /*pEntry*/, Selection& /*_aSe bool DBTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewText ) { DBTreeEditedEntry aEntry; - aEntry.pEntry = pEntry; aEntry.aNewText = rNewText; SetEntryText(pEntry,aEntry.aNewText); diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index bbf994354a42..5163372df0ac 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -52,7 +52,6 @@ ODbAdminDialog::ODbAdminDialog(vcl::Window* _pParent , const Reference< XComponentContext >& _rxContext) : SfxTabDialog(_pParent, "AdminDialog", "dbaccess/ui/admindialog.ui", _pItems) - , m_bApplied(false) , m_bUIEnabled(true) { m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxContext,this,this)); @@ -250,8 +249,6 @@ ODbAdminDialog::ApplyResult ODbAdminDialog::implApplyChanges() // This way, next time they're asked what has changed since now and here, they really // can compare with the status they have _now_ (not the one they had before this apply call). - m_bApplied = true; - return AR_LEAVE_MODIFIED; } diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index ba8387e7f436..5f4fafb65e36 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -52,10 +52,8 @@ namespace dbaui // OGeneralPage OGeneralPage::OGeneralPage( vcl::Window* pParent, const OUString& _rUIXMLDescription, const SfxItemSet& _rItems ) :OGenericAdministrationPage( pParent, "PageGeneral", _rUIXMLDescription, _rItems ) - ,m_eNotSupportedKnownType ( ::dbaccess::DST_UNKNOWN ) ,m_pSpecialMessage ( nullptr ) ,m_eLastMessage ( smNone ) - ,m_bDisplayingInvalid ( false ) ,m_bInitTypeList ( true ) ,m_pDatasourceType ( nullptr ) ,m_pCollection ( nullptr ) @@ -255,7 +253,6 @@ namespace dbaui sConnectURL = pUrlItem->GetValue(); } - m_eNotSupportedKnownType = ::dbaccess::DST_UNKNOWN; implSetCurrentType( OUString() ); // compare the DSN prefix with the registered ones @@ -275,9 +272,6 @@ namespace dbaui // show a message saying so // eSpecialMessage = smUnsupportedType; insertEmbeddedDBTypeEntryData( m_eCurrentSelection, sDisplayName ); - // remember this type so we can show the special message again if the user selects this - // type again (without changing the data source) - m_eNotSupportedKnownType = m_pCollection->determineType( m_eCurrentSelection ); // TODO: } return sDisplayName; @@ -291,7 +285,6 @@ namespace dbaui // if the selection is invalid, disable everything OUString sName,sConnectURL; - m_bDisplayingInvalid = !bValid; if ( bValid ) { // collect some items and some values @@ -303,7 +296,6 @@ namespace dbaui sConnectURL = pUrlItem->GetValue(); } - m_eNotSupportedKnownType = ::dbaccess::DST_UNKNOWN; implSetCurrentType( OUString() ); // compare the DSN prefix with the registered ones @@ -323,9 +315,6 @@ namespace dbaui // show a message saying so // eSpecialMessage = smUnsupportedType; insertDatasourceTypeEntryData( m_eCurrentSelection, sDisplayName ); - // remember this type so we can show the special message again if the user selects this - // type again (without changing the data source) - m_eNotSupportedKnownType = m_pCollection->determineType( m_eCurrentSelection ); } return sDisplayName; diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx index 7f3628a9eb1c..84269c2cbb6e 100644 --- a/dbaccess/source/ui/dlg/generalpage.hxx +++ b/dbaccess/source/ui/dlg/generalpage.hxx @@ -36,8 +36,6 @@ namespace dbaui OGeneralPage( vcl::Window* pParent, const OUString& _rUIXMLDescription, const SfxItemSet& _rItems ); OUString m_eCurrentSelection; /// currently selected type - ::dbaccess::DATASOURCE_TYPE - m_eNotSupportedKnownType; /// if a data source of an unsupported, but known type is encountered .... private: VclPtr<FixedText> m_pSpecialMessage; @@ -50,7 +48,6 @@ namespace dbaui SPECIAL_MESSAGE m_eLastMessage; Link<OGeneralPage&,void> m_aTypeSelectHandler; /// to be called if a new type is selected - bool m_bDisplayingInvalid : 1; /// the currently displayed data source is deleted bool m_bInitTypeList : 1; bool approveDatasourceType( const OUString& _sURLPrefix, OUString& _inout_rDisplayName ); void insertDatasourceTypeEntryData( const OUString& _sType, const OUString& sDisplayName ); diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index cd11cc5b45ed..0c287c3ee20a 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -160,7 +160,7 @@ namespace dbaui DbaIndexDialog::DbaIndexDialog( vcl::Window* _pParent, const Sequence< OUString >& _rFieldNames, const Reference< XNameAccess >& _rxIndexes, const Reference< XConnection >& _rxConnection, - const Reference< XComponentContext >& _rxContext,sal_Int32 _nMaxColumnsInIndex) + const Reference< XComponentContext >& _rxContext) :ModalDialog( _pParent, "IndexDesignDialog", "dbaccess/ui/indexdesigndialog.ui") ,m_xConnection(_rxConnection) ,m_pIndexes(nullptr) @@ -211,7 +211,7 @@ namespace dbaui m_pIndexList->setConnection(m_xConnection); m_pFields->SetSizePixel(Size(300, 100)); - m_pFields->Init(_rFieldNames, _nMaxColumnsInIndex, ::dbtools::getBooleanDataSourceSetting( m_xConnection, "AddIndexAppendix" )); + m_pFields->Init(_rFieldNames, ::dbtools::getBooleanDataSourceSetting( m_xConnection, "AddIndexAppendix" )); setToolBox(m_pActions); diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx index dfad2d52b031..7ee609eb94dd 100644 --- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx +++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx @@ -72,7 +72,6 @@ namespace dbaui , m_aSeekRow(m_aFields.end()) , m_pSortingCell(nullptr) , m_pFieldNameCell(nullptr) - , m_nMaxColumnsInIndex(0) , m_bAddIndexAppendix(false) { } @@ -190,9 +189,8 @@ namespace dbaui return EditBrowseBox::GetTotalCellWidth(_nRow, _nColId); } - void IndexFieldsControl::Init(const Sequence< OUString >& _rAvailableFields, sal_Int32 _nMaxColumnsInIndex,bool _bAddIndexAppendix) + void IndexFieldsControl::Init(const Sequence< OUString >& _rAvailableFields, bool _bAddIndexAppendix) { - m_nMaxColumnsInIndex = _nMaxColumnsInIndex; m_bAddIndexAppendix = _bAddIndexAppendix; RemoveColumns(); diff --git a/dbaccess/source/ui/inc/DExport.hxx b/dbaccess/source/ui/inc/DExport.hxx index 7fc704a83bc2..99c0c8053270 100644 --- a/dbaccess/source/ui/inc/DExport.hxx +++ b/dbaccess/source/ui/inc/DExport.hxx @@ -96,7 +96,6 @@ namespace dbaui sal_Int32 m_nColumnPos; ///< current column position sal_Int32 m_nRows; ///< number of rows to be searched sal_Int32 m_nRowCount; ///< current count of rows - rtl_TextEncoding m_nDefToken; ///< language bool m_bError; ///< error and termination code bool m_bInTbl; ///< true, if parser is in RTF table bool m_bHead; ///< true, if the header hasn't been read yet diff --git a/dbaccess/source/ui/inc/HtmlReader.hxx b/dbaccess/source/ui/inc/HtmlReader.hxx index c7bd1d53badf..b610912f791d 100644 --- a/dbaccess/source/ui/inc/HtmlReader.hxx +++ b/dbaccess/source/ui/inc/HtmlReader.hxx @@ -33,10 +33,7 @@ namespace dbaui { OUString m_sCurrent; sal_Int32 m_nTableCount; - sal_Int16 m_nWidth; sal_Int16 m_nColumnWidth; ///< maximum column width - bool m_bMetaOptions; ///< true when we scanned the meta information - bool m_bSDNum; protected: virtual void NextToken( HtmlTokenId nToken ) override; // base class diff --git a/dbaccess/source/ui/inc/TableWindow.hxx b/dbaccess/source/ui/inc/TableWindow.hxx index 5acc6b872f80..1dd689da1895 100644 --- a/dbaccess/source/ui/inc/TableWindow.hxx +++ b/dbaccess/source/ui/inc/TableWindow.hxx @@ -64,7 +64,6 @@ namespace dbaui VclPtr<FixedImage> m_aTypeImage; VclPtr<OTableWindowTitle> m_xTitle; VclPtr<OTableWindowListBox> m_xListBox; - OTableWindowAccess* m_pAccessible; private: TTableWindowData::value_type @@ -74,7 +73,6 @@ namespace dbaui sal_Int32 m_nMoveCount; // how often the arrow keys was pressed sal_Int32 m_nMoveIncrement; // how many pixel we should move SizingFlags m_nSizingFlags; - bool m_bActive; // OContainerListener virtual void _elementInserted( const css::container::ContainerEvent& _rEvent ) override; diff --git a/dbaccess/source/ui/inc/dbadmin.hxx b/dbaccess/source/ui/inc/dbadmin.hxx index 1ccc6053caf8..39d664240dc2 100644 --- a/dbaccess/source/ui/inc/dbadmin.hxx +++ b/dbaccess/source/ui/inc/dbadmin.hxx @@ -53,7 +53,6 @@ private: std::unique_ptr<ODbDataSourceAdministrationHelper> m_pImpl; - bool m_bApplied : 1; /// sal_True if any changes have been applied while the dialog was executing bool m_bUIEnabled : 1; /// <TRUE/> if the UI is enabled, false otherwise. Cannot be switched back to <TRUE/>, once it is <FALSE/> sal_uInt16 m_nMainPageID; diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx index 2c7aeb997007..100e21839e95 100644 --- a/dbaccess/source/ui/inc/dbtreelistbox.hxx +++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx @@ -35,7 +35,6 @@ namespace dbaui { struct DBTreeEditedEntry { - SvTreeListEntry* pEntry; OUString aNewText; }; diff --git a/dbaccess/source/ui/inc/indexdialog.hxx b/dbaccess/source/ui/inc/indexdialog.hxx index 1890fcd0e55f..bea8ed780266 100644 --- a/dbaccess/source/ui/inc/indexdialog.hxx +++ b/dbaccess/source/ui/inc/indexdialog.hxx @@ -104,8 +104,7 @@ namespace dbaui const css::uno::Sequence< OUString >& _rFieldNames, const css::uno::Reference< css::container::XNameAccess >& _rxIndexes, const css::uno::Reference< css::sdbc::XConnection >& _rxConnection, - const css::uno::Reference< css::uno::XComponentContext >& _rxContext, - sal_Int32 _nMaxColumnsInIndex + const css::uno::Reference< css::uno::XComponentContext >& _rxContext ); virtual ~DbaIndexDialog() override; virtual void dispose() override; diff --git a/dbaccess/source/ui/inc/indexfieldscontrol.hxx b/dbaccess/source/ui/inc/indexfieldscontrol.hxx index 0fcfc4d8c0d3..39f7bd96fd80 100644 --- a/dbaccess/source/ui/inc/indexfieldscontrol.hxx +++ b/dbaccess/source/ui/inc/indexfieldscontrol.hxx @@ -48,7 +48,6 @@ namespace dbaui OUString m_sAscendingText; OUString m_sDescendingText; - sal_Int32 m_nMaxColumnsInIndex; bool m_bAddIndexAppendix; public: @@ -56,7 +55,7 @@ namespace dbaui virtual ~IndexFieldsControl() override; virtual void dispose() override; - void Init(const css::uno::Sequence< OUString >& _rAvailableFields, sal_Int32 _nMaxColumnsInIndex,bool _bAddIndexAppendix); + void Init(const css::uno::Sequence< OUString >& _rAvailableFields, bool _bAddIndexAppendix); void initializeFrom(const IndexFields& _rFields); void commitTo(IndexFields& _rFields); diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index 7fb1768cedec..630421578240 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -100,7 +100,6 @@ ODatabaseExport::ODatabaseExport(sal_Int32 nRows, ,m_nColumnPos(0) ,m_nRows(1) ,m_nRowCount(0) - ,m_nDefToken( osl_getThreadTextEncoding() ) ,m_bError(false) ,m_bInTbl(false) ,m_bHead(true) @@ -152,7 +151,6 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection, ,m_nColumnPos(0) ,m_nRows(1) ,m_nRowCount(0) - ,m_nDefToken( osl_getThreadTextEncoding() ) ,m_bError(false) ,m_bInTbl(false) ,m_bHead(true) diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx index 2cbf3202735e..fc14c73d3775 100644 --- a/dbaccess/source/ui/misc/HtmlReader.cxx +++ b/dbaccess/source/ui/misc/HtmlReader.cxx @@ -73,10 +73,7 @@ OHTMLReader::OHTMLReader(SvStream& rIn,const SharedConnection& _rxConnection, : HTMLParser(rIn) , ODatabaseExport( _rxConnection, _rxNumberF, _rxContext, rIn ) , m_nTableCount(0) - , m_nWidth(0) , m_nColumnWidth(87) - , m_bMetaOptions(false) - , m_bSDNum(false) { SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) ); // If the file starts with a BOM, switch to UCS2. @@ -94,10 +91,7 @@ OHTMLReader::OHTMLReader(SvStream& rIn, : HTMLParser(rIn) , ODatabaseExport( nRows, _rColumnPositions, _rxNumberF, _rxContext, pList, _pInfoMap, _bAutoIncrementEnabled, rIn ) , m_nTableCount(0) - , m_nWidth(0) , m_nColumnWidth(87) - , m_bMetaOptions(false) - , m_bSDNum(false) { SetSrcEncoding( GetExtendedCompatibilityTextEncoding( RTL_TEXTENCODING_ISO_8859_1 ) ); // If the file starts with a BOM, switch to UCS2. @@ -205,7 +199,7 @@ void OHTMLReader::NextToken( HtmlTokenId nToken ) m_sCurrent.clear(); m_nColumnPos++; eraseTokens(); - m_bSDNum = m_bInTbl = false; + m_bInTbl = false; } break; case HtmlTokenId::TABLEROW_OFF: @@ -266,7 +260,7 @@ void OHTMLReader::NextToken( HtmlTokenId nToken ) m_sTextToken = m_sCurrent; adjustFormat(); m_nColumnPos++; - m_bSDNum = m_bInTbl = false; + m_bInTbl = false; m_sCurrent.clear(); break; case HtmlTokenId::TABLEROW_OFF: @@ -291,10 +285,7 @@ void OHTMLReader::fetchOptions() switch( rOption.GetToken() ) { case HtmlOptionId::SDVAL: - { m_sValToken = rOption.GetString(); - m_bSDNum = true; - } break; case HtmlOptionId::SDNUM: m_sNumToken = rOption.GetString(); @@ -324,9 +315,6 @@ void OHTMLReader::TableDataOn(SvxCellHorJustify& eVal) eVal = SvxCellHorJustify::Standard; } break; - case HtmlOptionId::WIDTH: - m_nWidth = GetWidthPixel( rOption ); - break; default: break; } } @@ -512,7 +500,6 @@ bool OHTMLReader::CreateTable(HtmlTokenId nToken) void OHTMLReader::setTextEncoding() { - m_bMetaOptions = true; ParseMetaOptions(nullptr, nullptr); } diff --git a/dbaccess/source/ui/misc/RtfReader.cxx b/dbaccess/source/ui/misc/RtfReader.cxx index 29b27bd11f52..613af226b697 100644 --- a/dbaccess/source/ui/misc/RtfReader.cxx +++ b/dbaccess/source/ui/misc/RtfReader.cxx @@ -130,10 +130,6 @@ void ORTFReader::NextToken( int nToken ) } break; - case RTF_DEFLANG: - case RTF_LANG: // inquire language - m_nDefToken = (rtl_TextEncoding)nTokenValue; - break; case RTF_TROWD: { bool bInsertRow = true; diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx index e133b59bd093..01c7c45465fd 100644 --- a/dbaccess/source/ui/querydesign/TableWindow.cxx +++ b/dbaccess/source/ui/querydesign/TableWindow.cxx @@ -95,12 +95,10 @@ OTableWindow::OTableWindow( vcl::Window* pParent, const TTableWindowData::value_ ,Window( pParent, WB_3DLOOK|WB_MOVEABLE ) ,m_aTypeImage( VclPtr<FixedImage>::Create(this) ) ,m_xTitle( VclPtr<OTableWindowTitle>::Create(this) ) - ,m_pAccessible(nullptr) ,m_pData( pTabWinData ) ,m_nMoveCount(0) ,m_nMoveIncrement(1) ,m_nSizingFlags( SizingFlags::NONE ) - ,m_bActive( false ) { // Set position and size @@ -135,7 +133,6 @@ void OTableWindow::dispose() if ( m_pContainerListener.is() ) m_pContainerListener->dispose(); - m_pAccessible = nullptr; m_aTypeImage.disposeAndClear(); m_xTitle.disposeAndClear(); vcl::Window::dispose(); @@ -485,7 +482,6 @@ void OTableWindow::GetFocus() void OTableWindow::setActive(bool _bActive) { SetBoldTitle( _bActive ); - m_bActive = _bActive; if (!_bActive && m_xListBox && m_xListBox->GetSelectionCount() != 0) m_xListBox->SelectAll(false); } @@ -560,9 +556,7 @@ void OTableWindow::StateChanged( StateChangedType nType ) Reference< XAccessible > OTableWindow::CreateAccessible() { - OTableWindowAccess* pAccessible = new OTableWindowAccess(this); - m_pAccessible = pAccessible; - return pAccessible; + return new OTableWindowAccess(this); } void OTableWindow::Command(const CommandEvent& rEvt) diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 2499e94cc618..7dc3db669f73 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -140,7 +140,6 @@ OTableEditorCtrl::OTableEditorCtrl(vcl::Window* pWindow) ,nInvalidateTypeEvent(nullptr) ,m_eChildFocus(NONE) ,nOldDataPos(-1) - ,bSaveOnMove(true) ,bReadOnly(true) ,m_aInvalidate(this) { @@ -801,9 +800,7 @@ void OTableEditorCtrl::InsertRows( long nRow ) } // RowInserted calls CursorMoved. // The UI data should not be stored here. - bSaveOnMove = false; RowInserted( nRow,vInsertedUndoRedoRows.size() ); - bSaveOnMove = true; // Create the Undo-Action GetUndoManager().AddUndoAction( new OTableEditorInsUndoAct(this, nRow,vInsertedUndoRedoRows) ); @@ -820,7 +817,6 @@ void OTableEditorCtrl::DeleteRows() // Delete all marked rows long nIndex = FirstSelectedRow(); nOldDataPos = nIndex; - bSaveOnMove = false; while( nIndex >= 0 && nIndex < static_cast<long>(m_pRowList->size()) ) { @@ -835,8 +831,6 @@ void OTableEditorCtrl::DeleteRows() nIndex = FirstSelectedRow(); } - bSaveOnMove = true; - // Force the current record to be displayed m_nDataPos = GetCurRow(); InvalidateStatusCell( nOldDataPos ); diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx index e6ee1332318f..77bca283bf7b 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.hxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx @@ -62,7 +62,6 @@ namespace dbaui long nOldDataPos; - bool bSaveOnMove; bool bReadOnly; // helper class diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index b300210f2d18..4e7865fe1a98 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -477,7 +477,7 @@ void OTableController::doEditIndexes() if (!xIndexes.is()) return; - ScopedVclPtrInstance< DbaIndexDialog > aDialog(getView(), aFieldNames, xIndexes, getConnection(), getORB(), isConnected() && getConnection()->getMetaData().is() ? getConnection()->getMetaData()->getMaxColumnsInIndex() : 0); + ScopedVclPtrInstance< DbaIndexDialog > aDialog(getView(), aFieldNames, xIndexes, getConnection(), getORB()); if (RET_OK != aDialog->Execute()) return; |