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>
36 TextControlCharAttribDialog::TextControlCharAttribDialog( vcl::Window
* pParent
, const SfxItemSet
& _rCoreSet
, const SvxFontListItem
& _rFontList
)
37 : SfxTabDialog( pParent
, "TextControlCharacterPropertiesDialog",
38 "svx/ui/textcontrolchardialog.ui", &_rCoreSet
)
39 , m_aFontList(_rFontList
)
40 , m_nCharNamePageId(0)
41 , m_nCharEffectsPageId(0)
42 , m_nCharPositionPageId(0)
44 m_nCharNamePageId
= AddTabPage("font", RID_SVXPAGE_CHAR_NAME
);
45 m_nCharEffectsPageId
= AddTabPage("fonteffects", RID_SVXPAGE_CHAR_EFFECTS
);
46 m_nCharPositionPageId
= AddTabPage("position", RID_SVXPAGE_CHAR_POSITION
);
49 void TextControlCharAttribDialog::PageCreated( sal_uInt16 _nId
, SfxTabPage
& _rPage
)
51 SfxAllItemSet
aSet(*(GetInputSetImpl()->GetPool()));
53 if (_nId
== m_nCharNamePageId
)
55 aSet
.Put (m_aFontList
);
56 _rPage
.PageCreated(aSet
);
58 else if (_nId
== m_nCharEffectsPageId
)
60 aSet
.Put (SfxUInt16Item(SID_DISABLE_CTL
,DISABLE_CASEMAP
));
61 _rPage
.PageCreated(aSet
);
63 else if (_nId
== m_nCharPositionPageId
)
65 aSet
.Put( SfxUInt32Item(SID_FLAG_TYPE
, SVX_PREVIEW_CHARACTER
) );
66 _rPage
.PageCreated(aSet
);
70 TextControlParaAttribDialog::TextControlParaAttribDialog(vcl::Window
* _pParent
,
71 const SfxItemSet
& _rCoreSet
)
72 : SfxTabDialog( _pParent
, "TextControlParagraphPropertiesDialog",
73 "svx/ui/textcontrolparadialog.ui", &_rCoreSet
)
75 AddTabPage("labelTP_PARA_STD", RID_SVXPAGE_STD_PARAGRAPH
);
76 AddTabPage("labelTP_PARA_ALIGN", RID_SVXPAGE_ALIGN_PARAGRAPH
);
78 SvtCJKOptions aCJKOptions
;
79 if( aCJKOptions
.IsAsianTypographyEnabled() )
80 AddTabPage("labelTP_PARA_ASIAN", RID_SVXPAGE_PARA_ASIAN
);
82 RemoveTabPage("labelTP_PARA_ASIAN");
84 AddTabPage("labelTP_TABULATOR", RID_SVXPAGE_TABULATOR
);
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */