Bump version to 5.0-14
[LibreOffice.git] / dbaccess / source / ui / relationdesign / RelationDesignView.cxx
blob5e7f370b860003891417548f9e8b67149c8fcc0a
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 <svl/undo.hxx>
24 #include <vcl/svapp.hxx>
25 #include <vcl/msgbox.hxx>
26 #include "browserids.hxx"
27 #include "dbu_rel.hrc"
28 #include <comphelper/types.hxx>
29 #include <connectivity/dbtools.hxx>
30 #include <com/sun/star/sdbc/DataType.hpp>
31 #include <com/sun/star/container/XNameAccess.hpp>
32 #include "RTableConnection.hxx"
33 #include "ConnectionLine.hxx"
34 #include "ConnectionLineData.hxx"
35 #include "RTableConnectionData.hxx"
36 #include "dbustrings.hrc"
37 #include <comphelper/extract.hxx>
38 #include "UITools.hxx"
39 #include <tools/debug.hxx>
41 using namespace ::dbaui;
42 using namespace ::com::sun::star::uno;
43 using namespace ::com::sun::star::lang;
44 using namespace ::com::sun::star::sdbc;
45 using namespace ::com::sun::star::beans;
46 using namespace ::com::sun::star::container;
48 ORelationDesignView::ORelationDesignView(vcl::Window* _pParent, ORelationController& _rController,const Reference< XComponentContext >& _rxContext)
49 :OJoinDesignView( _pParent, _rController, _rxContext )
53 void ORelationDesignView::Construct()
55 m_pTableView = VclPtr<ORelationTableView>::Create(m_pScrollWindow,this);
56 OJoinDesignView::Construct();
59 void ORelationDesignView::initialize()
61 m_pTableView->clearLayoutInformation();
62 m_pTableView->ReSync();
64 OJoinDesignView::initialize();
67 bool ORelationDesignView::PreNotify( NotifyEvent& rNEvt )
69 bool nDone = false;
70 if(rNEvt.GetType() == MouseNotifyEvent::GETFOCUS)
72 if(m_pTableView && !m_pTableView->HasChildPathFocus())
74 m_pTableView->GrabTabWinFocus();
75 nDone = true;
78 if(!nDone)
79 nDone = OJoinDesignView::PreNotify(rNEvt);
80 return nDone;
83 void ORelationDesignView::GetFocus()
85 OJoinDesignView::GetFocus();
86 if ( m_pTableView && m_pTableView->IsVisible() && !m_pTableView->GetTabWinMap().empty() )
87 m_pTableView->GrabTabWinFocus();
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */