LibreOffice Module svx (master)  1
formcontrolfactory.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 
3 /*
4  * This file is part of the LibreOffice project.
5  *
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/.
9  *
10  * This file incorporates work covered by the following license notice:
11  *
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 .
19  */
20 
21 #ifndef INCLUDED_SVX_SOURCE_INC_FORMCONTROLFACTORY_HXX
22 #define INCLUDED_SVX_SOURCE_INC_FORMCONTROLFACTORY_HXX
23 
25 
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>
31 
32 #include <memory>
33 #include <string_view>
34 
35 class SdrUnoObj;
36 namespace tools { class Rectangle; }
37 
38 namespace comphelper {
39  class ComponentContext;
40 }
41 
42 
43 namespace svxform
44 {
45 
47  {
48  public:
49  FormControlFactory( const css::uno::Reference<css::uno::XComponentContext>& _rContext );
52 
64  sal_Int16 initializeControlModel(
65  const DocumentType _eDocType,
66  const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel,
67  const tools::Rectangle& _rControlBoundRect
68  );
69 
70  sal_Int16 initializeControlModel( const DocumentType _eDocType, const SdrUnoObj& _rObject );
71  void initializeControlModel( const DocumentType _eDocType, const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel );
72 
74  const css::uno::Reference< css::beans::XPropertySet >& _rxModel
75  );
76 
78  const css::uno::Reference< css::beans::XPropertySet >& _rxDatabaseField,
79  const css::uno::Reference< css::beans::XPropertySet >& _rxControlModel,
80  const css::uno::Reference< css::util::XNumberFormats >& _rxNumberFormats
81  );
82 
83  static OUString getDefaultName(
84  const sal_Int16 nClassId,
85  const css::uno::Reference< css::lang::XServiceInfo >& _rxObject
86  );
87 
89  const css::uno::Reference< css::container::XNameAccess >& _rxContainer,
90  const css::uno::Reference< css::beans::XPropertySet >& _rxObject
91  );
92 
93  static OUString getUniqueName(
94  const css::uno::Reference< css::container::XNameAccess >& _rxContainer,
95  std::u16string_view _rBaseName
96  );
97 
98  private:
99  css::uno::Reference<css::uno::XComponentContext> m_xContext;
100  };
101 
102 
103 }
104 
105 
106 #endif // INCLUDED_SVX_SOURCE_INC_FORMCONTROLFACTORY_HXX
107 
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static OUString getDefaultName(const sal_Int16 nClassId, const css::uno::Reference< css::lang::XServiceInfo > &_rxObject)
static OUString getDefaultUniqueName_ByComponentType(const css::uno::Reference< css::container::XNameAccess > &_rxContainer, const css::uno::Reference< css::beans::XPropertySet > &_rxObject)
css::uno::Reference< css::uno::XComponentContext > m_xContext
static void initializeFieldDependentProperties(const css::uno::Reference< css::beans::XPropertySet > &_rxDatabaseField, const css::uno::Reference< css::beans::XPropertySet > &_rxControlModel, const css::uno::Reference< css::util::XNumberFormats > &_rxNumberFormats)
sal_Int16 initializeControlModel(const DocumentType _eDocType, const css::uno::Reference< css::beans::XPropertySet > &_rxControlModel, const tools::Rectangle &_rControlBoundRect)
initializes the given control model which is to be newly inserted into a document ...
class FmSearchEngine - Impl class for FmSearchDialog
static OUString getUniqueName(const css::uno::Reference< css::container::XNameAccess > &_rxContainer, std::u16string_view _rBaseName)
void initializeTextFieldLineEnds(const css::uno::Reference< css::beans::XPropertySet > &_rxModel)