update dev300-m58
[ooovba.git] / svx / source / inc / formcontrolfactory.hxx
blobc405727e39f7b738faeada90858f189df1b72dbe
2 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: formcontrolfactory.hxx,v $
11 * $Revision: 1.1.2.1 $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SVX_FORMCONTROLMANAGER_HXX
32 #define SVX_FORMCONTROLMANAGER_HXX
34 #include "fmdocumentclassification.hxx"
36 /** === begin UNO includes === **/
37 #include <com/sun/star/beans/XPropertySet.hpp>
38 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
39 #include <com/sun/star/util/XNumberFormats.hpp>
40 /** === end UNO includes === **/
42 #include <memory>
44 class SdrUnoObj;
45 class Rectangle;
47 namespace comphelper {
48 class ComponentContext;
51 //........................................................................
52 namespace svxform
54 //........................................................................
56 //====================================================================
57 //= FormControlFactory
58 //====================================================================
59 struct FormControlFactory_Data;
61 class FormControlFactory
63 public:
64 FormControlFactory( const ::comphelper::ComponentContext& _rContext );
65 ~FormControlFactory();
67 /** initializes the given control model which is to be newly inserted into a document
69 @param _eDocType
70 the type of the document which the control is to be inserted into
71 @param _rxControlModel
72 the control model to be inserted
73 @param _rControlBoundRect
74 the bound rect of the control, if applicable
75 @return
76 the class ID of the control
78 sal_Int16 initializeControlModel(
79 const DocumentType _eDocType,
80 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxControlModel,
81 const Rectangle& _rControlBoundRect
84 sal_Int16 initializeControlModel( const DocumentType _eDocType, const SdrUnoObj& _rObject );
85 sal_Int16 initializeControlModel( const DocumentType _eDocType, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxControlModel );
87 void initializeTextFieldLineEnds(
88 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel
91 void initializeFieldDependentProperties(
92 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDatabaseField,
93 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxControlModel,
94 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats >& _rxNumberFormats
97 private:
98 ::std::auto_ptr< FormControlFactory_Data > m_pData;
101 //........................................................................
102 } // namespace svxform
103 //........................................................................
105 #endif // SVX_FORMCONTROLMANAGER_HXX