Files
odfstudio/vcl/vcl.common.component
Michael Weghorn 9d6ade1f3b [API CHANGE] Reintroduce com.sun.star.ui.dialogs.ColorPicker
Bring back the com.sun.star.ui.dialogs.ColorPicker service
previously dropped in

    commit 5ba0ccb296
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Jun 16 08:01:55 2025 +0200

        [API CHANGE] Drop ColorPicker, AsynchronousColorPicker

    The unpublished com::sun::star::cui::ColorPicker and
    com::sun::star::cui::AsynchronousColorPicker UNO services
    were previously used to be able to use ColorPickerDialog
    (implemented in cui) from svtools.

    That's no longer the case since

        commit 0905c23676
        Author: Michael Weghorn <m.weghorn@posteo.de>
        Date:   Fri Jun 13 18:27:09 2025 +0200

            Stop using UNO abstraction for color picker

    , so drop the now unused services and the ColorPicker
    class that implemented them.

While the service was unpublished and undocumented, it was
still used in practice by third party code, see for
example the macro in [1] and further discussion in Gerrit
change [2].

Therefore bring back the service, but with a new
implementation in vcl that no longer uses the ColorPickerDialog
implemented in cui directly, but instead uses the
weld::ColorChooserDialog abstraction introduced in

    commit dae9472b27
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Jul 25 14:26:06 2025 +0200

        tdf#167669 weld: Introduce weld::ColorChooserDialog

which supports the use of the native platform/toolkit
color dialogs (currently implemented for GTK and Qt), see
tdf#167669.

Don't reintroduce evaluation of the "Mode" parameter
to set a vcl::ColorPickerMode because that seems unused
by third-party code according to a quick Google search.

This makes the macro from [1] work again, and results in
the native GTK and Qt color pickers being used for the
case of the gtk3/qt6 VCL plugins on Linux.

[1] https://forum.openoffice.org/en/forum/viewtopic.php?f=21&t=99268
[2] https://gerrit.libreoffice.org/c/core/+/186538/comments/3af0d3d8_8b843d4e

Change-Id: Ic0f2ce2b289f37bf1fb32192d0f3b3deb99121ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194172
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
2025-11-18 20:29:00 +01:00

78 lines
3.6 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
* 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 .
-->
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.graphic.GraphicMapper"
constructor="com_sun_star_comp_graphic_GraphicMapper_get_implementation">
<service name="com.sun.star.graphic.GraphicMapper"/>
</implementation>
<implementation name="com.sun.star.comp.graphic.GraphicProvider"
constructor="com_sun_star_comp_graphic_GraphicProvider_get_implementation">
<service name="com.sun.star.graphic.GraphicProvider"/>
</implementation>
<implementation name="com.sun.star.cui.ColorPicker"
constructor="com_sun_star_cui_ColorPicker_get_implementation">
<service name="com.sun.star.ui.dialogs.ColorPicker"/>
</implementation>
<implementation name="com.sun.star.datatransfer.clipboard.AquaClipboard"
constructor="vcl_SystemClipboard_get_implementation">
<service name="com.sun.star.datatransfer.clipboard.SystemClipboard"/>
<optional/>
</implementation>
<implementation name="com.sun.star.datatransfer.clipboard.iOSClipboard"
constructor="vcl_SystemClipboard_get_implementation">
<service name="com.sun.star.datatransfer.clipboard.SystemClipboard"/>
<optional/>
</implementation>
<implementation name="com.sun.star.datatransfer.MimeCntTypeFactory"
constructor="dtrans_CMimeContentTypeFactory_get_implementation">
<service name="com.sun.star.datatransfer.MimeContentTypeFactory"/>
</implementation>
<implementation name="com.sun.star.datatransfer.VCLGenericClipboard"
constructor="vcl_SystemClipboard_get_implementation">
<service name="com.sun.star.datatransfer.clipboard.SystemClipboard"/>
<optional/>
</implementation>
<implementation name="com.sun.star.datatransfer.X11ClipboardSupport"
constructor="vcl_SystemClipboard_get_implementation">
<service name="com.sun.star.datatransfer.clipboard.SystemClipboard"/>
<optional/>
</implementation>
<implementation name="com.sun.star.frame.VCLSessionManagerClient"
constructor="com_sun_star_frame_VCLSessionManagerClient_get_implementation">
<service name="com.sun.star.frame.SessionManagerClient"/>
<optional/>
</implementation>
<implementation name="com.sun.star.graphic.GraphicObject"
constructor="com_sun_star_graphic_GraphicObject_get_implementation">
<service name="com.sun.star.graphic.GraphicObject"/>
</implementation>
<implementation name="org.libreoffice.uitest.UITest"
constructor="UITest_get_implementation">
<service name="com.sun.star.ui.test.UITest"/>
<optional/>
</implementation>
<implementation name="vcl::FontIdentificator"
constructor="vcl_FontIdentificator_get_implementation">
<service name="com.sun.star.awt.FontIdentificator"/>
<optional/>
</implementation>
</component>