Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * ====================================================================
  3. * Licensed to the Apache Software Foundation (ASF) under one or more
  4. * contributor license agreements. See the NOTICE file distributed with
  5. * this work for additional information regarding copyright ownership.
  6. * The ASF licenses this file to You under the Apache License, Version 2.0
  7. * (the "License"); you may not use this file except in compliance with
  8. * the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. * ====================================================================
  18. */
  19. package org.apache.poi.xslf.util;
  20. import java.awt.Graphics2D;
  21. import java.awt.geom.Dimension2D;
  22. import java.io.Closeable;
  23. import java.io.File;
  24. import java.io.IOException;
  25. import java.io.InputStream;
  26. import java.nio.charset.Charset;
  27. import java.util.Collections;
  28. import java.util.Set;
  29. import org.apache.poi.common.usermodel.GenericRecord;
  30. import org.apache.poi.sl.draw.EmbeddedExtractor.EmbeddedPart;
  31. import org.apache.poi.util.Internal;
  32. @Internal
  33. abstract class MFProxy implements Closeable {
  34. boolean ignoreParse;
  35. boolean quite;
  36. void setIgnoreParse(boolean ignoreParse) {
  37. this.ignoreParse = ignoreParse;
  38. }
  39. void setQuite(boolean quite) {
  40. this.quite = quite;
  41. }
  42. abstract void parse(File file) throws IOException;
  43. abstract void parse(InputStream is) throws IOException;
  44. abstract Dimension2D getSize();
  45. void setSlideNo(int slideNo) {}
  46. abstract String getTitle();
  47. abstract void draw(Graphics2D ctx);
  48. int getSlideCount() { return 1; }
  49. Set<Integer> slideIndexes(String range) {
  50. return Collections.singleton(1);
  51. }
  52. abstract GenericRecord getRoot();
  53. abstract Iterable<EmbeddedPart> getEmbeddings(int slideNo);
  54. abstract void setDefaultCharset(Charset charset);
  55. }