tdf#130857 qt weld: Support mail merge "Server Auth" dialog
[LibreOffice.git] / dbaccess / source / ui / relationdesign / RelationDesignView.cxx
blob161702f0819610dfa27972236a2159ad0cd7fc8a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <RelationDesignView.hxx>
21 #include <RelationTableView.hxx>
22 #include <RelationController.hxx>
23 #include <vcl/event.hxx>
25 using namespace ::dbaui;
26 using namespace ::com::sun::star::uno;
28 ORelationDesignView::ORelationDesignView(vcl::Window* _pParent, ORelationController& _rController,const Reference< XComponentContext >& _rxContext)
29 :OJoinDesignView( _pParent, _rController, _rxContext )
33 void ORelationDesignView::Construct()
35 m_pTableView = VclPtr<ORelationTableView>::Create(m_pScrollWindow,this);
36 OJoinDesignView::Construct();
39 void ORelationDesignView::initialize()
41 m_pTableView->clearLayoutInformation();
42 m_pTableView->ReSync();
44 OJoinDesignView::initialize();
47 bool ORelationDesignView::PreNotify( NotifyEvent& rNEvt )
49 bool bDone = false;
50 if(rNEvt.GetType() == NotifyEventType::GETFOCUS)
52 if(m_pTableView && !m_pTableView->HasChildPathFocus())
54 m_pTableView->GrabTabWinFocus();
55 bDone = true;
58 if(!bDone)
59 bDone = OJoinDesignView::PreNotify(rNEvt);
60 return bDone;
63 void ORelationDesignView::GetFocus()
65 OJoinDesignView::GetFocus();
66 if ( m_pTableView && m_pTableView->IsVisible() && !m_pTableView->GetTabWinMap().empty() )
67 m_pTableView->GrabTabWinFocus();
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */