1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fmtextcontroldialogs.cxx,v $
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>
39 #ifndef _SVX_CHARDLG_HXX
40 //#include "chardlg.hxx"
42 #ifndef _SVX_PARAGRPH_HXX
43 //#include "paragrph.hxx"
45 #include <svx/eeitem.hxx>
46 #ifndef _SVX_TABSTPGE_HXX
47 //#include "tabstpge.hxx"
50 #include "flagsdef.hxx"
51 #include <svtools/intitem.hxx>
53 #include <com/sun/star/uno/Sequence.hxx>
54 #include <svtools/cjkoptions.hxx>
56 //........................................................................
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
)
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()));
88 case RID_SVXPAGE_CHAR_NAME
:
89 aSet
.Put (m_aFontList
);
90 _rPage
.PageCreated(aSet
);
93 case RID_SVXPAGE_CHAR_EFFECTS
:
94 aSet
.Put (SfxUInt16Item(SID_DISABLE_CTL
,DISABLE_CASEMAP
));
95 _rPage
.PageCreated(aSet
);
98 case RID_SVXPAGE_CHAR_POSITION
:
99 aSet
.Put( SfxUInt32Item(SID_FLAG_TYPE
, SVX_PREVIEW_CHARACTER
) );
100 _rPage
.PageCreated(aSet
);
105 //====================================================================
106 //= TextControlParaAttribDialog
107 //====================================================================
108 //--------------------------------------------------------------------
109 TextControlParaAttribDialog::TextControlParaAttribDialog( Window
* _pParent
, const SfxItemSet
& _rCoreSet
)
110 :SfxTabDialog( _pParent
, SVX_RES( RID_SVXDLG_TEXTCONTROL_PARAATTR
), &_rCoreSet
)
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
);
121 RemoveTabPage( RID_SVXPAGE_PARA_ASIAN
);
123 AddTabPage( RID_SVXPAGE_TABULATOR
);
126 //--------------------------------------------------------------------
127 TextControlParaAttribDialog::~TextControlParaAttribDialog()
131 //........................................................................
133 //........................................................................