Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / svx / source / inc / formcontrolfactory.hxx
bloba95c5109584ddb409a229f36d28ad9584e5f4765
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 /*
4 * This file is part of the LibreOffice project.
6 * This Source Code Form is subject to the terms of the Mozilla Public
7 * License, v. 2.0. If a copy of the MPL was not distributed with this
8 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 * This file incorporates work covered by the following license notice:
12 * Licensed to the Apache Software Foundation (ASF) under one or more
13 * contributor license agreements. See the NOTICE file distributed
14 * with this work for additional information regarding copyright
15 * ownership. The ASF licenses this file to you under the Apache
16 * License, Version 2.0 (the "License"); you may not use this file
17 * except in compliance with the License. You may obtain a copy of
18 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #ifndef INCLUDED_SVX_SOURCE_INC_FORMCONTROLFACTORY_HXX
22 #define INCLUDED_SVX_SOURCE_INC_FORMCONTROLFACTORY_HXX
24 #include "fmdocumentclassification.hxx"
26 #include <com/sun/star/beans/XPropertySet.hpp>
27 #include <com/sun/star/util/XNumberFormats.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <com/sun/star/uno/XComponentContext.hpp>
30 #include <com/sun/star/container/XNameAccess.hpp>
32 #include <string_view>
34 class SdrUnoObj;
35 namespace tools { class Rectangle; }
37 namespace comphelper {
38 class ComponentContext;
42 namespace svxform
45 class FormControlFactory
47 public:
48 FormControlFactory( const css::uno::Reference<css::uno::XComponentContext>& _rContext );
49 FormControlFactory();
50 ~FormControlFactory();
52 /** initializes the given control model which is to be newly inserted into a document
54 @param _eDocType
55 the type of the document which the control is to be inserted into
56 @param _rxControlModel
57 the control model to be inserted
58 @param _rControlBoundRect
59 the bound rect of the control, if applicable
60 @return
61 the class ID of the control
63 sal_Int16 initializeControlModel(
64 const DocumentType _eDocType,
65 const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel,
66 const tools::Rectangle& _rControlBoundRect
69 sal_Int16 initializeControlModel( const DocumentType _eDocType, const SdrUnoObj& _rObject );
70 void initializeControlModel( const DocumentType _eDocType, const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel );
72 void initializeTextFieldLineEnds(
73 const css::uno::Reference< css::beans::XPropertySet >& _rxModel
76 static void initializeFieldDependentProperties(
77 const css::uno::Reference< css::beans::XPropertySet >& _rxDatabaseField,
78 const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel,
79 const css::uno::Reference< css::util::XNumberFormats >& _rxNumberFormats
82 static OUString getDefaultName(
83 const sal_Int16 nClassId,
84 const css::uno::Reference< css::lang::XServiceInfo >& _rxObject
87 static OUString getDefaultUniqueName_ByComponentType(
88 const css::uno::Reference< css::container::XNameAccess >& _rxContainer,
89 const css::uno::Reference< css::beans::XPropertySet >& _rxObject
92 static OUString getUniqueName(
93 const css::uno::Reference< css::container::XNameAccess >& _rxContainer,
94 std::u16string_view _rBaseName
97 private:
98 css::uno::Reference<css::uno::XComponentContext> m_xContext;
105 #endif // INCLUDED_SVX_SOURCE_INC_FORMCONTROLFACTORY_HXX
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */