1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include "FontworkPropertyPanel.hxx"
22 #include <com/sun/star/lang/IllegalArgumentException.hpp>
24 #include <comphelper/lok.hxx>
27 using namespace css::uno
;
33 FontworkPropertyPanel::FontworkPropertyPanel(weld::Widget
* pParent
,
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
))
39 if (comphelper::LibreOfficeKit::isActive())
40 m_pToolbar
->set_item_visible(".uno:ExtrusionToggle", false);
43 std::unique_ptr
<PanelLayout
>
44 FontworkPropertyPanel::Create(weld::Widget
* pParent
,
45 const css::uno::Reference
<css::frame::XFrame
>& rxFrame
)
47 if (pParent
== nullptr)
48 throw lang::IllegalArgumentException(
49 "no parent Window given to FontworkPropertyPanel::Create", nullptr, 0);
51 throw lang::IllegalArgumentException("no XFrame given to FontworkPropertyPanel::Create",
54 return std::make_unique
<FontworkPropertyPanel
>(pParent
, rxFrame
);
57 } // end of namespace svx::sidebar
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */