LibreOffice Module dbaccess (master) 1
ColumnControlWindow.hxx
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#pragma once
20
21#include "FieldDescControl.hxx"
22#include "TypeInfo.hxx"
23#include <com/sun/star/uno/XComponentContext.hpp>
24#include <com/sun/star/util/XNumberFormatter.hpp>
26
27namespace dbaui
28{
29 // OColumnControlWindow
31 {
32 css::lang::Locale m_aLocale;
33 css::uno::Reference< css::uno::XComponentContext> m_xContext;
34 css::uno::Reference< css::sdbc::XConnection> m_xConnection;
35 mutable css::uno::Reference< css::util::XNumberFormatter > m_xFormatter; // a number formatter working with the connection's NumberFormatsSupplier
36
38 std::vector<OTypeInfoMap::iterator> m_aDestTypeInfoIndex;
39
40 mutable TOTypeInfoSP m_pTypeInfo; // default type
41 OUString m_sTypeNames; // these type names are the ones out of the resource file
44 protected:
45 virtual void ActivateAggregate( EControlType eType ) override;
46 virtual void DeactivateAggregate( EControlType eType ) override;
47
48 virtual css::lang::Locale GetLocale() const override;
49 virtual css::uno::Reference< css::util::XNumberFormatter > GetFormatter() const override;
50 virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) override;
51 virtual bool isAutoIncrementValueEnabled() const override;
52 virtual OUString getAutoIncrementValue() const override;
53 virtual void CellModified(sal_Int32 nRow, sal_uInt16 nColId ) override;
54
55 public:
57 const css::uno::Reference< css::uno::XComponentContext>& _rxContext);
58
59 void setConnection(const css::uno::Reference< css::sdbc::XConnection>& _xCon);
60
61 virtual css::uno::Reference< css::sdbc::XDatabaseMetaData> getMetaData() override;
62 virtual css::uno::Reference< css::sdbc::XConnection> getConnection() override;
63 virtual const OTypeInfoMap* getTypeInfo() const override;
64 TOTypeInfoSP const & getDefaultTyp() const;
65 };
66
68 {
69 std::unique_ptr<OColumnControlWindow> m_xControl;
70 public:
72 const css::uno::Reference< css::uno::XComponentContext>& _rxContext);
73 virtual void dispose() override;
74
76
77 virtual void GetFocus() override;
78 };
79
80} // namespace dbaui
81
82/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OColumnControlWindow & GetControl()
std::unique_ptr< OColumnControlWindow > m_xControl
OColumnControlTopLevel(vcl::Window *pParent, const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
virtual void dispose() override
virtual void GetFocus() override
virtual css::uno::Reference< css::sdbc::XConnection > getConnection() override
TOTypeInfoSP const & getDefaultTyp() const
virtual TOTypeInfoSP getTypeInfo(sal_Int32 _nPos) override
css::uno::Reference< css::sdbc::XConnection > m_xConnection
virtual void CellModified(sal_Int32 nRow, sal_uInt16 nColId) override
virtual OUString getAutoIncrementValue() const override
virtual void ActivateAggregate(EControlType eType) override
virtual css::lang::Locale GetLocale() const override
std::vector< OTypeInfoMap::iterator > m_aDestTypeInfoIndex
css::uno::Reference< css::util::XNumberFormatter > m_xFormatter
virtual bool isAutoIncrementValueEnabled() const override
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual css::uno::Reference< css::util::XNumberFormatter > GetFormatter() const override
OColumnControlWindow(weld::Container *pParent, const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
virtual css::uno::Reference< css::sdbc::XDatabaseMetaData > getMetaData() override
virtual void DeactivateAggregate(EControlType eType) override
void setConnection(const css::uno::Reference< css::sdbc::XConnection > &_xCon)
virtual const OTypeInfoMap * getTypeInfo() const override
OUString eType
Definition: generalpage.cxx:78
std::multimap< sal_Int32, TOTypeInfoSP > OTypeInfoMap
Definition: TypeInfo.hxx:100
std::shared_ptr< OTypeInfo > TOTypeInfoSP
Definition: TypeInfo.hxx:99
EControlType
Definition: QEnumTypes.hxx:63