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 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_chart2.hxx"
26
27 #include "dlg_ShapeFont.hxx"
28 #include "ViewElementListProvider.hxx"
29 #include "ResId.hxx"
30 #include "ResourceIds.hrc"
31
32 #include <svl/intitem.hxx>
33 #include <sfx2/objsh.hxx>
34 #include <svx/dialogs.hrc>
35 #include <svx/flagsdef.hxx>
36 #include <editeng/flstitem.hxx>
37
38 using ::com::sun::star::uno::Reference;
39 using namespace ::com::sun::star;
40
41 //.............................................................................
42 namespace chart
43 {
44 //.............................................................................
45
ShapeFontDialog(Window * pParent,const SfxItemSet * pAttr,const ViewElementListProvider * pViewElementListProvider)46 ShapeFontDialog::ShapeFontDialog( Window* pParent, const SfxItemSet* pAttr,
47 const ViewElementListProvider* pViewElementListProvider )
48 :SfxTabDialog( pParent, SchResId( DLG_SHAPE_FONT ), pAttr )
49 ,m_pViewElementListProvider( pViewElementListProvider )
50 {
51 FreeResource();
52
53 AddTabPage( RID_SVXPAGE_CHAR_NAME );
54 AddTabPage( RID_SVXPAGE_CHAR_EFFECTS );
55 AddTabPage( RID_SVXPAGE_CHAR_POSITION );
56 }
57
~ShapeFontDialog()58 ShapeFontDialog::~ShapeFontDialog()
59 {
60 }
61
PageCreated(sal_uInt16 nId,SfxTabPage & rPage)62 void ShapeFontDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage )
63 {
64 SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) );
65 switch ( nId )
66 {
67 case RID_SVXPAGE_CHAR_NAME:
68 {
69 aSet.Put( SvxFontListItem( m_pViewElementListProvider->getFontList(), SID_ATTR_CHAR_FONTLIST ) );
70 rPage.PageCreated( aSet );
71 }
72 break;
73 case RID_SVXPAGE_CHAR_EFFECTS:
74 {
75 aSet.Put( SfxUInt16Item( SID_DISABLE_CTL, DISABLE_CASEMAP ) );
76 rPage.PageCreated( aSet );
77 }
78 break;
79 default:
80 {
81 }
82 break;
83 }
84 }
85
86 //.............................................................................
87 } //namespace chart
88 //.............................................................................
89