View | Details | Raw Unified | Return to bug 39547
Collapse All | Expand All

(-)src/scratchpad/src/org/apache/poi/hslf/usermodel/SlideShow.java (-23 / +10 lines)
Lines 293-299 Link Here
293
	SlideListWithText[] slwts = _documentRecord.getSlideListWithTexts();
293
	SlideListWithText[] slwts = _documentRecord.getSlideListWithTexts();
294
	
294
	
295
	// To hold the lookup from SlideIdentifier IDs to RefIDs
295
	// To hold the lookup from SlideIdentifier IDs to RefIDs
296
	Hashtable slideSlideIdToRefid = new Hashtable();
296
	HashMap slideSlideIdToRefid = new LinkedHashMap(); //we want to remember the order in which keys were inserted
297
	Hashtable notesSlideIdToRefid = new Hashtable();
297
	Hashtable notesSlideIdToRefid = new Hashtable();
298
	// To hold the lookup from SlideIdentifier IDs to SlideAtomsSets
298
	// To hold the lookup from SlideIdentifier IDs to SlideAtomsSets
299
	Hashtable slideSlideIdToSlideAtomsSet = new Hashtable();
299
	Hashtable slideSlideIdToSlideAtomsSet = new Hashtable();
Lines 330-357 Link Here
330
			}
330
			}
331
		}
331
		}
332
	}
332
	}
333
	
333
334
	// Now, create a model representation of a slide for each
334
      // Number of the first slide
335
	//  slide + slideatomset we found
335
      int slideNumber = _documentRecord.getDocumentAtom().getFirstSlideNum();
336
	// Do it in order of the SlideIdentifiers
336
337
	int[] slideIDs = new int[slideSlideIdToRefid.size()];
337
      for (Iterator it = slideSlideIdToRefid.keySet().iterator(); it.hasNext(); ) {
338
	int pos = 0;
339
	Enumeration e = slideSlideIdToRefid.keys();
340
	while(e.hasMoreElements()) {
341
		Integer id = (Integer)e.nextElement();
342
		slideIDs[pos] = id.intValue();
343
		pos++;
344
	}
345
	// Sort
346
	Arrays.sort(slideIDs);
347
	
348
	// Create
349
	for(int i=0; i<slideIDs.length; i++) {
350
		// Build up the list of all the IDs we might want to use
338
		// Build up the list of all the IDs we might want to use
351
		int slideIdentifier = slideIDs[i];
339
		Integer slideIdentifierI = (Integer)it.next();
352
		Integer slideIdentifierI = new Integer(slideIdentifier);
340
353
		int slideNumber = (i+1);
341
		Integer slideRefI = (Integer)slideSlideIdToRefid.get(slideIdentifierI);
354
		Integer slideRefI = (Integer)slideSlideIdToRefid.get(slideIdentifierI); 
355
		Integer slideCoreRecNumI = (Integer)_sheetIdToCoreRecordsLookup.get(slideRefI);
342
		Integer slideCoreRecNumI = (Integer)_sheetIdToCoreRecordsLookup.get(slideRefI);
356
		int slideCoreRecNum = slideCoreRecNumI.intValue();
343
		int slideCoreRecNum = slideCoreRecNumI.intValue();
357
		
344
		
Lines 391-397 Link Here
391
		}
378
		}
392
		
379
		
393
		// Build the slide model
380
		// Build the slide model
394
		Slide slide = new Slide(s, notes, sas, slideIdentifier, slideNumber);
381
		Slide slide = new Slide(s, notes, sas, slideIdentifierI.intValue(), slideNumber++);
395
		slidesV.add(slide);
382
		slidesV.add(slide);
396
	}
383
	}
397
	
384
	
(-)src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java (-1 / +1 lines)
Lines 276-282 Link Here
276
			
276
			
277
			// Handle extra 1 char styles at the end
277
			// Handle extra 1 char styles at the end
278
			if(pos < rawContents.length && textHandled == size) {
278
			if(pos < rawContents.length && textHandled == size) {
279
				size++;
279
				//size++; //do we need this code? 
280
			}
280
			}
281
		}
281
		}
282
282

Return to bug 39547