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