tdf#155543 Get back com.sun.star.cui.AsynchronousColorPicker service impl
901360967dde5d3948d4a28d156ad526b0802ca1 "Combine
com.sun.star.cui.[Asynchronous]ColorPicker implementation decls" had assumed
that:
"f54ccf09a5073b6e544c976da68de0c9fc0bdf6c "Make Custom Color Picker dialog
async" had added the additional com.sun.star.cui.AsyncColorPicker implementation
entry (later renamed to com.sun.star.cui.AsynchronousColorPicker) for the same
actual C++ implementation, presumably out of confusion. (The implementation
name "com.sun.star.cui.AsynchronousColorPicker" appears to not be mentioned
anywhere else than in this .component file, so it shouldn't matter to drop it.)"
But turns out that things are even more confused there than I'd initially
thought they would be: The names com.sun.star.cui.ColorPicker and
com.sun.star.cui.AsynchronousColorPicker are actually UNOIDL service names as
declared in offapi/com/sun/star/cui/[Asynchronous]ColorPicker.idl. And the
implemenation is accessed via css::cui::ColorPicker::createWithParent and
css::cui::AsynchronousColorPicker::createWithParent in
svtools/source/dialogs/colrdlg.cxx. Which, in the past, happened to work,
because creating a service X also looks for registered implementation names X,
if it does not find a registered implemenation that advertises service name X.
For com.sun.star.cui.AsynchronousColorPicker it happened to work until I removed
that implemenation name from cui/util/cui.component...
A minimal fix for that mess is to make that implementation also advertise the
com.sun.star.cui.AsynchronousColorPicker service name (the
com.sun.star.cui.ColorPicker service name is still found, unconventionally, via
the implementation name). Whether the two additional service names
com.sun.star.ui.dialogs.ColorPicker and
com.sun.star.ui.dialogs.AsynchronousColorPicker are relevant in any way I don't
know---just leave them alone for now.
Change-Id: I37f4fd5b45b97ab27275cd377921063d6e0cc096
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
diff --git a/cui/util/cui.component b/cui/util/cui.component
index 1f73b11..3ff2cd15 100644
--- a/cui/util/cui.component
+++ b/cui/util/cui.component
@@ -21,6 +21,7 @@
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.cui.ColorPicker"
constructor="com_sun_star_cui_ColorPicker_get_implementation">
<service name="com.sun.star.cui.AsynchronousColorPicker"/>
<service name="com.sun.star.ui.dialogs.ColorPicker"/>
<service name="com.sun.star.ui.dialogs.AsynchronousColorPicker"/>
</implementation>