LibreOffice Module dbaccess (master) 1
FieldControls.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 <FieldControls.hxx>
21#include <SqlNameEdit.hxx>
22#include <core_resource.hxx>
23
24namespace dbaui {
25
26OPropColumnEditCtrl::OPropColumnEditCtrl(std::unique_ptr<weld::Entry> xEntry,
27 OUString const & _rAllowedChars,
28 TranslateId pHelpId,
29 short nPosition)
30 : OSQLNameEntry(std::move(xEntry), _rAllowedChars)
31 , m_nPos(nPosition)
32{
33 m_strHelpText = DBA_RES(pHelpId);
34}
35
36OPropEditCtrl::OPropEditCtrl(std::unique_ptr<weld::Entry> xEntry, TranslateId pHelpId, short nPosition)
37 : OWidgetBase(xEntry.get())
38 , m_xEntry(std::move(xEntry))
39 , m_nPos(nPosition)
40{
41 m_strHelpText = DBA_RES(pHelpId);
42}
43
44OPropNumericEditCtrl::OPropNumericEditCtrl(std::unique_ptr<weld::SpinButton> xSpinButton, TranslateId pHelpId, short nPosition)
45 : OWidgetBase(xSpinButton.get())
46 , m_xSpinButton(std::move(xSpinButton))
47 , m_nPos(nPosition)
48{
49 m_strHelpText = DBA_RES(pHelpId);
50}
51
52OPropListBoxCtrl::OPropListBoxCtrl(std::unique_ptr<weld::ComboBox> xComboBox, TranslateId pHelpId, short nPosition)
53 : OWidgetBase(xComboBox.get())
54 , m_xComboBox(std::move(xComboBox))
55 , m_nPos(nPosition)
56{
57 m_strHelpText = DBA_RES(pHelpId);
58}
59
60} // end namespace dbaui
OPropColumnEditCtrl(std::unique_ptr< weld::Entry > xEntry, OUString const &_rAllowedChars, TranslateId pHelpId, short nPosition)
OPropEditCtrl(std::unique_ptr< weld::Entry > xEntry, TranslateId pHelpId, short nPosition)
OPropListBoxCtrl(std::unique_ptr< weld::ComboBox > xComboBox, TranslateId pHelpId, short nPosition)
OPropNumericEditCtrl(std::unique_ptr< weld::SpinButton > xSpinButton, TranslateId pHelpId, short nPosition)
#define DBA_RES(id)
size_t m_nPos
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)