update dev300-m58
[ooovba.git] / svx / source / form / fmtextcontroldialogs.cxx
blob15a843ee88b8ca027f014c90438dfd6348d75e2a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fmtextcontroldialogs.cxx,v $
10 * $Revision: 1.11 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_svx.hxx"
33 #include "fmtextcontroldialogs.hxx"
34 #include <svx/dialmgr.hxx>
35 #ifndef _SVX_DIALOGS_HRC
36 #include <svx/dialogs.hrc>
37 #endif
39 #ifndef _SVX_CHARDLG_HXX
40 //#include "chardlg.hxx"
41 #endif
42 #ifndef _SVX_PARAGRPH_HXX
43 //#include "paragrph.hxx"
44 #endif
45 #include <svx/eeitem.hxx>
46 #ifndef _SVX_TABSTPGE_HXX
47 //#include "tabstpge.hxx"
48 #endif
50 #include "flagsdef.hxx"
51 #include <svtools/intitem.hxx>
53 #include <com/sun/star/uno/Sequence.hxx>
54 #include <svtools/cjkoptions.hxx>
56 //........................................................................
57 namespace svx
59 //........................................................................
61 //====================================================================
62 //= TextControlCharAttribDialog
63 //====================================================================
64 //--------------------------------------------------------------------
65 TextControlCharAttribDialog::TextControlCharAttribDialog( Window* pParent, const SfxItemSet& _rCoreSet, const SvxFontListItem& _rFontList )
66 :SfxTabDialog( pParent, SVX_RES( RID_SVXDLG_TEXTCONTROL_CHARATTR ), &_rCoreSet )
67 ,m_aFontList( _rFontList )
69 FreeResource();
71 AddTabPage( RID_SVXPAGE_CHAR_NAME);
72 AddTabPage( RID_SVXPAGE_CHAR_EFFECTS);
73 AddTabPage( RID_SVXPAGE_CHAR_POSITION);
76 //--------------------------------------------------------------------
77 TextControlCharAttribDialog::~TextControlCharAttribDialog()
81 //--------------------------------------------------------------------
82 void TextControlCharAttribDialog::PageCreated( USHORT _nId, SfxTabPage& _rPage )
84 SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
86 switch( _nId )
88 case RID_SVXPAGE_CHAR_NAME:
89 aSet.Put (m_aFontList);
90 _rPage.PageCreated(aSet);
91 break;
93 case RID_SVXPAGE_CHAR_EFFECTS:
94 aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP));
95 _rPage.PageCreated(aSet);
96 break;
98 case RID_SVXPAGE_CHAR_POSITION:
99 aSet.Put( SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER) );
100 _rPage.PageCreated(aSet);
101 break;
105 //====================================================================
106 //= TextControlParaAttribDialog
107 //====================================================================
108 //--------------------------------------------------------------------
109 TextControlParaAttribDialog::TextControlParaAttribDialog( Window* _pParent, const SfxItemSet& _rCoreSet )
110 :SfxTabDialog( _pParent, SVX_RES( RID_SVXDLG_TEXTCONTROL_PARAATTR ), &_rCoreSet )
112 FreeResource();
114 AddTabPage( RID_SVXPAGE_STD_PARAGRAPH );
115 AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH );
117 SvtCJKOptions aCJKOptions;
118 if( aCJKOptions.IsAsianTypographyEnabled() )
119 AddTabPage( RID_SVXPAGE_PARA_ASIAN );
120 else
121 RemoveTabPage( RID_SVXPAGE_PARA_ASIAN );
123 AddTabPage( RID_SVXPAGE_TABULATOR );
126 //--------------------------------------------------------------------
127 TextControlParaAttribDialog::~TextControlParaAttribDialog()
131 //........................................................................
132 } // namespace svx
133 //........................................................................