Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
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>
40 :
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;
47 :
48 0 : ORelationDesignView::ORelationDesignView(Window* _pParent, ORelationController& _rController,const Reference< XComponentContext >& _rxContext)
49 0 : :OJoinDesignView( _pParent, _rController, _rxContext )
50 : {
51 0 : }
52 :
53 0 : ORelationDesignView::~ORelationDesignView()
54 : {
55 0 : }
56 :
57 0 : void ORelationDesignView::Construct()
58 : {
59 0 : m_pTableView = new ORelationTableView(m_pScrollWindow,this);
60 0 : OJoinDesignView::Construct();
61 0 : }
62 :
63 0 : void ORelationDesignView::initialize()
64 : {
65 0 : m_pTableView->clearLayoutInformation();
66 0 : m_pTableView->ReSync();
67 :
68 0 : OJoinDesignView::initialize();
69 0 : }
70 :
71 0 : bool ORelationDesignView::PreNotify( NotifyEvent& rNEvt )
72 : {
73 0 : bool nDone = false;
74 0 : if(rNEvt.GetType() == EVENT_GETFOCUS)
75 : {
76 0 : if(!m_pTableView->HasChildPathFocus())
77 : {
78 0 : m_pTableView->GrabTabWinFocus();
79 0 : nDone = true;
80 : }
81 : }
82 0 : if(!nDone)
83 0 : nDone = OJoinDesignView::PreNotify(rNEvt);
84 0 : return nDone;
85 : }
86 :
87 0 : void ORelationDesignView::GetFocus()
88 : {
89 0 : OJoinDesignView::GetFocus();
90 0 : if ( m_pTableView && m_pTableView->IsVisible() && !m_pTableView->GetTabWinMap()->empty() )
91 0 : m_pTableView->GrabTabWinFocus();
92 0 : }
93 :
94 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|