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"
21 #include <svx/svxids.hrc>
22 #include <sfx2/objsh.hxx>
23 #include <svx/xfltrit.hxx>
24 #include <svx/xflftrit.hxx>
25 #include <svx/xtable.hxx>
26 #include <sfx2/dispatch.hxx>
27 #include <sfx2/bindings.hxx>
28 #include <svtools/valueset.hxx>
29 #include <unotools/pathoptions.hxx>
30 #include <svx/svxitems.hrc>
31 #include <vcl/toolbox.hxx>
32 #include <svtools/toolbarmenu.hxx>
33 #include <comphelper/lok.hxx>
36 using namespace css::uno
;
42 FontworkPropertyPanel::FontworkPropertyPanel(weld::Widget
* pParent
,
43 const css::uno::Reference
<css::frame::XFrame
>& rxFrame
)
44 : PanelLayout(pParent
, "FontworkPropertyPanel", "svx/ui/sidebarfontwork.ui")
45 , m_pToolbar(m_xBuilder
->weld_toolbar("fontwork-toolbox"))
46 , m_xToolbar(new ToolbarUnoDispatcher(*m_pToolbar
, *m_xBuilder
, rxFrame
))
48 if (comphelper::LibreOfficeKit::isActive())
49 m_pToolbar
->set_item_visible(".uno:ExtrusionToggle", false);
52 std::unique_ptr
<PanelLayout
>
53 FontworkPropertyPanel::Create(weld::Widget
* pParent
,
54 const css::uno::Reference
<css::frame::XFrame
>& rxFrame
)
56 if (pParent
== nullptr)
57 throw lang::IllegalArgumentException(
58 "no parent Window given to FontworkPropertyPanel::Create", nullptr, 0);
60 throw lang::IllegalArgumentException("no XFrame given to FontworkPropertyPanel::Create",
63 return std::make_unique
<FontworkPropertyPanel
>(pParent
, rxFrame
);
66 } // end of namespace svx::sidebar
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */