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 _EXTENSIONS_PROPCTRLR_FONTDIALOG_HXX_
25 #define _EXTENSIONS_PROPCTRLR_FONTDIALOG_HXX_
26 
27 #include <sfx2/tabdlg.hxx>
28 #include <com/sun/star/beans/XPropertySet.hpp>
29 #include <com/sun/star/beans/NamedValue.hpp>
30 
31 class SvxFontListItem;
32 class FontList;
33 
34 //............................................................................
35 namespace pcr
36 {
37 //............................................................................
38 
39 	//========================================================================
40 	//= ControlCharacterDialog
41 	//========================================================================
42 	class ControlCharacterDialog : public SfxTabDialog
43 	{
44 	public:
45 		ControlCharacterDialog(Window* _pParent, const SfxItemSet& _rCoreSet);
46 		~ControlCharacterDialog();
47 
48 		/// creates an item set to be used with this dialog
49 		static SfxItemSet*	createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults);
50 
51 		/// destroys an item previously created with <method>createItemSet</method>
52 		static void			destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults);
53 
54 		/// fills the given item set with values obtained from the given property set
55 		static void			translatePropertiesToItems(
56 			const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel,
57 			SfxItemSet* _pSet);
58 
59 		/** fills the given property set with values obtained from the given item set
60 		*/
61 		static void translateItemsToProperties(
62 			const SfxItemSet& _rSet,
63 			const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel);
64 
65 		/** fills the given property set with values obtained from the given item set
66 		*/
67         static void translateItemsToProperties(
68 			const SfxItemSet& _rSet,
69 			::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& _out_properties );
70 
71 	protected:
72 		virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage);
73 	};
74 //............................................................................
75 }	// namespace pcr
76 //............................................................................
77 
78 #endif // _EXTENSIONS_PROPCTRLR_FONTDIALOG_HXX_
79 
80