Files
loongoffice/framework/Library_fwk.mk
Maxim Monastirsky b91fb08fd6 tdf#106999 Feedback for style commands
The .uno:StyleApply command takes some arguments, which make
it possible to apply any style of any type. The problem is
that it doesn't provide toggle state to be used when placing
such commands on a toolbar or a menubar. The reason is that
sfx2, by design, can provide status updates only for the
.uno:StyleApply command as a whole, ignoring any arguments
that might be specified in the UI element description. This
behavior is even documented in the XDispatch idl.

wrt solution, changing the generic UI code to handle the
specifics of an individual command can never be a good idea.
The usual approach in such cases is to create separate
commands which will handle the status updates correctly. This
is however not possible in our case because styles can be
created by users, and we can't predict their names and create
separate commands for all of them (given that now it's easy to
add style commands to toolbars and menus - see tdf#106681).

One possible solution is to create a toolbar button controller
on top of .uno:StyleApply, which will be able to translate its
status update to a state compatible with the toolbar. The downside
is that it won't work when placing such command inside a menu, and
in general the menu code in framework doesn't provide any way to
control individual menu items, only a whole sub-menus via a
popup menu controller.

To fix the menu use-case too, this commit introduces a "proxy"
dispatch implementation, which can be used by MenuBarManager
in a transparent way, as if it was the "real" application-level
dispatcher. This means that the changes needed in MenuBarManager
are minimal and do not over-complicate the code, which is a good
thing (Alternatively, such dispatcher could be registered via
the dispatch interception mechanism, but it will add no gain,
given the current requirements, and just add more complexity).
And to make it easier to reuse the code, the new dispatcher
is also used for the toolbar solution.

Change-Id: Ia73b0fa70fd4d1d59360b255aa8fd19570b971ee
Reviewed-on: https://gerrit.libreoffice.org/37590
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-05-14 11:08:35 +02:00

179 lines
7.5 KiB
Makefile

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# 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/.
#
# This file incorporates work covered by the following license notice:
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright
# ownership. The ASF licenses this file to you under the Apache
# License, Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
$(eval $(call gb_Library_Library,fwk))
$(eval $(call gb_Library_set_componentfile,fwk,framework/util/fwk))
$(eval $(call gb_Library_set_include,fwk,\
-I$(SRCDIR)/framework/source/inc \
-I$(SRCDIR)/framework/inc \
$$(INCLUDE) \
))
$(eval $(call gb_Library_set_precompiled_header,fwk,$(SRCDIR)/framework/inc/pch/precompiled_fwk))
$(eval $(call gb_Library_use_external,fwk,boost_headers))
$(eval $(call gb_Library_use_custom_headers,fwk,\
officecfg/registry \
))
$(eval $(call gb_Library_use_sdk_api,fwk))
$(eval $(call gb_Library_use_libraries,fwk,\
comphelper \
cppu \
cppuhelper \
$(call gb_Helper_optional,BREAKPAD, \
crashreport) \
fwe \
fwi \
i18nlangtag \
sal \
salhelper \
sot \
svl \
svt \
tk \
tl \
ucbhelper \
utl \
vcl \
))
$(eval $(call gb_Library_add_exception_objects,fwk,\
framework/source/accelerators/acceleratorcache \
framework/source/accelerators/acceleratorconfiguration \
framework/source/accelerators/documentacceleratorconfiguration \
framework/source/accelerators/globalacceleratorconfiguration \
framework/source/accelerators/keymapping \
framework/source/accelerators/moduleacceleratorconfiguration \
framework/source/accelerators/presethandler \
framework/source/accelerators/storageholder \
framework/source/classes/framecontainer \
framework/source/classes/taskcreator \
framework/source/dispatch/closedispatcher \
framework/source/dispatch/dispatchinformationprovider \
framework/source/dispatch/dispatchprovider \
framework/source/dispatch/interceptionhelper \
framework/source/dispatch/loaddispatcher \
framework/source/dispatch/startmoduledispatcher \
framework/source/dispatch/windowcommanddispatch \
framework/source/helper/dockingareadefaultacceptor \
framework/source/helper/ocomponentaccess \
framework/source/helper/ocomponentenumeration \
framework/source/helper/oframes \
framework/source/helper/persistentwindowstate \
framework/source/helper/statusindicator \
framework/source/helper/statusindicatorfactory \
framework/source/helper/tagwindowasmodified \
framework/source/helper/titlebarupdate \
framework/source/helper/uiconfigelementwrapperbase \
framework/source/helper/uielementwrapperbase \
framework/source/helper/vclstatusindicator \
framework/source/helper/wakeupthread \
framework/source/interaction/quietinteraction \
framework/source/jobs/job \
framework/source/jobs/jobdata \
framework/source/jobs/jobdispatch \
framework/source/jobs/jobexecutor \
framework/source/jobs/jobresult \
framework/source/jobs/joburl \
framework/source/layoutmanager/helpers \
framework/source/layoutmanager/layoutmanager \
framework/source/layoutmanager/toolbarlayoutmanager \
framework/source/layoutmanager/uielement \
framework/source/loadenv/loadenv \
framework/source/loadenv/targethelper \
framework/source/services/ContextChangeEventMultiplexer \
framework/source/services/autorecovery \
framework/source/services/desktop \
framework/source/services/frame \
framework/source/services/modulemanager \
framework/source/services/pathsettings \
framework/source/services/sessionlistener \
framework/source/services/substitutepathvars \
framework/source/services/taskcreatorsrv \
framework/source/services/urltransformer \
framework/source/uiconfiguration/CommandImageResolver \
framework/source/uiconfiguration/ImageArrayData \
framework/source/uiconfiguration/ImageList \
framework/source/uiconfiguration/ImplImageList \
framework/source/uiconfiguration/globalsettings \
framework/source/uiconfiguration/graphicnameaccess \
framework/source/uiconfiguration/imagemanager \
framework/source/uiconfiguration/imagemanagerimpl \
framework/source/uiconfiguration/moduleimagemanager \
framework/source/uiconfiguration/moduleuicfgsupplier \
framework/source/uiconfiguration/moduleuiconfigurationmanager \
framework/source/uiconfiguration/uicategorydescription \
framework/source/uiconfiguration/uiconfigurationmanager \
framework/source/uiconfiguration/windowstateconfiguration \
framework/source/uielement/addonstoolbarmanager \
framework/source/uielement/addonstoolbarwrapper \
framework/source/uielement/buttontoolbarcontroller \
framework/source/uielement/comboboxtoolbarcontroller \
framework/source/uielement/complextoolbarcontroller \
framework/source/uielement/controlmenucontroller \
framework/source/uielement/dropdownboxtoolbarcontroller \
framework/source/uielement/edittoolbarcontroller \
framework/source/uielement/genericstatusbarcontroller \
framework/source/uielement/generictoolbarcontroller \
framework/source/uielement/imagebuttontoolbarcontroller \
framework/source/uielement/langselectionstatusbarcontroller \
framework/source/uielement/menubarmanager \
framework/source/uielement/menubarmerger \
framework/source/uielement/menubarwrapper \
framework/source/uielement/objectmenucontroller \
framework/source/uielement/popuptoolbarcontroller \
framework/source/uielement/progressbarwrapper \
framework/source/uielement/recentfilesmenucontroller \
framework/source/uielement/resourcemenucontroller \
framework/source/uielement/spinfieldtoolbarcontroller \
framework/source/uielement/statusbar \
framework/source/uielement/statusbaritem \
framework/source/uielement/statusbarmanager \
framework/source/uielement/statusbarmerger \
framework/source/uielement/statusbarwrapper \
framework/source/uielement/statusindicatorinterfacewrapper \
framework/source/uielement/styletoolbarcontroller \
framework/source/uielement/subtoolbarcontroller \
framework/source/uielement/thesaurusmenucontroller \
framework/source/uielement/togglebuttontoolbarcontroller \
framework/source/uielement/toolbarmanager \
framework/source/uielement/toolbarmerger \
framework/source/uielement/toolbarwrapper \
framework/source/uielement/uicommanddescription \
framework/source/uifactory/addonstoolbarfactory \
framework/source/uifactory/factoryconfiguration \
framework/source/uifactory/menubarfactory \
framework/source/uifactory/statusbarfactory \
framework/source/uifactory/toolbarfactory \
framework/source/uifactory/uicontrollerfactory \
framework/source/uifactory/uielementfactorymanager \
framework/source/uifactory/windowcontentfactorymanager \
framework/source/xml/acceleratorconfigurationreader \
framework/source/xml/acceleratorconfigurationwriter \
framework/source/xml/imagesconfiguration \
framework/source/xml/imagesdocumenthandler \
))
# vim: set noet sw=4 ts=4: