1*b3f79822SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*b3f79822SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*b3f79822SAndrew Rist * or more contributor license agreements. See the NOTICE file
5*b3f79822SAndrew Rist * distributed with this work for additional information
6*b3f79822SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*b3f79822SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*b3f79822SAndrew Rist * "License"); you may not use this file except in compliance
9*b3f79822SAndrew Rist * with the License. You may obtain a copy of the License at
10*b3f79822SAndrew Rist *
11*b3f79822SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*b3f79822SAndrew Rist *
13*b3f79822SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*b3f79822SAndrew Rist * software distributed under the License is distributed on an
15*b3f79822SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b3f79822SAndrew Rist * KIND, either express or implied. See the License for the
17*b3f79822SAndrew Rist * specific language governing permissions and limitations
18*b3f79822SAndrew Rist * under the License.
19*b3f79822SAndrew Rist *
20*b3f79822SAndrew Rist *************************************************************/
21*b3f79822SAndrew Rist
22*b3f79822SAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_sc.hxx"
26cdf0e10cSrcweir
27cdf0e10cSrcweir #undef SC_DLLIMPLEMENTATION
28cdf0e10cSrcweir
29cdf0e10cSrcweir // ohne precompiled Headers uebersetzen !!!
30cdf0e10cSrcweir
31cdf0e10cSrcweir
32cdf0e10cSrcweir
33cdf0e10cSrcweir // INCLUDE ---------------------------------------------------------------
34cdf0e10cSrcweir
35cdf0e10cSrcweir #include <svx/svxids.hrc>
36cdf0e10cSrcweir
37cdf0e10cSrcweir //CHINA001 #include <svx/chardlg.hxx>
38cdf0e10cSrcweir #include <editeng/flstitem.hxx>
39cdf0e10cSrcweir //CHINA001 #include <svx/paragrph.hxx>
40cdf0e10cSrcweir //CHINA001 #include <svx/tabstpge.hxx>
41cdf0e10cSrcweir #include <sfx2/objsh.hxx>
42cdf0e10cSrcweir #include <svl/cjkoptions.hxx>
43cdf0e10cSrcweir
44cdf0e10cSrcweir #include "textdlgs.hxx"
45cdf0e10cSrcweir #include "scresid.hxx"
46cdf0e10cSrcweir #include "sc.hrc"
47cdf0e10cSrcweir #include <svx/svxids.hrc> //add CHINA001
48cdf0e10cSrcweir #include <svl/intitem.hxx> //add CHINA001
49cdf0e10cSrcweir #include <svx/flagsdef.hxx> //CHINA001
50cdf0e10cSrcweir // -----------------------------------------------------------------------
51cdf0e10cSrcweir
ScCharDlg(Window * pParent,const SfxItemSet * pAttr,const SfxObjectShell * pDocShell)52cdf0e10cSrcweir ScCharDlg::ScCharDlg( Window* pParent, const SfxItemSet* pAttr,
53cdf0e10cSrcweir const SfxObjectShell* pDocShell ) :
54cdf0e10cSrcweir SfxTabDialog ( pParent, ScResId( RID_SCDLG_CHAR ), pAttr ),
55cdf0e10cSrcweir rOutAttrs ( *pAttr ),
56cdf0e10cSrcweir rDocShell ( *pDocShell )
57cdf0e10cSrcweir {
58cdf0e10cSrcweir FreeResource();
59cdf0e10cSrcweir
60cdf0e10cSrcweir AddTabPage( RID_SVXPAGE_CHAR_NAME ); //CHINA001 AddTabPage( RID_SVXPAGE_CHAR_NAME, SvxCharNamePage::Create, 0);
61cdf0e10cSrcweir AddTabPage( RID_SVXPAGE_CHAR_EFFECTS ); //CHINA001 AddTabPage( RID_SVXPAGE_CHAR_EFFECTS, SvxCharEffectsPage::Create, 0);
62cdf0e10cSrcweir AddTabPage( RID_SVXPAGE_CHAR_POSITION ); //CHINA001 AddTabPage( RID_SVXPAGE_CHAR_POSITION, SvxCharPositionPage::Create, 0);
63cdf0e10cSrcweir }
64cdf0e10cSrcweir
65cdf0e10cSrcweir // -----------------------------------------------------------------------
66cdf0e10cSrcweir
PageCreated(sal_uInt16 nId,SfxTabPage & rPage)67cdf0e10cSrcweir void __EXPORT ScCharDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
68cdf0e10cSrcweir {
69cdf0e10cSrcweir SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); //CHINA001
70cdf0e10cSrcweir switch( nId )
71cdf0e10cSrcweir {
72cdf0e10cSrcweir case RID_SVXPAGE_CHAR_NAME:
73cdf0e10cSrcweir {
74cdf0e10cSrcweir SvxFontListItem aItem(*( (const SvxFontListItem*)
75cdf0e10cSrcweir ( rDocShell.GetItem( SID_ATTR_CHAR_FONTLIST) ) ) );
76cdf0e10cSrcweir
77cdf0e10cSrcweir //CHINA001 ( (SvxCharNamePage&) rPage ).SetFontList( aItem );
78cdf0e10cSrcweir aSet.Put (SvxFontListItem( aItem.GetFontList(), SID_ATTR_CHAR_FONTLIST));
79cdf0e10cSrcweir rPage.PageCreated(aSet);
80cdf0e10cSrcweir }
81cdf0e10cSrcweir break;
82cdf0e10cSrcweir
83cdf0e10cSrcweir case RID_SVXPAGE_CHAR_EFFECTS:
84cdf0e10cSrcweir //CHINA001 ( (SvxCharEffectsPage&) rPage ).DisableControls(
85cdf0e10cSrcweir //CHINA001 DISABLE_CASEMAP);
86cdf0e10cSrcweir aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP)); //CHINA001
87cdf0e10cSrcweir rPage.PageCreated(aSet);
88cdf0e10cSrcweir break;
89cdf0e10cSrcweir
90cdf0e10cSrcweir default:
91cdf0e10cSrcweir break;
92cdf0e10cSrcweir }
93cdf0e10cSrcweir }
94cdf0e10cSrcweir
95cdf0e10cSrcweir // -----------------------------------------------------------------------
96cdf0e10cSrcweir
ScParagraphDlg(Window * pParent,const SfxItemSet * pAttr)97cdf0e10cSrcweir ScParagraphDlg::ScParagraphDlg( Window* pParent, const SfxItemSet* pAttr ) :
98cdf0e10cSrcweir SfxTabDialog ( pParent, ScResId( RID_SCDLG_PARAGRAPH ), pAttr ),
99cdf0e10cSrcweir rOutAttrs ( *pAttr )
100cdf0e10cSrcweir {
101cdf0e10cSrcweir FreeResource();
102cdf0e10cSrcweir
103cdf0e10cSrcweir SvtCJKOptions aCJKOptions;
104cdf0e10cSrcweir
105cdf0e10cSrcweir AddTabPage( RID_SVXPAGE_STD_PARAGRAPH );//CHINA001 AddTabPage( RID_SVXPAGE_STD_PARAGRAPH, SvxStdParagraphTabPage::Create, 0);
106cdf0e10cSrcweir AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH );//CHINA001 AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH, SvxParaAlignTabPage::Create, 0);
107cdf0e10cSrcweir //AddTabPage( RID_SVXPAGE_EXT_PARAGRAPH, SvxExtParagraphTabPage::Create, 0);
108cdf0e10cSrcweir if ( aCJKOptions.IsAsianTypographyEnabled() )
109cdf0e10cSrcweir AddTabPage( RID_SVXPAGE_PARA_ASIAN);//CHINA001 AddTabPage( RID_SVXPAGE_PARA_ASIAN, SvxAsianTabPage::Create,0);
110cdf0e10cSrcweir else
111cdf0e10cSrcweir RemoveTabPage( RID_SVXPAGE_PARA_ASIAN );
112cdf0e10cSrcweir AddTabPage( RID_SVXPAGE_TABULATOR );//CHINA001 AddTabPage( RID_SVXPAGE_TABULATOR, SvxTabulatorTabPage::Create, 0);
113cdf0e10cSrcweir }
114cdf0e10cSrcweir
115cdf0e10cSrcweir // -----------------------------------------------------------------------
116cdf0e10cSrcweir
PageCreated(sal_uInt16 nId,SfxTabPage & rPage)117cdf0e10cSrcweir void __EXPORT ScParagraphDlg::PageCreated( sal_uInt16 nId, SfxTabPage &rPage )
118cdf0e10cSrcweir {
119cdf0e10cSrcweir switch( nId )
120cdf0e10cSrcweir {
121cdf0e10cSrcweir case RID_SVXPAGE_TABULATOR:
122cdf0e10cSrcweir {
123cdf0e10cSrcweir //CHINA001 ( (SvxTabulatorTabPage&) rPage ).
124cdf0e10cSrcweir //CHINA001 DisableControls( TABTYPE_ALL &~TABTYPE_LEFT |
125cdf0e10cSrcweir //CHINA001 TABFILL_ALL &~TABFILL_NONE );
126cdf0e10cSrcweir SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));//add CHINA001
127cdf0e10cSrcweir aSet.Put(SfxUInt16Item(SID_SVXTABULATORTABPAGE_CONTROLFLAGS,(TABTYPE_ALL &~TABTYPE_LEFT) |
128cdf0e10cSrcweir (TABFILL_ALL &~TABFILL_NONE) ));
129cdf0e10cSrcweir rPage.PageCreated(aSet);//add CHINA001
130cdf0e10cSrcweir }
131cdf0e10cSrcweir break;
132cdf0e10cSrcweir }
133cdf0e10cSrcweir }
134cdf0e10cSrcweir
135cdf0e10cSrcweir
136cdf0e10cSrcweir
137