From 4ae2a9fe3adef7e0dfc0d8655718c537adb2ea38 Mon Sep 17 00:00:00 2001 From: r-ca Date: Sun, 14 Jan 2024 16:59:02 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89=E3=81=AE?= =?UTF-8?q?=E7=B5=B1=E5=90=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lacerta/processor/DocumentProcessor.java | 3 +-- .../processor/impl/DocumentProcessorImpl.java | 18 +----------------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java b/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java index 75c8fd39..8a967ff0 100644 --- a/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java +++ b/processor/src/main/java/one/nem/lacerta/processor/DocumentProcessor.java @@ -9,8 +9,7 @@ public interface DocumentProcessor { // ページ操作 void addNewPageToLast(Bitmap bitmap) throws Exception; void addNewPagesToLast(Bitmap[] bitmaps) throws Exception; - void addNewPageAfterIndex(Bitmap bitmap, int index) throws Exception; - void addNewPageBeforeIndex(Bitmap bitmap, int index) throws Exception; + void insertPageAtIndex(Bitmap bitmap, int index) throws Exception; void removePageAtIndex(int index) throws Exception; // 更新 diff --git a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java index 5efcb976..db63175c 100644 --- a/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java +++ b/processor/src/main/java/one/nem/lacerta/processor/impl/DocumentProcessorImpl.java @@ -94,7 +94,7 @@ public class DocumentProcessorImpl implements DocumentProcessor{ } @Override - public void addNewPageAfterIndex(Bitmap bitmap, int index) throws Exception { + public void addNewPageAtIndex(Bitmap bitmap, int index) throws Exception { logger.debug("addNewPageAfterIndex", "called"); String filename = UUID.randomUUID().toString() + ".png"; // TODO-rca: 拡張子を動的にする @@ -108,22 +108,6 @@ public class DocumentProcessorImpl implements DocumentProcessor{ lacertaVcs.insertPage(index + 1, filename); } - @Override - public void addNewPageBeforeIndex(Bitmap bitmap, int index) throws Exception { - logger.debug("addNewPageBeforeIndex", "called"); - String filename = UUID.randomUUID().toString() + ".png"; // TODO-rca: 拡張子を動的にする - - this.fileManager.getNewInstance().createDirectoryIfNotExist(DEFAULT_SAVE_DIR).resolve(DEFAULT_SAVE_DIR).saveBitmap(bitmap, filename); - - Page page = new Page(); - page.setFileName(filename); - page.setBitmap(bitmap); - this.documentDetail.getPages().add(index, page); - - lacertaVcs.insertPage(index, filename); - - } - @Override public void removePageAtIndex(int index) {