xref: /trunk/main/extensions/source/propctrlr/controlfontdialog.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
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_CONTROLFONTDIALOG_HXX_
29 #define _EXTENSIONS_PROPCTRLR_CONTROLFONTDIALOG_HXX_
30 
31 #include <svtools/genericunodialog.hxx>
32 #include "modulepcr.hxx"
33 
34 class SfxItemSet;
35 class SfxItemPool;
36 class SfxPoolItem;
37 //........................................................................
38 namespace pcr
39 {
40 //........................................................................
41 
42     //====================================================================
43     //= OControlFontDialog
44     //====================================================================
45     class OControlFontDialog;
46     typedef ::svt::OGenericUnoDialog                                        OControlFontDialog_DBase;
47     typedef ::comphelper::OPropertyArrayUsageHelper< OControlFontDialog >   OControlFontDialog_PBase;
48 
49     class OControlFontDialog
50                 :public OControlFontDialog_DBase
51                 ,public OControlFontDialog_PBase
52                 ,public PcrClient
53     {
54     protected:
55         // <properties>
56         ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
57                 m_xControlModel;
58         // </properties>
59 
60         SfxItemSet*             m_pFontItems;           // item set for the dialog
61         SfxItemPool*            m_pItemPool;            // item pool for the item set for the dialog
62         SfxPoolItem**           m_pItemPoolDefaults;    // pool defaults
63 
64     public:
65         OControlFontDialog(const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& _rxContext);
66         ~OControlFontDialog();
67 
68         // XTypeProvider
69         virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
70 
71         // XServiceInfo
72         virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
73         virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
74 
75         // XServiceInfo - static methods
76         static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static(void) throw( ::com::sun::star::uno::RuntimeException );
77         static ::rtl::OUString getImplementationName_static(void) throw( ::com::sun::star::uno::RuntimeException );
78         static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
79                 SAL_CALL Create(const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >&);
80 
81         // XPropertySet
82         virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo>  SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
83         virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
84 
85         // OPropertyArrayUsageHelper
86         virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
87 
88     protected:
89     // OGenericUnoDialog overridables
90         virtual Dialog* createDialog(Window* _pParent);
91         virtual void    destroyDialog();
92         virtual void    executedDialog(sal_Int16 _nExecutionResult);
93     };
94 
95 //........................................................................
96 }   // namespace pcr
97 //........................................................................
98 
99 #endif // _EXTENSIONS_PROPCTRLR_CONTROLFONTDIALOG_HXX_
100 
101