org.apache.poi.hslf.model.Sheet Maven / Gradle / Ivy
/* ====================================================================
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
package org.apache.poi.hslf.model;
import org.apache.poi.ddf.EscherContainerRecord;
import org.apache.poi.ddf.EscherDgRecord;
import org.apache.poi.ddf.EscherRecord;
import org.apache.poi.hslf.record.*;
import org.apache.poi.hslf.usermodel.SlideShow;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
/**
* This class defines the common format of "Sheets" in a powerpoint
* document. Such sheets could be Slides, Notes, Master etc
*
* @author Nick Burch
*/
public abstract class Sheet
{
/**
* The SlideShow
we belong to
*/
private SlideShow _slideShow;
/**
* Returns an array of all the TextRuns in the sheet.
*/
public abstract TextRun[] getTextRuns();
/**
* Returns the (internal, RefID based) sheet number, as used
* to in PersistPtr stuff.
*/
public abstract int _getSheetRefId();
/**
* Returns the (internal, SlideIdentifier based) sheet number, as used
* to reference this sheet from other records.
*/
public abstract int _getSheetNumber();
/**
* Fetch the PPDrawing from the underlying record
*/
protected abstract PPDrawing getPPDrawing();
/**
* Fetch the SlideShow we're attached to
*/
public SlideShow getSlideShow() { return _slideShow; }
/**
* Set the SlideShow we're attached to.
* Also passes it on to our child RichTextRuns
*/
public void setSlideShow(SlideShow ss) {
_slideShow = ss;
TextRun[] trs = getTextRuns();
if(trs != null) {
for(int i=0; i