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_scui.hxx"
26
27
28 // ohne precompiled Headers uebersetzen !!!
29
30
31
32 // INCLUDE ---------------------------------------------------------------
33
34 #include <svx/svxids.hrc>
35
36 //CHINA001 #include <svx/chardlg.hxx>
37 #include <editeng/flstitem.hxx>
38 //CHINA001 #include <svx/paragrph.hxx>
39 //CHINA001 #include <svx/tabstpge.hxx>
40 #include <sfx2/objsh.hxx>
41 #include <svl/cjkoptions.hxx>
42
43 #include "textdlgs.hxx"
44 #include "scresid.hxx"
45 #include "sc.hrc"
46 #include <svx/svxids.hrc> //add CHINA001
47 #include <svl/intitem.hxx> //add CHINA001
48 #include <svx/flagsdef.hxx> //CHINA001
49 // -----------------------------------------------------------------------
50
ScCharDlg(Window * pParent,const SfxItemSet * pAttr,const SfxObjectShell * pDocShell)51 ScCharDlg::ScCharDlg( Window* pParent, const SfxItemSet* pAttr,
52 const SfxObjectShell* pDocShell ) :
53 SfxTabDialog ( pParent, ScResId( RID_SCDLG_CHAR ), pAttr ),
54 rOutAttrs ( *pAttr ),
55 rDocShell ( *pDocShell )
56 {
57 FreeResource();
58
59 AddTabPage( RID_SVXPAGE_CHAR_NAME ); //CHINA001 AddTabPage( RID_SVXPAGE_CHAR_NAME, SvxCharNamePage::Create, 0);
60 AddTabPage( RID_SVXPAGE_CHAR_EFFECTS ); //CHINA001 AddTabPage( RID_SVXPAGE_CHAR_EFFECTS, SvxCharEffectsPage::Create, 0);
61 AddTabPage( RID_SVXPAGE_CHAR_POSITION ); //CHINA001 AddTabPage( RID_SVXPAGE_CHAR_POSITION, SvxCharPositionPage::Create, 0);
62 }
63
64 // -----------------------------------------------------------------------
65
PageCreated(sal_uInt16 nId,SfxTabPage & rPage)66 void __EXPORT ScCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
67 {
68 SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); //CHINA001
69 switch( nId )
70 {
71 case RID_SVXPAGE_CHAR_NAME:
72 {
73 SvxFontListItem aItem(*( (const SvxFontListItem*)
74 ( rDocShell.GetItem( SID_ATTR_CHAR_FONTLIST) ) ) );
75
76 //CHINA001 ( (SvxCharNamePage&) rPage ).SetFontList( aItem );
77 aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
78 rPage.PageCreated(aSet);
79 }
80 break;
81
82 case RID_SVXPAGE_CHAR_EFFECTS:
83 //CHINA001 ( (SvxCharEffectsPage&) rPage ).DisableControls(
84 //CHINA001 DISABLE_CASEMAP);
85 aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP)); //CHINA001
86 rPage.PageCreated(aSet);
87 break;
88
89 default:
90 break;
91 }
92 }
93
94 // -----------------------------------------------------------------------
95
ScParagraphDlg(Window * pParent,const SfxItemSet * pAttr)96 ScParagraphDlg::ScParagraphDlg( Window* pParent, const SfxItemSet* pAttr ) :
97 SfxTabDialog ( pParent, ScResId( RID_SCDLG_PARAGRAPH ), pAttr ),
98 rOutAttrs ( *pAttr )
99 {
100 FreeResource();
101
102 SvtCJKOptions aCJKOptions;
103
104 AddTabPage( RID_SVXPAGE_STD_PARAGRAPH );//CHINA001 AddTabPage( RID_SVXPAGE_STD_PARAGRAPH, SvxStdParagraphTabPage::Create, 0);
105 AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH );//CHINA001 AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH, SvxParaAlignTabPage::Create, 0);
106 //AddTabPage( RID_SVXPAGE_EXT_PARAGRAPH, SvxExtParagraphTabPage::Create, 0);
107 if ( aCJKOptions.IsAsianTypographyEnabled() )
108 AddTabPage( RID_SVXPAGE_PARA_ASIAN);//CHINA001 AddTabPage( RID_SVXPAGE_PARA_ASIAN, SvxAsianTabPage::Create,0);
109 else
110 RemoveTabPage( RID_SVXPAGE_PARA_ASIAN );
111 AddTabPage( RID_SVXPAGE_TABULATOR );//CHINA001 AddTabPage( RID_SVXPAGE_TABULATOR, SvxTabulatorTabPage::Create, 0);
112 }
113
114 // -----------------------------------------------------------------------
115
PageCreated(sal_uInt16 nId,SfxTabPage & rPage)116 void __EXPORT ScParagraphDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
117 {
118 switch( nId )
119 {
120 case RID_SVXPAGE_TABULATOR:
121 {
122 //CHINA001 ( (SvxTabulatorTabPage&) rPage ).
123 //CHINA001 DisableControls( TABTYPE_ALL &~TABTYPE_LEFT |
124 //CHINA001 TABFILL_ALL &~TABFILL_NONE );
125 SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));//add CHINA001
126 aSet.Put(SfxUInt16Item(SID_SVXTABULATORTABPAGE_CONTROLFLAGS,(TABTYPE_ALL &~TABTYPE_LEFT) |
127 (TABFILL_ALL &~TABFILL_NONE) ));
128 rPage.PageCreated(aSet);//add CHINA001
129 }
130 break;
131 }
132 }
133
134
135
136