Skip to content

Commit

Permalink
remove some more deprecated code
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879300 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
pjfanning committed Jun 28, 2020
1 parent 02cebfc commit 09d81ea
Showing 1 changed file with 0 additions and 69 deletions.
69 changes: 0 additions & 69 deletions src/scratchpad/src/org/apache/poi/hslf/record/RecordContainer.java
Expand Up @@ -27,7 +27,6 @@ Licensed to the Apache Software Foundation (ASF) under one or more

import org.apache.poi.util.ArrayUtil;
import org.apache.poi.util.LittleEndian;
import org.apache.poi.util.Removal;

/**
* Abstract class which all container records will extend. Providers
Expand Down Expand Up @@ -204,74 +203,6 @@ public int addChildBefore(Record newChild, Record before) {
return loc;
}

/**
* Moves the given Child Record to before the supplied record
*
* @deprecated method is not used within POI and will be removed
*/
@Removal(version="3.19")
@Deprecated
public void moveChildBefore(Record child, Record before) {
moveChildrenBefore(child, 1, before);
}

/**
* Moves the given Child Records to before the supplied record
*
* @deprecated method is not used within POI and will be removed
*/
@Removal(version="3.19")
@Deprecated
public void moveChildrenBefore(Record firstChild, int number, Record before) {
if(number < 1) { return; }

// Decide where we're going to put them
int newLoc = findChildLocation(before);
if(newLoc == -1) {
throw new IllegalArgumentException("Asked to move children before another record, but that record wasn't one of our children!");
}

// Figure out where they are now
int oldLoc = findChildLocation(firstChild);
if(oldLoc == -1) {
throw new IllegalArgumentException("Asked to move a record that wasn't a child!");
}

// Actually move
moveChildRecords(oldLoc, newLoc, number);
}

/**
* Moves the given Child Records to after the supplied record
*
* @param firstChild the first child to be moved
* @param number the number of records to move
* @param after the record after that the children are moved
*
* @deprecated method is not used within POI and will be removed
*/
@Removal(version="3.19")
@Deprecated
public void moveChildrenAfter(Record firstChild, int number, Record after) {
if(number < 1) { return; }
// Decide where we're going to put them
int newLoc = findChildLocation(after);
if(newLoc == -1) {
throw new IllegalArgumentException("Asked to move children before another record, but that record wasn't one of our children!");
}
// We actually want after this though
newLoc++;

// Figure out where they are now
int oldLoc = findChildLocation(firstChild);
if(oldLoc == -1) {
throw new IllegalArgumentException("Asked to move a record that wasn't a child!");
}

// Actually move
moveChildRecords(oldLoc, newLoc, number);
}

/**
* Set child records.
*
Expand Down

0 comments on commit 09d81ea

Please sign in to comment.