2010-10-12 15:59:03 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-14 17:39:53 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2006-09-17 06:28:19 +00:00
|
|
|
|
2017-10-23 22:42:52 +02:00
|
|
|
#include <RelationDesignView.hxx>
|
|
|
|
#include <RelationTableView.hxx>
|
|
|
|
#include <RelationController.hxx>
|
2018-12-26 01:11:42 +01:00
|
|
|
#include <vcl/event.hxx>
|
2001-02-28 09:09:17 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2014-09-23 11:20:40 +02:00
|
|
|
ORelationDesignView::ORelationDesignView(vcl::Window* _pParent, ORelationController& _rController,const Reference< XComponentContext >& _rxContext)
|
2012-12-14 12:58:00 +02:00
|
|
|
:OJoinDesignView( _pParent, _rController, _rxContext )
|
2001-02-28 09:09:17 +00:00
|
|
|
{
|
|
|
|
}
|
2013-08-17 23:43:14 +02:00
|
|
|
|
2001-08-23 13:46:27 +00:00
|
|
|
void ORelationDesignView::Construct()
|
2001-02-28 09:09:17 +00:00
|
|
|
{
|
2015-04-20 14:00:04 +01:00
|
|
|
m_pTableView = VclPtr<ORelationTableView>::Create(m_pScrollWindow,this);
|
2001-08-23 13:46:27 +00:00
|
|
|
OJoinDesignView::Construct();
|
2001-02-28 09:09:17 +00:00
|
|
|
}
|
2013-08-17 23:43:14 +02:00
|
|
|
|
2001-02-28 09:09:17 +00:00
|
|
|
void ORelationDesignView::initialize()
|
|
|
|
{
|
2001-06-28 13:26:45 +00:00
|
|
|
m_pTableView->clearLayoutInformation();
|
2001-02-28 09:09:17 +00:00
|
|
|
m_pTableView->ReSync();
|
|
|
|
|
|
|
|
OJoinDesignView::initialize();
|
|
|
|
}
|
2013-08-17 23:43:14 +02:00
|
|
|
|
2014-01-18 00:18:52 +01:00
|
|
|
bool ORelationDesignView::PreNotify( NotifyEvent& rNEvt )
|
2001-03-20 07:46:50 +00:00
|
|
|
{
|
2015-09-25 13:06:09 +02:00
|
|
|
bool bDone = false;
|
2022-09-15 10:19:45 +02:00
|
|
|
if(rNEvt.GetType() == NotifyEventType::GETFOCUS)
|
2001-03-20 07:46:50 +00:00
|
|
|
{
|
2015-07-01 21:22:34 +01:00
|
|
|
if(m_pTableView && !m_pTableView->HasChildPathFocus())
|
2001-03-21 12:51:10 +00:00
|
|
|
{
|
|
|
|
m_pTableView->GrabTabWinFocus();
|
2015-09-25 13:06:09 +02:00
|
|
|
bDone = true;
|
2001-03-21 12:51:10 +00:00
|
|
|
}
|
2001-03-20 07:46:50 +00:00
|
|
|
}
|
2015-09-25 13:06:09 +02:00
|
|
|
if(!bDone)
|
|
|
|
bDone = OJoinDesignView::PreNotify(rNEvt);
|
|
|
|
return bDone;
|
2001-03-20 07:46:50 +00:00
|
|
|
}
|
2013-08-17 23:43:14 +02:00
|
|
|
|
2002-05-02 06:54:11 +00:00
|
|
|
void ORelationDesignView::GetFocus()
|
|
|
|
{
|
|
|
|
OJoinDesignView::GetFocus();
|
2014-06-18 12:14:29 +02:00
|
|
|
if ( m_pTableView && m_pTableView->IsVisible() && !m_pTableView->GetTabWinMap().empty() )
|
2002-05-02 06:54:11 +00:00
|
|
|
m_pTableView->GrabTabWinFocus();
|
|
|
|
}
|
2001-02-28 09:09:17 +00:00
|
|
|
|
2010-10-12 15:59:03 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|