/src/libreoffice/chart2/source/controller/dialogs/dlg_ShapeFont.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 <dlg_ShapeFont.hxx> |
21 | | #include <ViewElementListProvider.hxx> |
22 | | |
23 | | #include <svl/intitem.hxx> |
24 | | #include <svx/dialogs.hrc> |
25 | | #include <svx/svxids.hrc> |
26 | | #include <svx/flagsdef.hxx> |
27 | | #include <editeng/flstitem.hxx> |
28 | | |
29 | | #include <vcl/tabs.hrc> |
30 | | |
31 | | namespace chart |
32 | | { |
33 | | |
34 | | ShapeFontDialog::ShapeFontDialog(weld::Window* pParent, const SfxItemSet* pAttr, |
35 | | const ViewElementListProvider* pViewElementListProvider) |
36 | 0 | : SfxTabDialogController(pParent, u"modules/schart/ui/chardialog.ui"_ustr, u"CharDialog"_ustr, pAttr) |
37 | 0 | , m_pViewElementListProvider(pViewElementListProvider) |
38 | 0 | { |
39 | 0 | AddTabPage(u"fontname"_ustr, TabResId(RID_TAB_FONT.aLabel), RID_SVXPAGE_CHAR_NAME, |
40 | 0 | RID_L + RID_TAB_FONT.sIconName); |
41 | 0 | AddTabPage(u"effects"_ustr, TabResId(RID_TAB_FONTEFFECTS.aLabel), RID_SVXPAGE_CHAR_EFFECTS, |
42 | 0 | RID_L + RID_TAB_FONTEFFECTS.sIconName); |
43 | 0 | AddTabPage(u"position"_ustr, TabResId(RID_TAB_POSITION.aLabel), RID_SVXPAGE_CHAR_POSITION, |
44 | 0 | RID_L + RID_TAB_POSITION.sIconName); |
45 | 0 | } |
46 | | |
47 | | void ShapeFontDialog::PageCreated(const OUString& rId, SfxTabPage& rPage) |
48 | 0 | { |
49 | 0 | SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) ); |
50 | 0 | if (rId == "font") |
51 | 0 | { |
52 | 0 | aSet.Put( SvxFontListItem( m_pViewElementListProvider->getFontList(), SID_ATTR_CHAR_FONTLIST ) ); |
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 | } |
61 | | |
62 | | } //namespace chart |
63 | | |
64 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |