remove deprecated getCodepoints method (#940)

This commit is contained in:
PJ Fanning 2025-11-19 13:58:03 +01:00 committed by GitHub
parent ae0a17765e
commit cb520e8046
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 37 deletions

View File

@ -30,7 +30,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.security.MessageDigest;
import java.util.Base64;
import java.util.BitSet;
import java.util.List;
import com.zaxxer.sparsebits.SparseBitSet;
@ -495,12 +494,6 @@ public final class TestExtractor {
sb.setLength(0);
BitSet l1 = ppt.getCodepoints(font, null, null);
l1.stream().mapToObj(Character::toChars).forEach(sb::append);
assertEquals(cps, sb.toString());
sb.setLength(0);
SparseBitSet l2 = ppt.getCodepointsInSparseBitSet(font, null, null);
int cp = 0;
while ((cp = l2.nextSetBit(cp+1)) != -1) {

View File

@ -18,7 +18,6 @@
package org.apache.poi.sl.extractor;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.LinkedList;
import java.util.List;
import java.util.function.Consumer;
@ -46,7 +45,6 @@ import org.apache.poi.sl.usermodel.TextRun;
import org.apache.poi.sl.usermodel.TextShape;
import org.apache.poi.util.Internal;
import org.apache.poi.util.LocaleUtil;
import org.apache.poi.util.Removal;
/**
* Common SlideShow extractor
@ -383,34 +381,6 @@ public class SlideShowExtractor<
return txt;
}
/**
* Extract the used codepoints for font embedding / subsetting
* @param typeface the typeface/font family of the textruns to examine
* @param italic use {@code true} for italic TextRuns, {@code false} for non-italic ones and
* {@code null} if it doesn't matter
* @param bold use {@code true} for bold TextRuns, {@code false} for non-bold ones and
* {@code null} if it doesn't matter
* @return a bitset with the marked/used codepoints
* @deprecated use {@link #getCodepointsInSparseBitSet(String, Boolean, Boolean)}
*/
@Deprecated
@Removal(version = "6.0.0")
public BitSet getCodepoints(String typeface, Boolean italic, Boolean bold) {
final BitSet glyphs = new BitSet();
Predicate<Object> filterOld = filter;
try {
filter = o -> filterFonts(o, typeface, italic, bold);
slideshow.getSlides().forEach(slide ->
getText(slide, s -> s.codePoints().forEach(glyphs::set))
);
} finally {
filter = filterOld;
}
return glyphs;
}
/**
* Extract the used codepoints for font embedding / subsetting. This method is not intended for public use.
*