/src/libreoffice/svx/source/form/fmtextcontroldialogs.cxx
Line | Count | Source |
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/dialogs.hrc> |
22 | | #include <svx/svxids.hrc> |
23 | | |
24 | | #include <svx/flagsdef.hxx> |
25 | | #include <svl/intitem.hxx> |
26 | | |
27 | | #include <svl/cjkoptions.hxx> |
28 | | #include <utility> |
29 | | |
30 | | #include <vcl/tabs.hrc> |
31 | | namespace svx |
32 | | { |
33 | | |
34 | | TextControlCharAttribDialog::TextControlCharAttribDialog(weld::Window* pParent, const SfxItemSet& rCoreSet, SvxFontListItem aFontList) |
35 | 0 | : SfxTabDialogController(pParent, u"svx/ui/textcontrolchardialog.ui"_ustr, u"TextControlCharacterPropertiesDialog"_ustr, &rCoreSet) |
36 | 0 | , m_aFontList(std::move(aFontList)) |
37 | 0 | { |
38 | 0 | AddTabPage(u"font"_ustr, TabResId(RID_TAB_SVXTEXT_FONT), RID_SVXPAGE_CHAR_NAME, |
39 | 0 | RID_L + RID_TAB_FONT_IMG); |
40 | 0 | AddTabPage(u"fonteffects"_ustr, TabResId(RID_TAB_SVXTEXT_FONTEFFECTS), |
41 | 0 | RID_SVXPAGE_CHAR_EFFECTS, RID_L + RID_TAB_FONTEFFECTS_IMG); |
42 | 0 | AddTabPage(u"position"_ustr, TabResId(RID_TAB_SVXTEXT_POSITION), RID_SVXPAGE_CHAR_POSITION, |
43 | 0 | RID_L + RID_TAB_POSITION_IMG); |
44 | 0 | } |
45 | | |
46 | | void TextControlCharAttribDialog::PageCreated(const OUString& rId, SfxTabPage& rPage) |
47 | 0 | { |
48 | 0 | SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); |
49 | |
|
50 | 0 | if (rId == "font") |
51 | 0 | { |
52 | 0 | aSet.Put (m_aFontList); |
53 | 0 | rPage.PageCreated(aSet); |
54 | 0 | } |
55 | 0 | else if (rId == "fonteffects") |
56 | 0 | { |
57 | 0 | aSet.Put (SfxUInt16Item(SID_DISABLE_CTL,DISABLE_CASEMAP)); |
58 | 0 | rPage.PageCreated(aSet); |
59 | 0 | } |
60 | 0 | else if (rId == "position") |
61 | 0 | { |
62 | 0 | aSet.Put( SfxUInt32Item(SID_FLAG_TYPE, SVX_PREVIEW_CHARACTER) ); |
63 | 0 | rPage.PageCreated(aSet); |
64 | 0 | } |
65 | 0 | } |
66 | | |
67 | | TextControlParaAttribDialog::TextControlParaAttribDialog(weld::Window* pParent, const SfxItemSet& rCoreSet) |
68 | 0 | : SfxTabDialogController(pParent, u"svx/ui/textcontrolparadialog.ui"_ustr, u"TextControlParagraphPropertiesDialog"_ustr, &rCoreSet) |
69 | 0 | { |
70 | 0 | AddTabPage(u"indents"_ustr, TabResId(RID_TAB_SVXTEXT_INDENTS), RID_SVXPAGE_STD_PARAGRAPH, |
71 | 0 | RID_L + RID_TAB_INDENTS_IMG); |
72 | 0 | AddTabPage(u"alignment"_ustr, TabResId(RID_TAB_SVXTEXT_ALIGNMENT), |
73 | 0 | RID_SVXPAGE_ALIGN_PARAGRAPH, RID_L + RID_TAB_ALIGNMENT_IMG); |
74 | |
|
75 | 0 | if (SvtCJKOptions::IsAsianTypographyEnabled()) |
76 | 0 | AddTabPage(u"asian"_ustr, TabResId(RID_TAB_SVXTEXT_ASIANTYPO), RID_SVXPAGE_PARA_ASIAN, |
77 | 0 | RID_L + RID_TAB_ASIANTYPO_IMG); |
78 | |
|
79 | 0 | AddTabPage(u"tabs"_ustr, TabResId(RID_TAB_SVXTEXT_TABS), RID_SVXPAGE_TABULATOR, |
80 | 0 | RID_L + RID_TAB_TABS_IMG); |
81 | 0 | } |
82 | | } |
83 | | |
84 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |