<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Form fields 'Image Button' do not work in Forms"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=46579#c21">Comment # 21</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Form fields 'Image Button' do not work in Forms"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=46579">bug 46579</a>
              from <span class="vcard"><a class="email" href="mailto:serval2412@yahoo.fr" title="Julien Nabet <serval2412@yahoo.fr>"> <span class="fn">Julien Nabet</span></a>
</span></b>
        <pre>(In reply to Julien Nabet from <a href="show_bug.cgi?id=46579#c20">comment #20</a>)
<span class="quote">> Lionel: I finally found the missing element for clickable image.
> dispatch/interceptor part was difficult to track down.
> I submitted <a href="https://gerrit.libreoffice.org/c/core/+/107037">https://gerrit.libreoffice.org/c/core/+/107037</a></span >

Sorry Lionel the comment of my patch didn't explain anything, I was quite tired
yesterday and eager to submit the patch :-)

Let's start with non image button which work.
When entering the form, the specific dispatch mechanism for these urls is
prepared:
Thread 1 "soffice.bin" hit Breakpoint 1,
frm::OFormNavigationHelper::queryDispatch (this=0x7781dc8, _rURL=...) at
forms/source/helper/formnavigation.cxx:263
263             return m_pFeatureInterception->queryDispatch( _rURL );
(gdb) p _rURL
$1 = (const com::sun::star::util::URL &) @0x7783208: {Complete =
".uno:FormController/moveToFirst", Main = ".uno:FormController/moveToFirst",
Protocol = ".uno:", User = "", Password = "", Server = "", 
  Port = 0, Path = "FormController/moveToFirst", Name = "", Arguments = "",
Mark = ""}
(gdb) bt
#0  frm::OFormNavigationHelper::queryDispatch(com::sun::star::util::URL const&)
(this=0x7781dc8, _rURL=...) at forms/source/helper/formnavigation.cxx:263
#1  0x00007f85f9087ec1 in frm::OFormNavigationHelper::connectDispatchers()
(this=0x7781dc8) at forms/source/helper/formnavigation.cxx:200
#2  0x00007f85f9087353 in frm::OFormNavigationHelper::updateDispatches()
(this=0x7781dc8) at forms/source/helper/formnavigation.cxx:146
#3  0x00007f85f8eef7ee in
frm::OButtonControl::modelFeatureUrlPotentiallyChanged() (this=0x7781c80) at
forms/source/component/Button.cxx:623
#4  0x00007f85f8eef701 in
frm::OButtonControl::setModel(com::sun::star::uno::Reference<com::sun::star::awt::XControlModel>
const&) (this=0x7781c80, _rxModel=
    uno::Reference to (UnoControlButtonModel *) 0x393af28) at
forms/source/component/Button.cxx:607
#5  0x00007f864a52ac26 in sdr::contact::(anonymous
namespace)::ControlHolder::setModel(com::sun::star::uno::Reference<com::sun::star::awt::XControlModel>
const&) const
    (this=0x7fffa2d6e700, _m=uno::Reference to (UnoControlButtonModel *)
0x393af28) at svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx:187

Notice URL:
{Complete = ".uno:FormController/moveToFirst", Main =
".uno:FormController/moveToFirst", Protocol = ".uno:", User = "", Password =
"", Server = "", 
  Port = 0, Path = "FormController/moveToFirst", Name = "", Arguments = "",
Mark = ""}

It's also during form opening that the method "getModelUrlFeatureId" you quoted
in your previous comment is called:
#0  frm::OButtonControl::getModelUrlFeatureId() const (this=0x73d2820) at
forms/source/component/Button.cxx:655
#1  0x00007f85f8eef787 in
frm::OButtonControl::modelFeatureUrlPotentiallyChanged() (this=0x73d2820) at
forms/source/component/Button.cxx:618
#2  0x00007f85f8eef701 in
frm::OButtonControl::setModel(com::sun::star::uno::Reference<com::sun::star::awt::XControlModel>
const&)
    (this=0x73d2820, _rxModel=uno::Reference to (UnoControlButtonModel *)
0x3e49c88) at forms/source/component/Button.cxx:607
#3  0x00007f864a52ac26 in sdr::contact::(anonymous
namespace)::ControlHolder::setModel(com::sun::star::uno::Reference<com::sun::star::awt::XControlModel>
const&) const
    (this=0x7fffa2d6e700, _m=uno::Reference to (UnoControlButtonModel *)
0x3e49c88) at svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx:187

Then once in the form, each click on one of these button calls:
#0  frm::OFormNavigationHelper::dispatch(short) const (this=0x7784578,
_nFeatureId=5) at forms/source/helper/formnavigation.cxx:287
#1  0x00007f85f8eeeef3 in frm::OButtonControl::actionPerformed_Impl(bool,
com::sun::star::awt::MouseEvent const&) (this=0x7784430,
_bNotifyListener=false, _rEvt=...) at forms/source/component/Button.cxx:498
#2  0x00007f85f8eeed58 in frm::OButtonControl::OnClick(void*) (this=0x7784430)
at forms/source/component/Button.cxx:478
#3  0x00007f85f8eee5c0 in frm::OButtonControl::LinkStubOnClick(void*, void*)
(instance=0x7784430, data=0x0) at forms/source/component/Button.cxx:429
#4  0x00007f864739e9e8 in Link<void*, void>::Call(void*) const (this=0x6e1ec78,
data=0x0) at include/tools/link.hxx:111
#5  0x00007f864739abee in ImplHandleUserEvent(ImplSVEvent*)
(pSVEvent=0x6e1ec70) at vcl/source/window/winproc.cxx:1990


Now, let's take a look at image button which doesn't work.
When opening form there's some preparation with:
#0 
frm::OImageButtonModel::describeFixedProperties(com::sun::star::uno::Sequence<com::sun::star::beans::Property>&)
const (this=0x6f92d40, _rProps=empty uno::Sequence)
    at forms/source/component/ImageButton.cxx:78
#1  0x00007f85f8fd2c7c in
frm::OControlModel::describeFixedAndAggregateProperties(com::sun::star::uno::Sequence<com::sun::star::beans::Property>&,
com::sun::star::uno::Sequence<com::sun::star::beans::Property>&) const
(this=0x6f92d60, _out_rFixedProperties=empty uno::Sequence,
_out_rAggregateProperties=empty uno::Sequence) at
forms/source/component/FormComponent.cxx:1040
#2  0x00007f85f9070f4c in frm::PropertyBagHelper::impl_ts_getArrayHelper()
const (this=0x6f92ec8) at forms/source/component/propertybaghelper.cxx:154
#3  0x00007f85f8f6e7a5 in frm::PropertyBagHelper::getInfoHelper() const
(this=0x6f92ec8) at forms/source/inc/propertybaghelper.hxx:112
#4  0x00007f85f8fd2e9e in frm::OControlModel::getInfoHelper() (this=0x6f92d60)
at forms/source/component/FormComponent.cxx:1056
#5  0x00007f85f8fd2dde in frm::OControlModel::getPropertySetInfo()
(this=0x6f92d60) at forms/source/component/FormComponent.cxx:1051
#6  0x00007f85f8fd2e6d in non-virtual thunk to
frm::OControlModel::getPropertySetInfo() () at
forms/source/component/FormComponent.cxx:1051
#7  0x00007f8643d7efc2 in xmloff::OControlImport::createElement()
(this=0x3e6e210) at xmloff/source/forms/elementimport.cxx:1039

and each click on image button is done here:
Thread 1 "soffice.bin" hit Breakpoint 5,
frm::OClickableImageBaseControl::actionPerformed_Impl (this=0x6e27910,
bNotifyListener=false, rEvt=...) at
forms/source/component/clickableimage.cxx:330
330                             xDisp->dispatch( aHyperLink, aProps );
(gdb) bt
#0  frm::OClickableImageBaseControl::actionPerformed_Impl(bool,
com::sun::star::awt::MouseEvent const&) (this=0x6e27910, bNotifyListener=false,
rEvt=...) at forms/source/component/clickableimage.cxx:330
#1  0x00007f85f9027245 in
frm::OImageButtonControl::mousePressed(com::sun::star::awt::MouseEvent const&)
(this=0x6e27910, e=...) at forms/source/component/ImageButton.cxx:207
#2  0x00007f8649721097 in
MouseListenerMultiplexer::mousePressed(com::sun::star::awt::MouseEvent const&)
(this=0x783b738, evt=...) at toolkit/source/helper/listenermultiplexer.cxx:106
#3  0x00007f8649721097 in
MouseListenerMultiplexer::mousePressed(com::sun::star::awt::MouseEvent const&)
(this=0x6e2ebc8, evt=...) at toolkit/source/helper/listenermultiplexer.cxx:106
#4  0x00007f86494cda84 in VCLXWindow::ProcessWindowEvent(VclWindowEvent
const&)::$_2::operator()() const (this=0x79f44c0) at
toolkit/source/awt/vclxwindow.cxx:726

let's take a look at URL:
(gdb) p aHyperLink
$3 = {Complete = ".uno:OpenHyperlink", Main = ".uno:OpenHyperlink", Protocol =
".uno:", User = "", Password = "", Server = "", Port = 0, Path =
"OpenHyperlink", Name = "", Arguments = "", Mark = ""}

all the info are in the second arg of "dispatch", "aProps":
(gdb) p aProps
$4 = uno::Sequence of length 3 = {{Name = "URL", Handle = 0, Value =
uno::Any("string": ".uno:FormController/moveToNext"), State =
com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {
    Name = "FrameName", Handle = 0, Value = uno::Any("string": "_blank"), State
= com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {Name =
"Referer", Handle = 0, 
    Value = uno::Any("string": ""), State =
com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}}

Now let's take a look at m_pFeatureInterception declared the same way as
::std::unique_ptr< ControlFeatureInterception > in
forms/source/inc/formnavigation.hxx and
forms/source/component/clickableimage.hxx

ControlFeatureInterception is a "helper class for controls which allow some of
their features to be intercepted"  (see
<a href="https://opengrok.libreoffice.org/xref/core/forms/source/inc/controlfeatureinterception.hxx?r=f0c8312b#48">https://opengrok.libreoffice.org/xref/core/forms/source/inc/controlfeatureinterception.hxx?r=f0c8312b#48</a>)

(Argh, I must go back to work, I'll keep on later)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>