summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/querydesign/QueryTableView.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/querydesign/QueryTableView.cxx')
-rw-r--r--dbaccess/source/ui/querydesign/QueryTableView.cxx22
1 files changed, 9 insertions, 13 deletions
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 9b252dbf8b1e..2ca8c71b837f 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -19,7 +19,7 @@
#include <QueryTableView.hxx>
#include <TableFieldDescription.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <osl/diagnose.h>
#include <helpids.h>
#include "QTableWindow.hxx"
@@ -224,7 +224,7 @@ void OQueryTableView::ReSync()
pTabWin.disposeAndClear();
arrInvalidTables.push_back(pData->GetAliasName());
- rTabWinDataList.erase( std::remove(rTabWinDataList.begin(), rTabWinDataList.end(), *aIter), rTabWinDataList.end());
+ std::erase(rTabWinDataList, *aIter);
continue;
}
@@ -253,7 +253,7 @@ void OQueryTableView::ReSync()
if (bInvalid)
{
// no -> bad luck, no connection
- rTabConnDataList.erase( std::remove(rTabConnDataList.begin(), rTabConnDataList.end(), *aConIter), rTabConnDataList.end());
+ std::erase(rTabConnDataList, *aConIter);
continue;
}
@@ -430,7 +430,7 @@ void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString&
if ( m_pAccessible )
m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD,
Any(),
- makeAny(pNewTabWin->GetAccessible())
+ Any(pNewTabWin->GetAccessible())
);
do {
@@ -493,10 +493,10 @@ void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString&
if ( pTabWinTmp == pNewTabWin )
continue;
+ assert(pTabWinTmp && "TableWindow is null!");
if ( pTabWinTmp->GetData()->isQuery() )
continue;
- OSL_ENSURE(pTabWinTmp,"TableWindow is null!");
Reference< XPropertySet > xFKKey = getKeyReferencedTo( pTabWinTmp->GetData()->getKeys(), pNewTabWin->GetComposedName() );
if ( !xFKKey.is() )
continue;
@@ -561,11 +561,7 @@ void OQueryTableView::AddConnection(const OJoinExchangeData& jxdSource, const OJ
{
// the connection could point on the other side
if(pConn->GetSourceWin() == pDestWin)
- {
- OUString aTmp(aSourceFieldName);
- aSourceFieldName = aDestFieldName;
- aDestFieldName = aTmp;
- }
+ std::swap(aSourceFieldName, aDestFieldName);
pConn->GetData()->AppendConnLine( aSourceFieldName,aDestFieldName );
@@ -693,7 +689,7 @@ void OQueryTableView::RemoveTabWin(OTableWindow* pTabWin)
modified();
if ( m_pAccessible )
m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD,
- makeAny(pTabWin->GetAccessible()),
+ Any(pTabWin->GetAccessible()),
Any()
);
}
@@ -738,7 +734,7 @@ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc
// the TabWin data must also be passed out of my responsibility
TTableWindowData& rTabWinDataList = m_pView->getController().getTableWindowData();
- rTabWinDataList.erase( std::remove(rTabWinDataList.begin(), rTabWinDataList.end(), pTabWin->GetData()), rTabWinDataList.end());
+ std::erase(rTabWinDataList, pTabWin->GetData());
// The data should not be destroyed as TabWin itself - which is still alive - needs them
// Either it goes back into my responsibility, (via ShowTabWin), then I add the data back,
// or the Undo-Action, which currently has full responsibility for the window
@@ -755,7 +751,7 @@ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc
{
VclPtr<OTableConnection> xTmpEntry = *aIter2;
OQueryTableConnection* pTmpEntry = static_cast<OQueryTableConnection*>(xTmpEntry.get());
- OSL_ENSURE(pTmpEntry,"OQueryTableConnection is null!");
+ assert(pTmpEntry && "OQueryTableConnection is null!");
if( pTmpEntry->GetAliasName(JTCS_FROM) == pTabWin->GetAliasName() ||
pTmpEntry->GetAliasName(JTCS_TO) == pTabWin->GetAliasName() )
{