Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


Hello,

This part of code seems a little bit fishy for iterator management:
   3090                             do
   3091                             {
   3092                                 eType = ++aIt == aPattern.end() ?
TOKEN_END : aIt->eTokenType;
   3093 
   3094                                 if (eType == TOKEN_PAGE_NUMS)
   3095                                 {
   3096                                     aIt = aPattern.erase(aIt);
   3097                                     --aIt;
   3098                                     if (
   3099                                          TOKEN_TAB_STOP ==
   3100                                          aIt->eTokenType
   3101                                        )
   3102                                     {
   3103                                         aPattern.erase(aIt);
   3104                                         aForm.SetPattern(nLevel,
aPattern);
   3105                                     }
   3106                                     eType = TOKEN_END;
   3107                                 }
   3108                             }
   3109                             while (TOKEN_END != eType);

http://opengrok.libreoffice.org/xref/core/sw/source/filter/ww8/ww8par5.cxx#3090

Any idea how to simplify (fix?) this?

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/Problem-in-iterator-management-ww8par5-cxx-sw-module-tp4141050.html
Sent from the Dev mailing list archive at Nabble.com.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.