summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/querydesign
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/querydesign')
-rw-r--r--dbaccess/source/ui/querydesign/JoinTableView.cxx19
-rw-r--r--dbaccess/source/ui/querydesign/QTableWindow.cxx7
-rw-r--r--dbaccess/source/ui/querydesign/QTableWindow.hxx4
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx2
4 files changed, 8 insertions, 24 deletions
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index f08e94b2bfbd..657582fde435 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -1192,7 +1192,7 @@ void OJoinTableView::Command(const CommandEvent& rEvt)
Window::Command(rEvt);
}
-OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTableWindow* pRhs,bool _bSupressCrossOrNaturalJoin,const OTableConnection* _rpFirstAfter) const
+OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTableWindow* pRhs,bool _bSupressCrossOrNaturalJoin) const
{
OTableConnection* pConn = nullptr;
OSL_ENSURE(pRhs || pLhs, "OJoinTableView::GetTabConn : invalid args !");
@@ -1200,8 +1200,6 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab
if ((!pLhs || pLhs->ExistsAConn()) && (!pRhs || pRhs->ExistsAConn()))
{
- bool bFoundStart = _rpFirstAfter == nullptr;
-
auto aIter = m_vTableConnection.begin();
auto aEnd = m_vTableConnection.end();
for(;aIter != aEnd;++aIter)
@@ -1225,19 +1223,8 @@ OTableConnection* OJoinTableView::GetTabConn(const OTableWindow* pLhs,const OTab
if ( supressCrossNaturalJoin(pData->GetData()) )
continue;
}
- if (bFoundStart)
- {
- pConn = pData;
- break;
- }
-
- if (!pConn)
- // used as fallback : if there is no conn after _rpFirstAfter the first conn between the two tables
- // will be used
- pConn = pData;
-
- if (pData == _rpFirstAfter)
- bFoundStart = true;
+ pConn = pData;
+ break;
}
}
}
diff --git a/dbaccess/source/ui/querydesign/QTableWindow.cxx b/dbaccess/source/ui/querydesign/QTableWindow.cxx
index 1a374ab96173..041c4d0d0f7e 100644
--- a/dbaccess/source/ui/querydesign/QTableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/QTableWindow.cxx
@@ -49,14 +49,11 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
using namespace dbaui;
// class OQueryTableWindow
-OQueryTableWindow::OQueryTableWindow( vcl::Window* pParent, const TTableWindowData::value_type& pTabWinData, sal_Unicode* pszInitialAlias)
+OQueryTableWindow::OQueryTableWindow( vcl::Window* pParent, const TTableWindowData::value_type& pTabWinData)
:OTableWindow( pParent, pTabWinData )
,m_nAliasNum(0)
{
- if (pszInitialAlias != nullptr)
- m_strInitialAlias = OUString(pszInitialAlias);
- else
- m_strInitialAlias = GetAliasName();
+ m_strInitialAlias = GetAliasName();
// if table name matches alias, do not pass to InitialAlias,
// as the appending of a possible token could not succeed...
diff --git a/dbaccess/source/ui/querydesign/QTableWindow.hxx b/dbaccess/source/ui/querydesign/QTableWindow.hxx
index 9947905f6794..e9cb775783cd 100644
--- a/dbaccess/source/ui/querydesign/QTableWindow.hxx
+++ b/dbaccess/source/ui/querydesign/QTableWindow.hxx
@@ -28,9 +28,9 @@ namespace dbaui
class OQueryTableWindow : public OTableWindow
{
sal_Int32 m_nAliasNum;
- OUString m_strInitialAlias;
+ OUString m_strInitialAlias;
public:
- OQueryTableWindow( vcl::Window* pParent, const TTableWindowData::value_type& pTabWinData, sal_Unicode* pszInitialAlias = nullptr );
+ OQueryTableWindow( vcl::Window* pParent, const TTableWindowData::value_type& pTabWinData );
OUString GetAliasName() const
{
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 432160bf6519..abdb2f01449f 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -1911,7 +1911,7 @@ void OQueryController::impl_reset( const bool i_bForceCurrentControllerSettings
void OQueryController::reset()
{
impl_reset();
- getContainer()->reset( nullptr );
+ getContainer()->reset();
ClearUndoManager();
}