Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #include "fmtextcontroldialogs.hxx"
21 : #include <svx/dialmgr.hxx>
22 : #include <svx/dialogs.hrc>
23 :
24 : #include <editeng/eeitem.hxx>
25 :
26 : #include "svx/flagsdef.hxx"
27 : #include <svl/intitem.hxx>
28 :
29 : #include <com/sun/star/uno/Sequence.hxx>
30 : #include <svl/cjkoptions.hxx>
31 :
32 :
33 : namespace svx
34 : {
35 :
36 0 : 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 0 : , m_nCharPositionPageId(0)
43 : {
44 0 : m_nCharNamePageId = AddTabPage("font", RID_SVXPAGE_CHAR_NAME);
45 0 : m_nCharEffectsPageId = AddTabPage("fonteffects", RID_SVXPAGE_CHAR_EFFECTS);
46 0 : m_nCharPositionPageId = AddTabPage("position", RID_SVXPAGE_CHAR_POSITION);
47 0 : }
48 :
49 0 : void TextControlCharAttribDialog::PageCreated( sal_uInt16 _nId, SfxTabPage& _rPage )
50 : {
51 0 : SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool()));
52 :
53 0 : if (_nId == m_nCharNamePageId)
54 : {
55 0 : aSet.Put (m_aFontList);
56 0 : _rPage.PageCreated(aSet);
57 : }
58 0 : else if (_nId == m_nCharEffectsPageId)
59 : {
60 0 : aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP));
61 0 : _rPage.PageCreated(aSet);
62 : }
63 0 : else if (_nId == m_nCharPositionPageId)
64 : {
65 0 : aSet.Put( SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER) );
66 0 : _rPage.PageCreated(aSet);
67 0 : }
68 0 : }
69 :
70 0 : TextControlParaAttribDialog::TextControlParaAttribDialog(vcl::Window* _pParent,
71 : const SfxItemSet& _rCoreSet)
72 : : SfxTabDialog( _pParent, "TextControlParagraphPropertiesDialog",
73 0 : "svx/ui/textcontrolparadialog.ui", &_rCoreSet )
74 : {
75 0 : AddTabPage("labelTP_PARA_STD", RID_SVXPAGE_STD_PARAGRAPH);
76 0 : AddTabPage("labelTP_PARA_ALIGN", RID_SVXPAGE_ALIGN_PARAGRAPH);
77 :
78 0 : SvtCJKOptions aCJKOptions;
79 0 : if( aCJKOptions.IsAsianTypographyEnabled() )
80 0 : AddTabPage("labelTP_PARA_ASIAN", RID_SVXPAGE_PARA_ASIAN);
81 : else
82 0 : RemoveTabPage("labelTP_PARA_ASIAN");
83 :
84 0 : AddTabPage("labelTP_TABULATOR", RID_SVXPAGE_TABULATOR);
85 0 : }
86 :
87 435 : }
88 :
89 :
90 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|