1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "fmtextcontroldialogs.hxx"
21 #include <svx/dialmgr.hxx>
22 #include <svx/dialogs.hrc>
24 #include <editeng/eeitem.hxx>
26 #include "svx/flagsdef.hxx"
27 #include <svl/intitem.hxx>
29 #include <com/sun/star/uno/Sequence.hxx>
30 #include <svl/cjkoptions.hxx>
32 //........................................................................
35 //........................................................................
37 //====================================================================
38 //= TextControlCharAttribDialog
39 //====================================================================
40 //--------------------------------------------------------------------
41 TextControlCharAttribDialog::TextControlCharAttribDialog( Window
* pParent
, const SfxItemSet
& _rCoreSet
, const SvxFontListItem
& _rFontList
)
42 :SfxTabDialog( pParent
, SVX_RES( RID_SVXDLG_TEXTCONTROL_CHARATTR
), &_rCoreSet
)
43 ,m_aFontList( _rFontList
)
47 AddTabPage( RID_SVXPAGE_CHAR_NAME
);
48 AddTabPage( RID_SVXPAGE_CHAR_EFFECTS
);
49 AddTabPage( RID_SVXPAGE_CHAR_POSITION
);
52 //--------------------------------------------------------------------
53 TextControlCharAttribDialog::~TextControlCharAttribDialog()
57 //--------------------------------------------------------------------
58 void TextControlCharAttribDialog::PageCreated( sal_uInt16 _nId
, SfxTabPage
& _rPage
)
60 SfxAllItemSet
aSet(*(GetInputSetImpl()->GetPool()));
64 case RID_SVXPAGE_CHAR_NAME
:
65 aSet
.Put (m_aFontList
);
66 _rPage
.PageCreated(aSet
);
69 case RID_SVXPAGE_CHAR_EFFECTS
:
70 aSet
.Put (SfxUInt16Item(SID_DISABLE_CTL
,DISABLE_CASEMAP
));
71 _rPage
.PageCreated(aSet
);
74 case RID_SVXPAGE_CHAR_POSITION
:
75 aSet
.Put( SfxUInt32Item(SID_FLAG_TYPE
, SVX_PREVIEW_CHARACTER
) );
76 _rPage
.PageCreated(aSet
);
81 //====================================================================
82 //= TextControlParaAttribDialog
83 //====================================================================
84 //--------------------------------------------------------------------
85 TextControlParaAttribDialog::TextControlParaAttribDialog( Window
* _pParent
, const SfxItemSet
& _rCoreSet
)
86 :SfxTabDialog( _pParent
, SVX_RES( RID_SVXDLG_TEXTCONTROL_PARAATTR
), &_rCoreSet
)
90 AddTabPage( RID_SVXPAGE_STD_PARAGRAPH
);
91 AddTabPage( RID_SVXPAGE_ALIGN_PARAGRAPH
);
93 SvtCJKOptions aCJKOptions
;
94 if( aCJKOptions
.IsAsianTypographyEnabled() )
95 AddTabPage( RID_SVXPAGE_PARA_ASIAN
);
97 RemoveTabPage( RID_SVXPAGE_PARA_ASIAN
);
99 AddTabPage( RID_SVXPAGE_TABULATOR
);
102 //--------------------------------------------------------------------
103 TextControlParaAttribDialog::~TextControlParaAttribDialog()
107 //........................................................................
109 //........................................................................
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */