/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// for now all controllers are in the sidebar
vcl::ImageType ToolbarUnoDispatcher::GetIconSize()
{
vcl::ImageType eType = vcl::ImageType::Size16; switch (static_cast<ToolBoxButtonSize>(officecfg::Office::Common::Misc::SidebarIconSize::get()))
{ case ToolBoxButtonSize::Large:
eType = vcl::ImageType::Size26; break; case ToolBoxButtonSize::Size32:
eType = vcl::ImageType::Size32; break; case ToolBoxButtonSize::DontCare: case ToolBoxButtonSize::Small: break;
} return eType;
}
for (int i = 0, nItems = m_pToolbar->get_n_items(); i < nItems; ++i)
{
OUString sIdent(m_pToolbar->get_item_ident(i)); auto xImage(vcl::CommandInfoProvider::GetXGraphicForCommand(sIdent, m_xFrame, eSize));
m_pToolbar->set_item_image(sIdent, xImage);
}
for (autoconst& it : maControllers)
{
css::uno::Reference<css::frame::XSubToolbarController> xController(it.second,
css::uno::UNO_QUERY); if (xController.is() && xController->opensSubToolbar())
{ // The button should show the last function that was selected from the // dropdown. The controller should know better than us what it was.
xController->updateImage();
}
}
}
void ToolbarUnoDispatcher::dispose()
{ if (!m_pToolbar) return;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.