[Libreoffice] [Pushed] Remove duplicate 'placeholder' icons

Michael Meeks michael.meeks at novell.com
Fri Nov 26 11:42:24 PST 2010

Hi there,

On Fri, 2010-11-26 at 16:01 +0100, Joachim Trémouroux wrote:
> Here is another patch for the duplicate icons task.

	Great :-)

>         Where ImageList::GetImage is called
>         from, I don't know, we should audit that too.
> g grep "vcl/image.hxx" | wc -l     returns 179 lines...
> I guess I need more time to check this ;-)

	Right - there's some more there I guess; if we do:

	bin/g grep 'GetImage *(' | nl

	we get 300+ hits ;-) the majority of these are the other constructor
though; the one that doesn't take a string parameter.

	Soo ... here is a trick ;-) if you have a build (which hopefully you
do) - we need to find the mangled name for this:

   Image	GetImage( const ::rtl::OUString& rImageName ) const;

	compare the output:

objdump -T vcl/unxlngi6.pro/lib/libvclli.so | nl | grep GetImage
objdump -T vcl/unxlngi6.pro/lib/libvclli.so | nl | c++filt | grep GetImage

	and we get:

2412  000f556c g    DF .text  00000081  Base        _ZNK9ImageList8GetImageERKN3rtl8OUStringE

	So by grepping every .o file in the build, we can find how many times
it is used, and in which places:

$ grep _ZNK9ImageList8GetImageERKN3rtl8OUStringE */unxlngi6.pro/slo/*
Binary file framework/unxlngi6.pro/slo/imagemanagerimpl.o matches
Binary file sfx2/unxlngi6.pro/slo/imgmgr.o matches
Binary file sfx2/unxlngi6.pro/slo/module.o matches
Binary file sfx2/unxlngi6.pro/slo/styfitem.o matches
Binary file sfx2/unxlngi6.pro/slo/templdlg.o matches
Binary file vcl/unxlngi6.pro/slo/image.o matches

	And we have five real hits :-) of course, we need to find the relevant
modules that produced those object files - but hopefully it narrows it
down a bit ?

> Is there a tutorial somewhere ? It doesn't look so obvious to me...

	Ah - I think we'll be ok :-)

> I have tried to rename an icon in a existing .xhp file but I still see
> the correct icon. Not sure I have modified the correct file

	Heh :-)

> Attached patch is LGPLv3+/MPL. As suggested by Andrew I have used an
> existing icon for the fallback icon.

	Ah - except I already added the res/missing_icon.png for you with the
last commit; and I'm happy to take the hit of just one copy of that with
a sensible name :-)

> I'll continue with auditing the usage of vcl/image.hxx. And of course
> a bit of testing.

	Good stuff !



 michael.meeks at novell.com  <><, Pseudo Engineer, itinerant idiot

More information about the LibreOffice mailing list