[Libreoffice] [REVIEW] bugfixes which break the string freeze for 3.4.3

Péter Rabi prabi at caesar.elte.hu
Wed Jul 27 04:21:48 PDT 2011


Hi Michael, *

2011. 07. 26, kedd keltezéssel 17.06-kor Michael Meeks ezt írta:
> On Tue, 2011-07-26 at 15:17 +0200, Andras Timar wrote:
> > I'd like to add the bugfix for
> > https://bugs.freedesktop.org/show_bug.cgi?id=32895
> > Somebody some day marked it as critical.
> 
> 	:-) So - I'm not a huge fan of the code. What does:
> 
> + for( int i = 0; i < nCount; ++i )
> + {
> + if( rString == ResId::toString( (const ResId)SfxResId( (sal_uInt16)(nSourceResIds + i) ) ) )
> + {
> + return ResId::toString( (const ResId)SfxResId( (sal_uInt16)(nDestResIds + i) ) );
> + }
> + }
> 
> 	do ? it looks a tad baroque to me. I also dislike seeing it cut/pasted
> into impress as well.

The bug (fdo#32895), which we are talking about affects 'dlgass' (the
welcoming wizard of impress) and dialogue 'doctempl' (Impress -> File ->
Templates -> Save).

While 'doctempl' uses the template handling module of sfx2,
unfortunately, 'dlgass' uses TemplateScanner (inside sd/source/ui/{inc,
gui}) which seems to be a re-implementation of a subset of the services
granted by the template handling module in sfx2.

So that's why I copy/pasted the mentioned code snippet.

Sorry, but I don't really get what do you mean by 'tad baroque'.

> 
> 	Can we get a cleaner reading patch, that re-uses that in impress ? :-)

I think the best would be to make Impress/ui stuff use the sfx2 template
handling and eliminate TemplateScanner. Would you like me to do that?

> 
> 	ATB,
> 
> 		Michael.
> 

Best regards,
  Péter



More information about the LibreOffice mailing list