1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 <JoinDesignView.hxx>
21 #include <JoinTableView.hxx>
22 #include <JoinController.hxx>
23 #include <vcl/svapp.hxx>
24 #include <vcl/settings.hxx>
26 using namespace ::com::sun::star::uno
;
32 OJoinDesignView::OJoinDesignView(vcl::Window
* _pParent
, OJoinController
& _rController
,const Reference
< XComponentContext
>& _rxContext
)
33 :ODataView( _pParent
, _rController
, _rxContext
)
34 ,m_pTableView(nullptr)
35 ,m_rController( _rController
)
37 m_pScrollWindow
= VclPtr
<OScrollWindowHelper
>::Create(this);
40 OJoinDesignView::~OJoinDesignView()
45 void OJoinDesignView::dispose()
47 m_pTableView
.disposeAndClear();
48 m_pScrollWindow
.disposeAndClear();
52 void OJoinDesignView::Construct()
54 m_pScrollWindow
->setTableView(m_pTableView
);
55 m_pScrollWindow
->Show();
58 SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor()) );
60 ODataView::Construct();
63 void OJoinDesignView::initialize()
67 void OJoinDesignView::resizeDocumentView(tools::Rectangle
& _rPlayground
)
69 m_pScrollWindow
->SetPosSizePixel( _rPlayground
.TopLeft(), _rPlayground
.GetSize() );
71 // just for completeness: there is no space left, we occupied it all ...
72 _rPlayground
.SetPos( _rPlayground
.BottomRight() );
73 _rPlayground
.SetSize( Size( 0, 0 ) );
76 void OJoinDesignView::setReadOnly(bool /*_bReadOnly*/)
80 void OJoinDesignView::SaveTabWinUIConfig(OTableWindow
const * pWin
)
82 OJoinController::SaveTabWinPosSize(pWin
, m_pScrollWindow
->GetHScrollBar().GetThumbPos(), m_pScrollWindow
->GetVScrollBar().GetThumbPos());
85 void OJoinDesignView::KeyInput( const KeyEvent
& rEvt
)
87 if ( m_pTableView
&& m_pTableView
->IsVisible() )
88 m_pTableView
->KeyInput( rEvt
);
90 ODataView::KeyInput(rEvt
);
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */