1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _EXTENSIONS_PROPCTRLR_FONTDIALOG_HXX_
29 #define _EXTENSIONS_PROPCTRLR_FONTDIALOG_HXX_
30 
31 #include <sfx2/tabdlg.hxx>
32 #include <com/sun/star/beans/XPropertySet.hpp>
33 #include <com/sun/star/beans/NamedValue.hpp>
34 
35 class SvxFontListItem;
36 class FontList;
37 
38 //............................................................................
39 namespace pcr
40 {
41 //............................................................................
42 
43 	//========================================================================
44 	//= ControlCharacterDialog
45 	//========================================================================
46 	class ControlCharacterDialog : public SfxTabDialog
47 	{
48 	public:
49 		ControlCharacterDialog(Window* _pParent, const SfxItemSet& _rCoreSet);
50 		~ControlCharacterDialog();
51 
52 		/// creates an item set to be used with this dialog
53 		static SfxItemSet*	createItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults);
54 
55 		/// destroys an item previously created with <method>createItemSet</method>
56 		static void			destroyItemSet(SfxItemSet*& _rpSet, SfxItemPool*& _rpPool, SfxPoolItem**& _rppDefaults);
57 
58 		/// fills the given item set with values obtained from the given property set
59 		static void			translatePropertiesToItems(
60 			const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel,
61 			SfxItemSet* _pSet);
62 
63 		/** fills the given property set with values obtained from the given item set
64 		*/
65 		static void translateItemsToProperties(
66 			const SfxItemSet& _rSet,
67 			const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxModel);
68 
69 		/** fills the given property set with values obtained from the given item set
70 		*/
71         static void translateItemsToProperties(
72 			const SfxItemSet& _rSet,
73 			::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& _out_properties );
74 
75 	protected:
76 		virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage);
77 	};
78 //............................................................................
79 }	// namespace pcr
80 //............................................................................
81 
82 #endif // _EXTENSIONS_PROPCTRLR_FONTDIALOG_HXX_
83 
84