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_sd.hxx"
26
27 #ifdef SD_DLLIMPLEMENTATION
28 #undef SD_DLLIMPLEMENTATION
29 #endif
30
31
32 #include <svx/dialogs.hrc>
33 #include <editeng/flstitem.hxx>
34 #include <svx/flagsdef.hxx>
35 #include <sfx2/objsh.hxx>
36
37 #include "sdresid.hxx"
38 #include "dlg_char.hxx"
39 #include <svx/svxids.hrc>
40 #include <svl/intitem.hxx>
41
42 /*************************************************************************
43 |*
44 |* Konstruktor des Tab-Dialogs: Fuegt die Seiten zum Dialog hinzu
45 |*
46 \************************************************************************/
47
SdCharDlg(Window * pParent,const SfxItemSet * pAttr,const SfxObjectShell * pDocShell)48 SdCharDlg::SdCharDlg( Window* pParent, const SfxItemSet* pAttr,
49 const SfxObjectShell* pDocShell ) :
50 SfxTabDialog ( pParent, SdResId( TAB_CHAR ), pAttr ),
51 rOutAttrs ( *pAttr ),
52 rDocShell ( *pDocShell )
53 {
54 FreeResource();
55
56 AddTabPage( RID_SVXPAGE_CHAR_NAME );
57 AddTabPage( RID_SVXPAGE_CHAR_EFFECTS );
58 AddTabPage( RID_SVXPAGE_CHAR_POSITION );
59 }
60
61 // -----------------------------------------------------------------------
62
PageCreated(sal_uInt16 nId,SfxTabPage & rPage)63 void SdCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
64 {
65 SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
66 switch( nId )
67 {
68 case RID_SVXPAGE_CHAR_NAME:
69 {
70 SvxFontListItem aItem(*( (const SvxFontListItem*)
71 ( rDocShell.GetItem( SID_ATTR_CHAR_FONTLIST) ) ) );
72
73 aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
74 rPage.PageCreated(aSet);
75 }
76 break;
77
78 case RID_SVXPAGE_CHAR_EFFECTS:
79 aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP));
80 rPage.PageCreated(aSet);
81 break;
82
83 default:
84 break;
85 }
86 }
87
88
89
90