Branch data 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 : : DBG_NAME(ORelationDesignView)
49 : 0 : ORelationDesignView::ORelationDesignView(Window* _pParent, ORelationController& _rController,const Reference< XMultiServiceFactory >& _rFactory)
50 : 0 : :OJoinDesignView( _pParent, _rController, _rFactory )
51 : : {
52 : : DBG_CTOR(ORelationDesignView,NULL);
53 : 0 : }
54 : : // -----------------------------------------------------------------------------
55 : 0 : ORelationDesignView::~ORelationDesignView()
56 : : {
57 : : DBG_DTOR(ORelationDesignView,NULL);
58 [ # # ]: 0 : }
59 : : // -------------------------------------------------------------------------
60 : 0 : void ORelationDesignView::Construct()
61 : : {
62 [ # # ]: 0 : m_pTableView = new ORelationTableView(m_pScrollWindow,this);
63 : 0 : OJoinDesignView::Construct();
64 : 0 : }
65 : : // -----------------------------------------------------------------------------
66 : 0 : void ORelationDesignView::initialize()
67 : : {
68 : 0 : m_pTableView->clearLayoutInformation();
69 : 0 : m_pTableView->ReSync();
70 : :
71 : 0 : OJoinDesignView::initialize();
72 : 0 : }
73 : : // -----------------------------------------------------------------------------
74 : 0 : long ORelationDesignView::PreNotify( NotifyEvent& rNEvt )
75 : : {
76 : 0 : long nDone = 0L;
77 [ # # ]: 0 : if(rNEvt.GetType() == EVENT_GETFOCUS)
78 : : {
79 [ # # ]: 0 : if(!m_pTableView->HasChildPathFocus())
80 : : {
81 : 0 : m_pTableView->GrabTabWinFocus();
82 : 0 : nDone = 1L;
83 : : }
84 : : }
85 [ # # ]: 0 : if(!nDone)
86 : 0 : nDone = OJoinDesignView::PreNotify(rNEvt);
87 : 0 : return nDone;
88 : : }
89 : : // -----------------------------------------------------------------------------
90 : 0 : void ORelationDesignView::GetFocus()
91 : : {
92 : 0 : OJoinDesignView::GetFocus();
93 [ # # ][ # # ]: 0 : if ( m_pTableView && m_pTableView->IsVisible() && !m_pTableView->GetTabWinMap()->empty() )
[ # # ][ # # ]
94 : 0 : m_pTableView->GrabTabWinFocus();
95 : 0 : }
96 : : // -----------------------------------------------------------------------------
97 : :
98 : :
99 : :
100 : :
101 : :
102 : :
103 : :
104 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|