LibreOffice Module sfx2 (master) 1
charmappopup.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#include <charmappopup.hxx>
20#include <charmapcontrol.hxx>
21#include <vcl/toolbox.hxx>
22
23CharmapPopup::CharmapPopup(const css::uno::Reference<css::uno::XComponentContext>& rContext)
24 : PopupWindowController(rContext, nullptr, OUString())
25{
26}
27
29
30void CharmapPopup::initialize(const css::uno::Sequence<css::uno::Any>& rArguments)
31{
32 PopupWindowController::initialize(rArguments);
33
34 ToolBox* pToolBox = nullptr;
36 if (getToolboxId(nId, &pToolBox))
37 pToolBox->SetItemBits(nId, ToolBoxItemBits::DROPDOWNONLY | pToolBox->GetItemBits(nId));
38}
39
40std::unique_ptr<WeldToolbarPopup> CharmapPopup::weldPopupWindow()
41{
42 return std::make_unique<SfxCharmapCtrl>(this, m_pToolbar);
43}
44
46{
48 getFrameInterface(), pParent,
49 std::make_unique<SfxCharmapCtrl>(this, pParent->GetFrameWeld()));
50
51 mxInterimPopover->Show();
52
53 return mxInterimPopover;
54}
55
57{
58 return "com.sun.star.comp.sfx2.InsertSymbolToolBoxControl";
59}
60
61css::uno::Sequence<OUString> CharmapPopup::getSupportedServiceNames()
62{
63 return { "com.sun.star.frame.ToolbarController" };
64}
65
66extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
68 css::uno::XComponentContext* rContext, css::uno::Sequence<css::uno::Any> const&)
69{
70 return cppu::acquire(new CharmapPopup(rContext));
71}
72
73/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_sfx2_InsertSymbolToolBoxControl_get_implementation(css::uno::XComponentContext *rContext, css::uno::Sequence< css::uno::Any > const &)
virtual std::unique_ptr< WeldToolbarPopup > weldPopupWindow() override
virtual void SAL_CALL initialize(const css::uno::Sequence< css::uno::Any > &rArguments) override
virtual ~CharmapPopup() override
virtual OUString SAL_CALL getImplementationName() override
virtual VclPtr< vcl::Window > createVclPopupWindow(vcl::Window *pParent) override
CharmapPopup(const css::uno::Reference< css::uno::XComponentContext > &rContext)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
ToolBoxItemBits GetItemBits(ToolBoxItemId nItemId) const
void SetItemBits(ToolBoxItemId nItemId, ToolBoxItemBits nBits)
static VclPtr< reference_type > Create(Arg &&... arg)
VclPtr< InterimToolbarPopup > mxInterimPopover
weld::Window * GetFrameWeld() const
sal_Int16 nId