Filters slides from a list of slides. In a sequence of hidden slides all but the last one are removed. Also, the slide before the sequence of hidden ones is removed. This assumes to leave only those slides in the handout that also appear in the outline, hoping to reduce se-
(slides)
| 211 | |
| 212 | |
| 213 | def handleHiddenSlides(slides): |
| 214 | """Filters slides from a list of slides. |
| 215 | |
| 216 | In a sequence of hidden slides all but the last one are |
| 217 | removed. Also, the slide before the sequence of hidden |
| 218 | ones is removed. |
| 219 | |
| 220 | This assumes to leave only those slides in the handout |
| 221 | that also appear in the outline, hoping to reduce se- |
| 222 | quences where each new slide only adds one new line |
| 223 | to a list of items... |
| 224 | """ |
| 225 | |
| 226 | itd = indicesToDelete = map(lambda s:s.outlineEntry == None, slides) |
| 227 | |
| 228 | for i in range(len(itd)-1): |
| 229 | if itd[i] == 1: |
| 230 | if itd[i+1] == 0: |
| 231 | itd[i] = 0 |
| 232 | if i > 0 and itd[i-1] == 0: |
| 233 | itd[i-1] = 1 |
| 234 | |
| 235 | itd[len(itd)-1] = 0 |
| 236 | |
| 237 | for i in range(len(itd)): |
| 238 | if slides[i].outlineEntry: |
| 239 | curOutlineEntry = slides[i].outlineEntry |
| 240 | if itd[i] == 1: |
| 241 | slides[i].delete = 1 |
| 242 | else: |
| 243 | slides[i].outlineEntry = curOutlineEntry |
| 244 | slides[i].delete = 0 |
| 245 | |
| 246 | slides = filter(lambda s:s.delete == 0, slides) |
| 247 | |
| 248 | return slides |
| 249 | |
| 250 | |
| 251 | def makeSlideTable(slides, pageSize, docWidth, numCols): |
no outgoing calls
no test coverage detected