[Libreoffice] SvxHyperlinkDlg still used?
Kohei Yoshida
kyoshida at novell.com
Fri Nov 12 08:41:59 PST 2010
On Fri, 2010-11-12 at 11:12 -0500, Kohei Yoshida wrote:
> On Fri, 2010-11-12 at 15:32 +0000, Michael Meeks wrote:
> > On Fri, 2010-11-12 at 08:35 -0500, Kohei Yoshida wrote:
> > > Yes, I was aware of this, and even SvxHyperlinkDlgWrapper is never
> > > instantiated. It is registered by the applications on startup, but
> > > that's the only place I see it being used.
> >
> > Ah true ;-) I see there is a new cui/ hyperlink dialog that is used.
> >
> > > > Presuambly we came to that conclusion already as it is still there.
> > >
> > > Nope, it's there because I added it to the Easy Hack page.
> >
> > :-) I guess there is prolly other cruft that goes with it eg. the
> > several calls to:
> >
> > SFX_CHILDWINDOW_REGISTRATION( SID_HYPERLINK_INSERT );
> >
> > and the:
> >
> > svx/source/dialog/hyprlink.cxx:SFX_IMPL_CHILDWINDOW(SvxHyperlinkDlgWrapper, SID_HYPERLINK_INSERT)
> >
> > and of course mentions of that in various sdi and src files.
> >
> > Did you do the unwinding to satisfy yourself that whatever mapping
> > between SID_HYPERLINK_INSERT and this dialog is never exploited ?
>
> Heh! The short story is that this dialog code still *is* used, as a
> Hyperlink *toolbar*. Go to View -> Toolbars -> Hyperlink Bar to enable
> a new toolbar to allow some sort of quick insertion of URL buttons.
> That toolbar makes use of SvxHyperlinkDlg.
This line
http://opengrok.go-oo.org/xref/libs-core/framework/source/uielement/toolbarsmenucontroller.cxx#509
addCommand(
m_xPopupMenu,
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CMD_HYPERLINKBAR )),
10360, aEmptyString );
(where CMD_HYPERLINKBAR == ".uno:InsertHyperlink")
inserts the internal value of SID_HYPERLINK_INSERT as a hard-coded
integer value! No wonder searching for SID_HYPERLINK_INSERT didn't turn
up that line....
I've been with this code base for many years, and it is still full of
surprises. :-P
Kohei
--
Kohei Yoshida, LibreOffice hacker, Calc
<kyoshida at novell.com>
More information about the LibreOffice
mailing list