LibreOffice Module svx (master) 1
FontworkPropertyPanel.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
21
22#include <com/sun/star/lang/IllegalArgumentException.hpp>
23
24#include <comphelper/lok.hxx>
25
26using namespace css;
27using namespace css::uno;
28
29namespace svx
30{
31namespace sidebar
32{
34 const css::uno::Reference<css::frame::XFrame>& rxFrame)
35 : PanelLayout(pParent, "FontworkPropertyPanel", "svx/ui/sidebarfontwork.ui")
36 , m_pToolbar(m_xBuilder->weld_toolbar("fontwork-toolbox"))
37 , m_xToolbar(new ToolbarUnoDispatcher(*m_pToolbar, *m_xBuilder, rxFrame))
38{
40 m_pToolbar->set_item_visible(".uno:ExtrusionToggle", false);
41}
42
43std::unique_ptr<PanelLayout>
45 const css::uno::Reference<css::frame::XFrame>& rxFrame)
46{
47 if (pParent == nullptr)
48 throw lang::IllegalArgumentException(
49 "no parent Window given to FontworkPropertyPanel::Create", nullptr, 0);
50 if (!rxFrame.is())
51 throw lang::IllegalArgumentException("no XFrame given to FontworkPropertyPanel::Create",
52 nullptr, 1);
53
54 return std::make_unique<FontworkPropertyPanel>(pParent, rxFrame);
55}
56}
57} // end of namespace svx::sidebar
58
59/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::Toolbar > m_pToolbar
FontworkPropertyPanel(weld::Widget *pParent, const css::uno::Reference< css::frame::XFrame > &rxFrame)
static std::unique_ptr< PanelLayout > Create(weld::Widget *pParent, const css::uno::Reference< css::frame::XFrame > &rxFrame)