xref: /aoo41x/main/svx/source/inc/fmcontrollayout.hxx (revision 3334a7e6)
1*3334a7e6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*3334a7e6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*3334a7e6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*3334a7e6SAndrew Rist  * distributed with this work for additional information
6*3334a7e6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*3334a7e6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*3334a7e6SAndrew Rist  * "License"); you may not use this file except in compliance
9*3334a7e6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*3334a7e6SAndrew Rist  *
11*3334a7e6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*3334a7e6SAndrew Rist  *
13*3334a7e6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*3334a7e6SAndrew Rist  * software distributed under the License is distributed on an
15*3334a7e6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*3334a7e6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*3334a7e6SAndrew Rist  * specific language governing permissions and limitations
18*3334a7e6SAndrew Rist  * under the License.
19*3334a7e6SAndrew Rist  *
20*3334a7e6SAndrew Rist  *************************************************************/
21*3334a7e6SAndrew Rist 
22*3334a7e6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SVX_SOURCE_INC_FMCONTROLLAYOUT_HXX
25cdf0e10cSrcweir #define SVX_SOURCE_INC_FMCONTROLLAYOUT_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir /** === begin UNO includes === **/
28cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
29cdf0e10cSrcweir /** === end UNO includes === **/
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #ifndef SVX_SOURCE_FORM_FMDOCUMENTCLASSIFICATION_HXX
32cdf0e10cSrcweir #include "fmdocumentclassification.hxx"
33cdf0e10cSrcweir #endif
34cdf0e10cSrcweir #include <unotools/confignode.hxx>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir //........................................................................
37cdf0e10cSrcweir namespace svxform
38cdf0e10cSrcweir {
39cdf0e10cSrcweir //........................................................................
40cdf0e10cSrcweir 
41cdf0e10cSrcweir 	//====================================================================
42cdf0e10cSrcweir 	//= ControlLayouter
43cdf0e10cSrcweir 	//====================================================================
44cdf0e10cSrcweir     class ControlLayouter
45cdf0e10cSrcweir     {
46cdf0e10cSrcweir     public:
47cdf0e10cSrcweir         /** initializes the layout of a newly created form control (model)
48cdf0e10cSrcweir         */
49cdf0e10cSrcweir         static void initializeControlLayout(
50cdf0e10cSrcweir                         const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxControlModel,
51cdf0e10cSrcweir                         DocumentType _eDocType
52cdf0e10cSrcweir                     );
53cdf0e10cSrcweir 
54cdf0e10cSrcweir         /** determines whether for the given document type, dynamic control border coloring is enabled
55cdf0e10cSrcweir         */
56cdf0e10cSrcweir         static bool useDynamicBorderColor( DocumentType _eDocType );
57cdf0e10cSrcweir 
58cdf0e10cSrcweir         /** determines whether for the given document type, form controls should use the document's reference device
59cdf0e10cSrcweir             for text rendering
60cdf0e10cSrcweir         */
61cdf0e10cSrcweir         static bool useDocumentReferenceDevice( DocumentType _eDocType );
62cdf0e10cSrcweir 
63cdf0e10cSrcweir         /** gets the "default" style in a document which can be used if some default text format is needed
64cdf0e10cSrcweir 
65cdf0e10cSrcweir             It depends on the type document type which concrete kind of style is returned, but it is expected to support
66cdf0e10cSrcweir             the css.style.CharacterProperties service.
67cdf0e10cSrcweir 
68cdf0e10cSrcweir             @param _rxModel
69cdf0e10cSrcweir                 a form component.
70cdf0e10cSrcweir         */
71cdf0e10cSrcweir         static ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
72cdf0e10cSrcweir                     getDefaultDocumentTextStyle( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel );
73cdf0e10cSrcweir 
74cdf0e10cSrcweir     private:
75cdf0e10cSrcweir         ControlLayouter();    // never implemented
76cdf0e10cSrcweir 
77cdf0e10cSrcweir     private:
78cdf0e10cSrcweir         static ::utl::OConfigurationNode
79cdf0e10cSrcweir             getLayoutSettings(
80cdf0e10cSrcweir                 DocumentType _eDocType
81cdf0e10cSrcweir             );
82cdf0e10cSrcweir     };
83cdf0e10cSrcweir 
84cdf0e10cSrcweir //........................................................................
85cdf0e10cSrcweir } // namespace svxform
86cdf0e10cSrcweir //........................................................................
87cdf0e10cSrcweir 
88cdf0e10cSrcweir #endif // SVX_SOURCE_INC_FMCONTROLLAYOUT_HXX
89cdf0e10cSrcweir 
90