diff options
Diffstat (limited to 'dbaccess/source/ui/relationdesign')
4 files changed, 17 insertions, 28 deletions
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx index c1c408ee8f1a..46b3671c40e2 100644 --- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx +++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx @@ -38,7 +38,6 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; -using namespace ::com::sun::star::lang; ORelationTableConnectionData::ORelationTableConnectionData() :m_nUpdateRules(KeyRule::NO_ACTION) @@ -112,9 +111,7 @@ void ORelationTableConnectionData::ChangeOrientation() } // adapt member - TTableWindowData::value_type pTemp = m_pReferencingTable; - m_pReferencingTable = m_pReferencedTable; - m_pReferencedTable = pTemp; + std::swap( m_pReferencingTable, m_pReferencedTable ); } void ORelationTableConnectionData::SetCardinality() @@ -256,11 +253,11 @@ bool ORelationTableConnectionData::Update() xTableProp->getPropertyValue(PROPERTY_NAME) >>= sSourceName; OUString sKeyName = sSourceName + getReferencedTable()->GetTableName(); - xKey->setPropertyValue(PROPERTY_NAME,makeAny(sKeyName)); - xKey->setPropertyValue(PROPERTY_TYPE,makeAny(KeyType::FOREIGN)); - xKey->setPropertyValue(PROPERTY_REFERENCEDTABLE,makeAny(getReferencedTable()->GetTableName())); - xKey->setPropertyValue(PROPERTY_UPDATERULE, makeAny(GetUpdateRules())); - xKey->setPropertyValue(PROPERTY_DELETERULE, makeAny(GetDeleteRules())); + xKey->setPropertyValue(PROPERTY_NAME,Any(sKeyName)); + xKey->setPropertyValue(PROPERTY_TYPE,Any(KeyType::FOREIGN)); + xKey->setPropertyValue(PROPERTY_REFERENCEDTABLE,Any(getReferencedTable()->GetTableName())); + xKey->setPropertyValue(PROPERTY_UPDATERULE, Any(GetUpdateRules())); + xKey->setPropertyValue(PROPERTY_DELETERULE, Any(GetDeleteRules())); } Reference<XColumnsSupplier> xColSup(xKey,UNO_QUERY); @@ -278,8 +275,8 @@ bool ORelationTableConnectionData::Update() Reference<XPropertySet> xColumn = xColumnFactory->createDataDescriptor(); if ( xColumn.is() ) { - xColumn->setPropertyValue(PROPERTY_NAME,makeAny(elem->GetSourceFieldName())); - xColumn->setPropertyValue(PROPERTY_RELATEDCOLUMN,makeAny(elem->GetDestFieldName())); + xColumn->setPropertyValue(PROPERTY_NAME,Any(elem->GetSourceFieldName())); + xColumn->setPropertyValue(PROPERTY_RELATEDCOLUMN,Any(elem->GetDestFieldName())); xColumnAppend->appendByDescriptor(xColumn); } } diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index 0750a77a01df..ebeca9a64b24 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -44,7 +44,7 @@ #include <RTableConnectionData.hxx> #include <RelationTableView.hxx> #include <RelationDesignView.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <osl/thread.hxx> #include <osl/mutex.hxx> @@ -58,16 +58,13 @@ org_openoffice_comp_dbu_ORelationDesign_get_implementation( } using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::io; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::frame; -using namespace ::com::sun::star::lang; using namespace ::com::sun::star::container; using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdb; using namespace ::com::sun::star::ui::dialogs; -using namespace ::com::sun::star::util; using namespace ::dbtools; using namespace ::dbaui; using namespace ::comphelper; @@ -138,7 +135,7 @@ void ORelationController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue { ::comphelper::NamedValueCollection aWindowsData; saveTableWindows( aWindowsData ); - getDataSource()->setPropertyValue( PROPERTY_LAYOUTINFORMATION, makeAny( aWindowsData.getPropertyValues() ) ); + getDataSource()->setPropertyValue( PROPERTY_LAYOUTINFORMATION, Any( aWindowsData.getPropertyValues() ) ); setModified(false); } } @@ -159,9 +156,9 @@ void ORelationController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue InvalidateFeature(_nId); } -void ORelationController::impl_initialize() +void ORelationController::impl_initialize(const ::comphelper::NamedValueCollection& rArguments) { - OJoinController::impl_initialize(); + OJoinController::impl_initialize(rArguments); if( !getSdbMetaData().supportsRelations() ) {// check if this database supports relations diff --git a/dbaccess/source/ui/relationdesign/RelationDesignView.cxx b/dbaccess/source/ui/relationdesign/RelationDesignView.cxx index 014579cf7c7f..161702f08196 100644 --- a/dbaccess/source/ui/relationdesign/RelationDesignView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationDesignView.cxx @@ -24,10 +24,6 @@ using namespace ::dbaui; using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::sdbc; -using namespace ::com::sun::star::beans; -using namespace ::com::sun::star::container; ORelationDesignView::ORelationDesignView(vcl::Window* _pParent, ORelationController& _rController,const Reference< XComponentContext >& _rxContext) :OJoinDesignView( _pParent, _rController, _rxContext ) @@ -51,7 +47,7 @@ void ORelationDesignView::initialize() bool ORelationDesignView::PreNotify( NotifyEvent& rNEvt ) { bool bDone = false; - if(rNEvt.GetType() == MouseNotifyEvent::GETFOCUS) + if(rNEvt.GetType() == NotifyEventType::GETFOCUS) { if(m_pTableView && !m_pTableView->HasChildPathFocus()) { diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index d18f1cfa8037..87a769ce83b3 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -28,7 +28,7 @@ #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <connectivity/dbtools.hxx> -#include <tools/diagnose_ex.h> +#include <comphelper/diagnose_ex.hxx> #include <helpids.h> #include <RelationDesignView.hxx> #include <JoinController.hxx> @@ -51,7 +51,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdbc; using namespace ::com::sun::star::sdbcx; -using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::accessibility; @@ -110,7 +109,7 @@ void ORelationTableView::ReSync() pTabWin.disposeAndClear(); arrInvalidTables.push_back(pData->GetTableName()); - rTabWinDataList.erase( std::remove(rTabWinDataList.begin(), rTabWinDataList.end(), *aIter), rTabWinDataList.end()); + std::erase(rTabWinDataList, *aIter); continue; } @@ -140,7 +139,7 @@ void ORelationTableView::ReSync() if (bInvalid) { // no -> bad luck, the connection is gone - rTabConnDataList.erase( std::remove(rTabConnDataList.begin(), rTabConnDataList.end(), *aConIter), rTabConnDataList.end() ); + std::erase(rTabConnDataList, *aConIter); continue; } } @@ -309,7 +308,7 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin if ( m_pAccessible ) m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD, Any(), - makeAny(pNewTabWin->GetAccessible())); + Any(pNewTabWin->GetAccessible())); } else { |