bump product version to 4.1.6.2
[LibreOffice.git] / svx / source / inc / formcontrolfactory.hxx
blob23e0fb08c80d935d4a982e276ed1eb5640b61735
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 SVX_FORMCONTROLMANAGER_HXX
22 #define SVX_FORMCONTROLMANAGER_HXX
24 #include "fmdocumentclassification.hxx"
26 #include <com/sun/star/beans/XPropertySet.hpp>
27 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
28 #include <com/sun/star/util/XNumberFormats.hpp>
29 #include <com/sun/star/lang/XServiceInfo.hpp>
30 #include <com/sun/star/container/XNameAccess.hpp>
32 #include <memory>
34 class SdrUnoObj;
35 class Rectangle;
37 namespace comphelper {
38 class ComponentContext;
41 //........................................................................
42 namespace svxform
44 //........................................................................
46 //====================================================================
47 //= FormControlFactory
48 //====================================================================
49 struct FormControlFactory_Data;
51 class FormControlFactory
53 public:
54 FormControlFactory( const ::comphelper::ComponentContext& _rContext );
55 ~FormControlFactory();
57 /** initializes the given control model which is to be newly inserted into a document
59 @param _eDocType
60 the type of the document which the control is to be inserted into
61 @param _rxControlModel
62 the control model to be inserted
63 @param _rControlBoundRect
64 the bound rect of the control, if applicable
65 @return
66 the class ID of the control
68 sal_Int16 initializeControlModel(
69 const DocumentType _eDocType,
70 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxControlModel,
71 const Rectangle& _rControlBoundRect
74 sal_Int16 initializeControlModel( const DocumentType _eDocType, const SdrUnoObj& _rObject );
75 sal_Int16 initializeControlModel( const DocumentType _eDocType, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxControlModel );
77 void initializeTextFieldLineEnds(
78 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel
81 void initializeFieldDependentProperties(
82 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDatabaseField,
83 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxControlModel,
84 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats >& _rxNumberFormats
87 static OUString getDefaultName(
88 const sal_Int16 nClassId,
89 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XServiceInfo >& _rxObject
92 static OUString getDefaultUniqueName_ByComponentType(
93 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxContainer,
94 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject
97 static OUString getUniqueName(
98 const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _rxContainer,
99 const OUString& _rBaseName
102 private:
103 ::std::auto_ptr< FormControlFactory_Data > m_pData;
106 //........................................................................
107 } // namespace svxform
108 //........................................................................
110 #endif // SVX_FORMCONTROLMANAGER_HXX
112 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */