LibreOffice Module dbaccess (master) 1
JoinDesignView.cxx
Go to the documentation of this file.
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 <vcl/svapp.hxx>
24#include <vcl/settings.hxx>
25
26using namespace ::com::sun::star::uno;
27using namespace ::com::sun::star::lang;
28using namespace ::com::sun::star::sdbc;
29using namespace ::com::sun::star::beans;
30using namespace ::com::sun::star::container;
31using namespace ::com::sun::star::util;
32
33namespace dbaui
34{
35
36// OJoinDesignView
38 :ODataView( _pParent, _rController, _rxContext )
39 ,m_pTableView(nullptr)
40 ,m_rController( _rController )
41{
43}
44
46{
48}
49
51{
52 m_pTableView.disposeAndClear();
53 m_pScrollWindow.disposeAndClear();
56
58{
59 m_pScrollWindow->setTableView(m_pTableView);
60 m_pScrollWindow->Show();
61 m_pTableView->Show();
62
63 SetBackground( Wallpaper( Application::GetSettings().GetStyleSettings().GetFaceColor()) );
64
66}
67
69{
70}
71
73{
74 m_pScrollWindow->SetPosSizePixel( _rPlayground.TopLeft(), _rPlayground.GetSize() );
75
76 // just for completeness: there is no space left, we occupied it all ...
77 _rPlayground.SetPos( _rPlayground.BottomRight() );
78 _rPlayground.SetSize( Size( 0, 0 ) );
79}
80
81void OJoinDesignView::setReadOnly(bool /*_bReadOnly*/)
82{
83}
84
86{
87 OJoinController::SaveTabWinPosSize(pWin, m_pScrollWindow->GetHScrollBar().GetThumbPos(), m_pScrollWindow->GetVScrollBar().GetThumbPos());
88}
89
91{
92 if ( m_pTableView && m_pTableView->IsVisible() )
93 m_pTableView->KeyInput( rEvt );
94 else
96}
97
98} // namespace dbaui
99
100/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static const AllSettings & GetSettings()
static VclPtr< reference_type > Create(Arg &&... arg)
virtual void Construct()
late construction
Definition: dataview.cxx:49
virtual void dispose() override
Definition: dataview.cxx:58
static void SaveTabWinPosSize(OTableWindow const *pTabWin, tools::Long nOffsetX, tools::Long nOffsetY)
void SaveTabWinUIConfig(OTableWindow const *pWin)
VclPtr< OJoinTableView > m_pTableView
OJoinDesignView(vcl::Window *pParent, OJoinController &_rController, const css::uno::Reference< css::uno::XComponentContext > &)
virtual void initialize() override
VclPtr< OScrollWindowHelper > m_pScrollWindow
virtual void KeyInput(const KeyEvent &rEvt) override
virtual void Construct() override
late construction
virtual void dispose() override
virtual ~OJoinDesignView() override
virtual void setReadOnly(bool _bReadOnly)
virtual void resizeDocumentView(tools::Rectangle &rRect) override
ClassificationCategoriesController & m_rController
void SetSize(const Size &)
constexpr Point TopLeft() const
void SetPos(const Point &rPoint)
constexpr Size GetSize() const
constexpr Point BottomRight() const
virtual void KeyInput(const KeyEvent &rKEvt)
void SetBackground()