Hi everybody,<br><br>Here is another patch for the duplicate icons task.<br><div class="gmail_quote"><br><div class="im">On 11/25/2010 02:18 PM, Michael Meeks wrote:<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
On Tue, 2010-11-23 at 22:04 +0100, Joachim Trémouroux wrote:<br></div><div class="im">
I have looked at the calling places. The ImplImageTree::loadImage<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
method is called here:<br>
vcl/source/gdi/bitmapex.cxx<br>
vcl/source/gdi/image.cxx<br>
vcl/source/gdi/imagerepository.cxx<br>
</blockquote>
        Right; we should clearly clobber the BitmapEx constructor from a ResId<br>
- since this is just grabbing a path from a resource file - to load the<br>
missing icon if it is not there. </div></blockquote><div><br>I have modified BitmapEx in the attached patch<br><br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">Where ImageList::GetImage is called<br>
from, I don&#39;t know, we should audit that too.<br></div></blockquote><div> <br></div>
g grep &quot;vcl/image.hxx&quot; | wc -l     returns 179 lines...<br><br>I guess I need more time to check this ;-)<br><div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

ImageRepository::loadImage is called in<br>
<br>
libs-gui/svtools/source/graphic/provider.cxx  (method<br>
GraphicProvider::queryGraphicDescriptor)<br>
    itself called in components/cui/source/customize/cfg.cxx<br>
    and in impress/sd/source/filter/grf/sdgrffilter.cxx<br>
</blockquote>
        Right - this badly needs the return value; perhaps we should add the<br>
loadMissing parameter - and default to false on the ImageRepository<br>
class as well.<br>
<br>
</blockquote></div>
Done.<div class="im"><br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

libs-gui/toolkit/source/layout/core/helper.cxx  (method<br>
layoutimpl::loadGraphic)<br>
    itself called in toolkit/source/awt/vclxbutton.cxx<br>
    and in toolkit/source/layout/vcl/wbutton.cxx<br>
</blockquote>
        This should be substituting missing icons.<br></blockquote><div> </div></div>
Done in helper.cxx<div class="im"><br>

<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
        Wrt. testing, I would try adding a custom item / icon to a toolbar and<br>
then editing the file to rename the icon named (so it doesn&#39;t exist),<br>
and re-loading [ prolly easiest if saved as flat-XML ? ] to see if we<br>
get the right behaviour with the missing icon code there (?).<br>
<br></blockquote><div> </div></div>
Is there a tutorial somewhere? It doesn&#39;t look so obvious to me...<br>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<br>
<br>
Attached patch is LGPLv3+/MPL. <br>As suggested by Andrew I have used an existing icon for the fallback icon.<br>
<br>I&#39;ll continue with auditing the usage of vcl/image.hxx. And of course a bit of testing.<br><br>
Regards,<br><font color="#888888">
Joachim.<br>
<br>
<br>
<br>
<br>
<br>
</font></div><br>