[Libreoffice] [PATCH][PUISHED] List structure cleaning in impress

Petr Mladek pmladek at suse.cz
Fri Jun 10 08:52:03 PDT 2011


Rafael Dominguez píše v St 08. 06. 2011 v 22:07 -0430:

I have pushed it with the following changes:

=====================================================

1. 0001-Replace-List-for-std-vector-sd-FrameView.patch

replaced

+                rViews.push_back( new ::sd::FrameView( mpDoc ) ); 

with

+                pFrameView = new ::sd::FrameView( mpDoc ); 
+                rViews.push_back( pFrameView );

in sd/source/filter/ppt/pptin.cxx, see 
http://cgit.freedesktop.org/libreoffice/impress/commit/?id=4ad79ee8fe80be4b7795c797b820b798da4a1891

The pFrameView pointer is later used in the method. It was not set after your change.


=======================================================


2. 0002-Replace-List-for-std-vector-String.impress.patch

Moved

String aToken( aString.GetToken( nToken, (sal_Unicode)',' ) );

to the original location in sd/source/filter/ppt/pptin.cxx
in the 3rd hunk.

Your original patch moved it in front of 
for ( nToken = 0; nToken < nTokenCount; nToken++ )

You see that the result depends on nToken, so it must be inside the cycle.


=========================================================


3. 0003-Replace-List-for-std-vector-rtl-OUString.impress.patch

used

      nStartSlide = pIter - maSlideNameList.begin() + 1;

in sd/source/filter/eppt/eppt.cxx in the 3rd hunk

---------

used 

       sal_uInt32 nPageNumber = pIter - maSlideNameList.begin();

in sd/source/filter/eppt/eppt.cxx in the 4th hunk


---------

used

       nPageIndex = pIter - maSlideNameList.begin();

in sd/source/filter/eppt/epptso.cxx in the 1st hunk


---------

It was the same mistake in all three locations. The value was
incremented in the original "for" cycle. You replaced the for cycle with 
std::find but forgot to update the counter according to the result.



==============================================

You do great job. It is normal to do mistakes. Well, I suggest to do
more breaks. It is not easy to keep concentration during this task. I
had to stop checking it yesterday evening because I stopped seeing the
problems ;-)

I am looking forward to see more nice patches from you.

Thanks a lot for contribution.


Best Regards,
Petr



More information about the LibreOffice mailing list