LCOV - code coverage report
Current view: top level - dbaccess/source/ui/querydesign - JoinDesignView.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 37 2.7 %
Date: 2015-06-13 12:38:46 Functions: 2 12 16.7 %
Legend: Lines: hit not hit

          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 "JoinDesignView.hxx"
      21             : #include "JoinTableView.hxx"
      22             : #include "JoinController.hxx"
      23             : #include <svl/undo.hxx>
      24             : #include "adtabdlg.hxx"
      25             : #include <vcl/svapp.hxx>
      26             : #include <vcl/msgbox.hxx>
      27             : #include "browserids.hxx"
      28             : #include "dbu_qry.hrc"
      29             : #include <comphelper/types.hxx>
      30             : #include <connectivity/dbtools.hxx>
      31             : #include <com/sun/star/sdbc/DataType.hpp>
      32             : #include <com/sun/star/container/XNameAccess.hpp>
      33             : #include "TableConnection.hxx"
      34             : #include "ConnectionLine.hxx"
      35             : #include "ConnectionLineData.hxx"
      36             : #include "TableConnectionData.hxx"
      37             : #include "dbustrings.hrc"
      38             : #include <comphelper/extract.hxx>
      39             : #include "UITools.hxx"
      40             : #include <vcl/settings.hxx>
      41             : 
      42             : using namespace ::com::sun::star::uno;
      43             : using namespace ::com::sun::star::lang;
      44             : using namespace ::com::sun::star::i18n;
      45             : using namespace ::com::sun::star::sdbc;
      46             : using namespace ::com::sun::star::beans;
      47             : using namespace ::com::sun::star::container;
      48             : using namespace ::com::sun::star::util;
      49             : 
      50             : namespace dbaui
      51             : {
      52             : 
      53             : // OJoinDesignView
      54           0 : OJoinDesignView::OJoinDesignView(vcl::Window* _pParent, OJoinController& _rController,const Reference< XComponentContext >& _rxContext)
      55             :     :ODataView( _pParent, _rController, _rxContext )
      56             :     ,m_pTableView(NULL)
      57           0 :     ,m_rController( _rController )
      58             : {
      59           0 :     m_pScrollWindow = VclPtr<OScrollWindowHelper>::Create(this);
      60           0 : }
      61             : 
      62           0 : OJoinDesignView::~OJoinDesignView()
      63             : {
      64           0 :     disposeOnce();
      65           0 : }
      66             : 
      67           0 : void OJoinDesignView::dispose()
      68             : {
      69           0 :     m_pTableView.disposeAndClear();
      70           0 :     m_pScrollWindow.disposeAndClear();
      71           0 :     ODataView::dispose();
      72           0 : }
      73             : 
      74           0 : void OJoinDesignView::Construct()
      75             : {
      76           0 :     m_pScrollWindow->setTableView(m_pTableView);
      77           0 :     m_pScrollWindow->Show();
      78           0 :     m_pTableView->Show();
      79             : 
      80           0 :     SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor()) );
      81             : 
      82           0 :     ODataView::Construct();
      83           0 : }
      84             : 
      85           0 : void OJoinDesignView::initialize()
      86             : {
      87           0 : }
      88             : 
      89           0 : void OJoinDesignView::resizeDocumentView(Rectangle& _rPlayground)
      90             : {
      91           0 :     m_pScrollWindow->SetPosSizePixel( _rPlayground.TopLeft(), _rPlayground.GetSize() );
      92             : 
      93             :     // just for completeness: there is no space left, we occupied it all ...
      94           0 :     _rPlayground.SetPos( _rPlayground.BottomRight() );
      95           0 :     _rPlayground.SetSize( Size( 0, 0 ) );
      96           0 : }
      97             : 
      98           0 : void OJoinDesignView::setReadOnly(bool /*_bReadOnly*/)
      99             : {
     100           0 : }
     101             : 
     102           0 : void OJoinDesignView::SaveTabWinUIConfig(OTableWindow* pWin)
     103             : {
     104           0 :     OJoinController::SaveTabWinPosSize(pWin, m_pScrollWindow->GetHScrollBar().GetThumbPos(), m_pScrollWindow->GetVScrollBar().GetThumbPos());
     105           0 : }
     106             : 
     107           0 : void OJoinDesignView::KeyInput( const KeyEvent& rEvt )
     108             : {
     109           0 :     if ( m_pTableView && m_pTableView->IsVisible() )
     110           0 :         m_pTableView->KeyInput( rEvt );
     111             :     else
     112           0 :         ODataView::KeyInput(rEvt);
     113           0 : }
     114             : 
     115          36 : }   // namespace dbaui
     116             : 
     117             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11