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