LibreOffice Module chart2 (master) 1
dlg_ShapeFont.cxx
Go to the documentation of this file.
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>
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
29using namespace ::com::sun::star;
30
31namespace chart
32{
33
35 const ViewElementListProvider* pViewElementListProvider)
36 : SfxTabDialogController(pParent, "modules/schart/ui/chardialog.ui", "CharDialog", pAttr)
37 , m_pViewElementListProvider(pViewElementListProvider)
38{
39 AddTabPage("font", RID_SVXPAGE_CHAR_NAME);
40 AddTabPage("fonteffects", RID_SVXPAGE_CHAR_EFFECTS);
41 AddTabPage("position", RID_SVXPAGE_CHAR_POSITION );
42}
43
44void ShapeFontDialog::PageCreated(const OUString& rId, SfxTabPage& rPage)
45{
46 SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) );
47 if (rId == "font")
48 {
49 aSet.Put( SvxFontListItem( m_pViewElementListProvider->getFontList(), SID_ATTR_CHAR_FONTLIST ) );
50 rPage.PageCreated( aSet );
51 }
52 else if (rId == "fonteffects")
53 {
54 aSet.Put( SfxUInt16Item( SID_DISABLE_CTL, DISABLE_CASEMAP ) );
55 rPage.PageCreated( aSet );
56 }
57}
58
59} //namespace chart
60
61/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void AddTabPage(const OUString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
SfxItemSet * GetInputSetImpl()
virtual void PageCreated(const SfxAllItemSet &aSet)
const ViewElementListProvider * m_pViewElementListProvider
virtual void PageCreated(const OUString &rId, SfxTabPage &rPage) override
ShapeFontDialog(weld::Window *pParent, const SfxItemSet *pAttr, const ViewElementListProvider *pViewElementListProvider)
#define DISABLE_CASEMAP