android: Update app icon to new startcenter icon
[LibreOffice.git] / dbaccess / source / ui / relationdesign / RelationDesignView.cxx
blobcc333accdec85f16347c40923e712964ba6fa559
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;
27 using namespace ::com::sun::star::lang;
28 using namespace ::com::sun::star::sdbc;
29 using namespace ::com::sun::star::beans;
30 using namespace ::com::sun::star::container;
32 ORelationDesignView::ORelationDesignView(vcl::Window* _pParent, ORelationController& _rController,const Reference< XComponentContext >& _rxContext)
33 :OJoinDesignView( _pParent, _rController, _rxContext )
37 void ORelationDesignView::Construct()
39 m_pTableView = VclPtr<ORelationTableView>::Create(m_pScrollWindow,this);
40 OJoinDesignView::Construct();
43 void ORelationDesignView::initialize()
45 m_pTableView->clearLayoutInformation();
46 m_pTableView->ReSync();
48 OJoinDesignView::initialize();
51 bool ORelationDesignView::PreNotify( NotifyEvent& rNEvt )
53 bool bDone = false;
54 if(rNEvt.GetType() == NotifyEventType::GETFOCUS)
56 if(m_pTableView && !m_pTableView->HasChildPathFocus())
58 m_pTableView->GrabTabWinFocus();
59 bDone = true;
62 if(!bDone)
63 bDone = OJoinDesignView::PreNotify(rNEvt);
64 return bDone;
67 void ORelationDesignView::GetFocus()
69 OJoinDesignView::GetFocus();
70 if ( m_pTableView && m_pTableView->IsVisible() && !m_pTableView->GetTabWinMap().empty() )
71 m_pTableView->GrabTabWinFocus();
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */