1*f6e50924SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*f6e50924SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*f6e50924SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*f6e50924SAndrew Rist  * distributed with this work for additional information
6*f6e50924SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*f6e50924SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*f6e50924SAndrew Rist  * "License"); you may not use this file except in compliance
9*f6e50924SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*f6e50924SAndrew Rist  *
11*f6e50924SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*f6e50924SAndrew Rist  *
13*f6e50924SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*f6e50924SAndrew Rist  * software distributed under the License is distributed on an
15*f6e50924SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*f6e50924SAndrew Rist  * KIND, either express or implied.  See the License for the
17*f6e50924SAndrew Rist  * specific language governing permissions and limitations
18*f6e50924SAndrew Rist  * under the License.
19*f6e50924SAndrew Rist  *
20*f6e50924SAndrew Rist  *************************************************************/
21*f6e50924SAndrew Rist 
22*f6e50924SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_svx.hxx"
26cdf0e10cSrcweir #include "fmtextcontroldialogs.hxx"
27cdf0e10cSrcweir #include <svx/dialmgr.hxx>
28cdf0e10cSrcweir #ifndef _SVX_DIALOGS_HRC
29cdf0e10cSrcweir #include <svx/dialogs.hrc>
30cdf0e10cSrcweir #endif
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #ifndef _SVX_CHARDLG_HXX
33cdf0e10cSrcweir //#include "chardlg.hxx"
34cdf0e10cSrcweir #endif
35cdf0e10cSrcweir #ifndef _SVX_PARAGRPH_HXX
36cdf0e10cSrcweir //#include "paragrph.hxx"
37cdf0e10cSrcweir #endif
38cdf0e10cSrcweir #include <editeng/eeitem.hxx>
39cdf0e10cSrcweir #ifndef _SVX_TABSTPGE_HXX
40cdf0e10cSrcweir //#include "tabstpge.hxx"
41cdf0e10cSrcweir #endif
42cdf0e10cSrcweir 
43cdf0e10cSrcweir #include "svx/flagsdef.hxx"
44cdf0e10cSrcweir #include <svl/intitem.hxx>
45cdf0e10cSrcweir 
46cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx>
47cdf0e10cSrcweir #include <svl/cjkoptions.hxx>
48cdf0e10cSrcweir 
49cdf0e10cSrcweir //........................................................................
50cdf0e10cSrcweir namespace svx
51cdf0e10cSrcweir {
52cdf0e10cSrcweir //........................................................................
53cdf0e10cSrcweir 
54cdf0e10cSrcweir 	//====================================================================
55cdf0e10cSrcweir 	//= TextControlCharAttribDialog
56cdf0e10cSrcweir 	//====================================================================
57cdf0e10cSrcweir 	//--------------------------------------------------------------------
TextControlCharAttribDialog(Window * pParent,const SfxItemSet & _rCoreSet,const SvxFontListItem & _rFontList)58cdf0e10cSrcweir     TextControlCharAttribDialog::TextControlCharAttribDialog( Window* pParent, const SfxItemSet& _rCoreSet, const SvxFontListItem& _rFontList )
59cdf0e10cSrcweir         :SfxTabDialog( pParent, SVX_RES( RID_SVXDLG_TEXTCONTROL_CHARATTR ), &_rCoreSet )
60cdf0e10cSrcweir         ,m_aFontList( _rFontList )
61cdf0e10cSrcweir     {
62cdf0e10cSrcweir         FreeResource();
63cdf0e10cSrcweir 
64cdf0e10cSrcweir 	    AddTabPage( RID_SVXPAGE_CHAR_NAME);
65cdf0e10cSrcweir 	    AddTabPage( RID_SVXPAGE_CHAR_EFFECTS);
66cdf0e10cSrcweir 	    AddTabPage( RID_SVXPAGE_CHAR_POSITION);
67cdf0e10cSrcweir     }
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 	//--------------------------------------------------------------------
~TextControlCharAttribDialog()70cdf0e10cSrcweir     TextControlCharAttribDialog::~TextControlCharAttribDialog()
71cdf0e10cSrcweir     {
72cdf0e10cSrcweir     }
73cdf0e10cSrcweir 
74cdf0e10cSrcweir 	//--------------------------------------------------------------------
PageCreated(sal_uInt16 _nId,SfxTabPage & _rPage)75cdf0e10cSrcweir     void TextControlCharAttribDialog::PageCreated( sal_uInt16 _nId, SfxTabPage& _rPage )
76cdf0e10cSrcweir     {
77cdf0e10cSrcweir 	    SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
78cdf0e10cSrcweir 
79cdf0e10cSrcweir 	    switch( _nId )
80cdf0e10cSrcweir 	    {
81cdf0e10cSrcweir             case RID_SVXPAGE_CHAR_NAME:
82cdf0e10cSrcweir 			    aSet.Put (m_aFontList);
83cdf0e10cSrcweir 			    _rPage.PageCreated(aSet);
84cdf0e10cSrcweir 		        break;
85cdf0e10cSrcweir 
86cdf0e10cSrcweir 		    case RID_SVXPAGE_CHAR_EFFECTS:
87cdf0e10cSrcweir 			    aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP));
88cdf0e10cSrcweir 			    _rPage.PageCreated(aSet);
89cdf0e10cSrcweir 			    break;
90cdf0e10cSrcweir 
91cdf0e10cSrcweir             case RID_SVXPAGE_CHAR_POSITION:
92cdf0e10cSrcweir                 aSet.Put( SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER) );
93cdf0e10cSrcweir                 _rPage.PageCreated(aSet);
94cdf0e10cSrcweir                 break;
95cdf0e10cSrcweir         }
96cdf0e10cSrcweir     }
97cdf0e10cSrcweir 
98cdf0e10cSrcweir 	//====================================================================
99cdf0e10cSrcweir 	//= TextControlParaAttribDialog
100cdf0e10cSrcweir 	//====================================================================
101cdf0e10cSrcweir 	//--------------------------------------------------------------------
TextControlParaAttribDialog(Window * _pParent,const SfxItemSet & _rCoreSet)102cdf0e10cSrcweir     TextControlParaAttribDialog::TextControlParaAttribDialog( Window* _pParent, const SfxItemSet& _rCoreSet )
103cdf0e10cSrcweir         :SfxTabDialog( _pParent, SVX_RES( RID_SVXDLG_TEXTCONTROL_PARAATTR ), &_rCoreSet )
104cdf0e10cSrcweir     {
105cdf0e10cSrcweir         FreeResource();
106cdf0e10cSrcweir 
107cdf0e10cSrcweir         AddTabPage( RID_SVXPAGE_STD_PARAGRAPH );
108cdf0e10cSrcweir         AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH );
109cdf0e10cSrcweir 
110cdf0e10cSrcweir         SvtCJKOptions aCJKOptions;
111cdf0e10cSrcweir         if( aCJKOptions.IsAsianTypographyEnabled() )
112cdf0e10cSrcweir             AddTabPage( RID_SVXPAGE_PARA_ASIAN );
113cdf0e10cSrcweir         else
114cdf0e10cSrcweir             RemoveTabPage( RID_SVXPAGE_PARA_ASIAN );
115cdf0e10cSrcweir 
116cdf0e10cSrcweir         AddTabPage( RID_SVXPAGE_TABULATOR );
117cdf0e10cSrcweir     }
118cdf0e10cSrcweir 
119cdf0e10cSrcweir 	//--------------------------------------------------------------------
~TextControlParaAttribDialog()120cdf0e10cSrcweir     TextControlParaAttribDialog::~TextControlParaAttribDialog()
121cdf0e10cSrcweir     {
122cdf0e10cSrcweir     }
123cdf0e10cSrcweir 
124cdf0e10cSrcweir //........................................................................
125cdf0e10cSrcweir }   // namespace svx
126cdf0e10cSrcweir //........................................................................
127cdf0e10cSrcweir 
128