LibreOffice Module forms (master) 1
Numeric.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
20#pragma once
21
22#include "EditBase.hxx"
23
24
25namespace frm
26{
27
29 :public OEditBaseModel
30{
31private:
32 css::uno::Any m_aSaveValue;
33
34public:
36 const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
37 );
39 const ONumericModel* _pOriginal,
40 const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
41 );
42 virtual ~ONumericModel() override;
43
44 // css::lang::XServiceInfo
45 OUString SAL_CALL getImplementationName() override
46 { return "com.sun.star.form.ONumericModel"; }
47
48 virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
49
50 // css::io::XPersistObject
51 virtual OUString SAL_CALL getServiceName() override;
52
53 // OControlModel's property handling
54 virtual void describeFixedProperties(
55 css::uno::Sequence< css::beans::Property >& /* [out] */ _rProps
56 ) const override;
57
58protected:
59 // OBoundControlModel overridables
60 virtual css::uno::Any
62 virtual bool commitControlValueToDbColumn( bool _bPostReset ) override;
63
64 virtual css::uno::Any
65 getDefaultForReset() const override;
66 virtual void resetNoBroadcast() override;
67
68protected:
69 virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) override;
70};
71
73{
74public:
75 explicit ONumericControl(const css::uno::Reference< css::uno::XComponentContext>& _rxFactory);
76
77 // css::lang::XServiceInfo
78 OUString SAL_CALL getImplementationName() override
79 { return "com.sun.star.form.ONumericControl"; }
80
81 virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
82};
83
84
85} // namespace frm
86
87
88/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString SAL_CALL getImplementationName() override
Definition: Numeric.hxx:78
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: Numeric.cxx:49
ONumericControl(const css::uno::Reference< css::uno::XComponentContext > &_rxFactory)
virtual void resetNoBroadcast() override
called to reset the control to some kind of default.
Definition: Numeric.cxx:180
virtual css::uno::Any translateDbColumnToControlValue() override
translates a db column value into a control value.
Definition: Numeric.cxx:160
css::uno::Any m_aSaveValue
Definition: Numeric.hxx:32
virtual css::uno::Any getDefaultForReset() const override
returns the default which should be used when resetting the control
Definition: Numeric.cxx:170
OUString SAL_CALL getImplementationName() override
Definition: Numeric.hxx:45
virtual bool commitControlValueToDbColumn(bool _bPostReset) override
commits the current control value to the database column we're bound to @precond we're properly bound...
Definition: Numeric.cxx:136
ONumericModel(const ONumericModel *_pOriginal, const css::uno::Reference< css::uno::XComponentContext > &_rxFactory)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: Numeric.cxx:93
virtual OUString SAL_CALL getServiceName() override
Definition: Numeric.cxx:130
virtual void describeFixedProperties(css::uno::Sequence< css::beans::Property > &_rProps) const override
describes the properties provided by this class, or its respective derived class
Definition: Numeric.cxx:118
virtual ~ONumericModel() override
Definition: Numeric.cxx:78
ONumericModel(const css::uno::Reference< css::uno::XComponentContext > &_rxFactory)
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
Definition: Numeric.cxx:84
ListBox is a bit confusing / different from other form components, so here are a few notes:
Definition: BaseListBox.hxx:25